From jdashiel at panix.com Mon May 21 19:11:57 2018 From: jdashiel at panix.com (Jude DaShiell) Date: Mon, 21 May 2018 14:11:57 -0400 Subject: [Surfraw-devel] surfraw-update-path bug Message-ID: This probably effects the entire surfraw package but was found here on panix.com when I tried to use surfraw-update-path and got perl bad interpreter back as an error. One of the system administrators wrote me and let me know surfraw-update-path didn't have #!/usr/bin/env perl as its first line which is why I got the bad interpreter error back. Not all systems have perl in /usr/bin and panix.com is one of them. On my home system I tried updating the binary using env and env apparently couldn't find perl for whatever reason. I did include the -w switch after surfraw-update-path too. I am curious, could a perl program be written such that if /usr/bin/perl isn't found it tries /usr/bin/env perl before giving up? -- From ng0 at we.make.ritual.n0.is Mon May 21 19:17:32 2018 From: ng0 at we.make.ritual.n0.is (Nils Gillmann) Date: Mon, 21 May 2018 18:17:32 +0000 Subject: [Surfraw-devel] surfraw-update-path bug In-Reply-To: References: Message-ID: <20180521181732.etyt72gag7g2alrt@abyayala> Jude DaShiell transcribed 1.2K bytes: > This probably effects the entire surfraw package but was found here on > panix.com when I tried to use surfraw-update-path and got perl bad > interpreter back as an error. One of the system administrators wrote me > and let me know surfraw-update-path didn't have #!/usr/bin/env perl as its > first line which is why I got the bad interpreter error back. Not all > systems have perl in /usr/bin and panix.com is one of them. > On my home system I tried updating the binary using env and env apparently > couldn't find perl for whatever reason. I did include the -w switch after > surfraw-update-path too. > I am curious, could a perl program be written such that if /usr/bin/perl > isn't found it tries /usr/bin/env perl before giving up? Probably. What we do in Guix though, is to either wrap applications or change the #! for perl to a reliable location in our system. I think I had a dormant patch fixing this absolutism in surfraw. I should find and rework it. From jdashiel at panix.com Mon May 21 20:29:39 2018 From: jdashiel at panix.com (Jude DaShiell) Date: Mon, 21 May 2018 15:29:39 -0400 Subject: [Surfraw-devel] surfraw-update-path bug In-Reply-To: <20180521181732.etyt72gag7g2alrt@abyayala> References: <20180521181732.etyt72gag7g2alrt@abyayala> Message-ID: Even when I do something like the following: Script started on Mon May 21 15:26:31 2018 There are 444 messages in your incoming mailbox. Statisticians do it with 95% confidence. bash-4.4$ perl /usr/local/bin/surfraw-update-path "SEEK_END" is not exported by the Fcntl module at /usr/local/bin/surfraw-update-path line 9 Can't continue after import errors at /usr/local/bin/surfraw-update-path line 9 BEGIN failed--compilation aborted at /usr/local/bin/surfraw-update-path line 9. bash-4.4$ fg  exit exit Script done on Mon May 21 15:27:42 2018 I don't know what to do about that error. This runs on bsd so that may be causing some of these problems too. On Mon, 21 May 2018, Nils Gillmann wrote: > Date: Mon, 21 May 2018 14:17:32 > From: Nils Gillmann > To: Jude DaShiell > Cc: surfraw-devel at lists.alioth.debian.org > Subject: Re: [Surfraw-devel] surfraw-update-path bug > > Jude DaShiell transcribed 1.2K bytes: > > This probably effects the entire surfraw package but was found here on > > panix.com when I tried to use surfraw-update-path and got perl bad > > interpreter back as an error. One of the system administrators wrote me > > and let me know surfraw-update-path didn't have #!/usr/bin/env perl as its > > first line which is why I got the bad interpreter error back. Not all > > systems have perl in /usr/bin and panix.com is one of them. > > On my home system I tried updating the binary using env and env apparently > > couldn't find perl for whatever reason. I did include the -w switch after > > surfraw-update-path too. > > I am curious, could a perl program be written such that if /usr/bin/perl > > isn't found it tries /usr/bin/env perl before giving up? > > Probably. What we do in Guix though, is to either wrap applications or > change the #! for perl to a reliable location in our system. I think I > had a dormant patch fixing this absolutism in surfraw. I should find > and rework it. > --