[MacPorts] #52358: skey: Can't use 'defined(%hash)'
#52358: skey: Can't use 'defined(%hash)' -----------------------+-------------------------------- Reporter: beckers@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: skey -----------------------+-------------------------------- Hi all, just a minor thin in the fixpaths file for skey:[[BR]] Define(@array) is deprecated so the compiler runs into errors under macOS sierra. `Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at ./fixpaths line 10.`[[BR]] `Can't use 'defined(%hash)' (Maybe you should just omit the defined()?) at ./fixpaths line 29.` I just removed the defined in these two line and that does the trick. I'm just a normal user so I have no idea how to bring that into the code/upstream so maybe here is someone who is willing to help ... Thanks, Sebastian -- Ticket URL: <https://trac.macports.org/ticket/52358> MacPorts <https://www.macports.org/> Ports system for macOS
#52358: skey: Can't use 'defined(%hash)' ------------------------+-------------------------------- Reporter: beckers@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: skey | ------------------------+-------------------------------- Changes (by ryandesign@…): * keywords: => sierra haspatch Comment: Thanks. Replying to [ticket:52358 beckers@…]:
I'm just a normal user so I have no idea how to bring that into the code/upstream so maybe here is someone who is willing to help ...
skey 1.1.5 is over 15 years old, so there might not be an upstream anymore. -- Ticket URL: <https://trac.macports.org/ticket/52358#comment:1> MacPorts <https://www.macports.org/> Ports system for macOS
#52358: skey: Can't use 'defined(%hash)' ------------------------+-------------------------------- Reporter: beckers@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: skey | ------------------------+-------------------------------- Comment (by beckers@…): But still in use ... so will there be a way that this can be fixed for macports? -- Ticket URL: <https://trac.macports.org/ticket/52358#comment:2> MacPorts <https://www.macports.org/> Ports system for macOS
#52358: skey: Can't use 'defined(%hash)' ------------------------+-------------------------------- Reporter: beckers@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: skey | ------------------------+-------------------------------- Comment (by allan.que@…): I don't know Perl but I hacked the source following http://perldoc.perl.org/functions/defined.html and it seemed to build fine and work under Sierra. I also removed `mirror.mcs.anl.gov` from `master_sites` since they [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777192;msg=5 shut down], and updated the link to de-mirror.org. -- Ticket URL: <https://trac.macports.org/ticket/52358#comment:3> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52358: skey: Can't use 'defined(%hash)' ------------------------+-------------------------------- Reporter: beckers@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: sierra haspatch Port: skey | ------------------------+-------------------------------- Comment (by allan.que@…): Sorry. I should have called the patch file `patch-fixpaths.diff` per the standard. -- Ticket URL: <https://trac.macports.org/ticket/52358#comment:5> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52358: skey @1.1.5_1: fixpaths uses deprecated "defined" Perl function ------------------------+---------------------- Reporter: beckers@… | Owner: larryv@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch Port: skey | ------------------------+---------------------- Changes (by larryv@…): * status: new => assigned * keywords: sierra haspatch => haspatch * owner: macports-tickets@… => larryv@… Comment: Not a Sierra problem, I am seeing the same failure on El Capitan. Might have to do with the version of Perl used to invoke `fixpaths`. {{{ /opt/local/bin/perl ./fixpaths -D/etc/skeykeys=/opt/local/etc/skeykeys -D/usr/bin/perl=/opt/local/bin/perl -D/usr/lib/sendmail=/usr/sbin/sendmail ./skey.1 }}} My `/opt/local/bin/perl` is 5.22, while the system’s Perl is 5.18. {{{ % port installed perl5 The following ports are currently installed: perl5 @5.22.2_0+perl5_22 (active) % /usr/bin/perl --version This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin- thread-multi-2level (with 2 registered patches, see perl -V for more detail) [...] }}} -- Ticket URL: <https://trac.macports.org/ticket/52358#comment:6> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52358: skey @1.1.5_1: fixpaths uses deprecated "defined" Perl function ------------------------+---------------------- Reporter: beckers@… | Owner: larryv@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch Port: skey | ------------------------+---------------------- Comment (by devans@…): Both defined(@array) and defined(%hash) are no longer allowed in recent perl versions. Generally these can be replaced by just @array or %hash. To be specific, they are deprecated in 5.18 and will give a warning message. Beginning with 5.22 it's an error. -- Ticket URL: <https://trac.macports.org/ticket/52358#comment:7> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52358: skey @1.1.5_1: fixpaths uses deprecated "defined" Perl function ------------------------+---------------------- Reporter: beckers@… | Owner: larryv@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch Port: skey | ------------------------+---------------------- Comment (by devans@…): I suggest that you fix the port to use perl5.24 regardless of installed system version and remove the defined() in the two places where this occurs. As mentioned above, some of the master_sites listed are no longer active. They're really just gentoo mirrors so you can use the gentoo mirror_list instead. Homepage is also missing but there hasn't been any active development on this for more than a decade and there is really none available that I can find. I believe that gentoo, however, has specific patches that they apply. -- Ticket URL: <https://trac.macports.org/ticket/52358#comment:8> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52358: skey @1.1.5_1: fixpaths uses deprecated "defined" Perl function ------------------------+---------------------- Reporter: beckers@… | Owner: larryv@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: fixed | Keywords: haspatch Port: skey | ------------------------+---------------------- Changes (by larryv@…): * status: assigned => closed * resolution: => fixed Comment: Fixed in r153579. Adding a dependency on perl5.24 seems like overkill because the build system calls one tiny script all of three times. -- Ticket URL: <https://trac.macports.org/ticket/52358#comment:9> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52358: skey @1.1.5_1: fixpaths uses deprecated "defined" Perl function ------------------------+---------------------- Reporter: beckers@… | Owner: larryv@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: fixed | Keywords: haspatch Port: skey | ------------------------+---------------------- Comment (by devans@…): I was just suggesting a repeatable build. As is, any of system perl perl5.22 perl5.24 could be used depending on whether perl5 is installed and if so with which variant. Generally, we try to configure ports so they build the same way each time without regard to selected perl variants etc. If you don't want to install a MacPorts perl to build it, why don't you configure it to use the system perl? -- Ticket URL: <https://trac.macports.org/ticket/52358#comment:10> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52358: skey @1.1.5_1: fixpaths uses deprecated "defined" Perl function ------------------------+---------------------- Reporter: beckers@… | Owner: larryv@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: fixed | Keywords: haspatch Port: skey | ------------------------+---------------------- Comment (by larryv@…): Just didn’t think of it. r153582 -- Ticket URL: <https://trac.macports.org/ticket/52358#comment:11> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
participants (1)
-
MacPorts