Skip Menu |

This queue is for tickets about the DBD-Informix CPAN distribution.

Report information
The Basics
Id: 108030
Status: resolved
Estimated: 1 hour (60 min)
Priority: 0/
Queue: DBD-Informix

People
Owner: j.leffler [...] acm.org
Requestors: CLEACH [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 2015.0826
  • 2015.0825
Fixed in: 2015.1031



Subject: perl Makefile.PL doesn't work on AIX 7.1/perl 5.10.1
I ran into a nasty bug that I've been working on for the last 2 days looking for a solution. Turned out to be a bug in Makefile.PL. I'm using DBI 1.634, IBM Informix CSDK Version 3.50. I run: "perl Makefile.PL" and get the following error! Testing whether your Informix test environment will work... /opt/informix/CSDK3.50.UC6/bin/esql[997]: ./esqlcc: not found. Failed to compile esqltest.ec to esqltest.o Turned out the "./esqlcc" program was being found, but was not recognized as a perl script. The 1st line in this file said: #!perl instead of #!/usr/bin/perl And so when the "./esqlcc" program attempted to run, it gave the misleading error of "not found." To get the kit to build I had to do the following hack of Makefile.PL. my($Perl) = $^X; # Translate inscrutable to scrutable! $Perl="/usr/bin/${Perl}"; By default, it turns out the perl special variable $^X just returns the basename. And AIX 7.1 doesn't like it! I know this fix only works for Unix where Perl is installed in this location. I'll leave it up to you to figure a generic solution. As I was writing this use case, I discovered another way around the problem. /usr/bin/perl Makefile.PL would have worked as well. Turns out in that case $^X will return the full path to perl. Another solution is you could do the following on the 1st line: #!/usr/bin/env perl I've done the above in the past where I had multiple versions of Perl installed on a server and I wanted to swap between them by just updating my PATH. Curtis
On 2015-10-28 15:17:02, CLEACH wrote: Show quoted text
> I ran into a nasty bug that I've been working on for the last 2 days > looking for a solution. Turned out to be a bug in Makefile.PL. > > I'm using DBI 1.634, IBM Informix CSDK Version 3.50. > > I run: "perl Makefile.PL" and get the following error! > Testing whether your Informix test environment will work... > /opt/informix/CSDK3.50.UC6/bin/esql[997]: ./esqlcc: not found. > Failed to compile esqltest.ec to esqltest.o > > Turned out the "./esqlcc" program was being found, but was not > recognized as a perl script. The 1st line in this file said: > #!perl > instead of > #!/usr/bin/perl > And so when the "./esqlcc" program attempted to run, it gave the > misleading error of "not found." > > To get the kit to build I had to do the following hack of Makefile.PL. > my($Perl) = $^X; # Translate inscrutable to scrutable! > $Perl="/usr/bin/${Perl}";
It seems to me that it would be a mistake to assume that 'perl' and 'esqlcc' are installed to the same directory. Instead, you should look for esqlcc in $PATH.
Show quoted text
> > It seems to me that it would be a mistake to assume that 'perl' and > 'esqlcc' are installed to the same directory. Instead, you should look > for esqlcc in $PATH.
Both were on the PATH. The error message was 100% misleading. I had even hacked Makefile.PL earlier to hard code the full path to esqlcc and it still generated the same error. Since the 1st line in 'esqlcc' was: "#!perl", AIX was not recognizing it as a Perl program. And since it didn't know what shell to use, it threw a generic misleading error message. (I verified this with a small sample Perl script. 100% reproducible! This is an OS issue, not a Perl issue. Perl was never invoked!) After the hack everything worked nice & easy! I'm leaving it to the developer on the best way to resolve this bug. I just wanted to get it to build on my system any way I could. And I opened the ticket so that others could learn from my pain until it gets resolved as part of the build.