Closed p5pRT closed 17 years ago
This is a bug report for perl from alian@cpan.org\, generated with the help of perlbug 1.34 running under perl v5.8.0.
----------------------------------------------------------------- I can't build 5.8.1 nor blead with -Duseshrplib on Mandrake. saturne:\~$ more /usr/bin/gcc #! /usr/bin/perl -w
# # colorgcc .... use Term::ANSIColor; use IPC::Open3;
At build time: Can't locate Term/ANSIColor.pm in @INC (@INC contains: /usr/local/lib/perl5/5.9.0/i686-linux /usr/local/lib/perl5/5.9.0 /usr/local/lib/perl5/site_perl/5.9.0/i686-linux /usr/local/lib/perl5/site_perl/5.9.0 /usr/local/lib/perl5/site_perl .) at /usr/bin/cc line 91. BEGIN failed--compilation aborted at /usr/bin/cc line 91. make[1]: *** [DynaLoader.o] Error 2 make: *** [lib/auto/DynaLoader/DynaLoader.a] Error 2
saturne:\~/.cpanplus/5.8.0/build/Test-Smoke-1.17$ more /etc/mandrake-release Mandrake Linux release 8.1 (Raklet) for i586
On Mon\, Jul 14\, 2003 at 05:35:13AM -0000\, alian wrote:
I can't build 5.8.1 nor blead with -Duseshrplib on Mandrake. saturne:\~$ more /usr/bin/gcc #! /usr/bin/perl -w
# # colorgcc .... use Term::ANSIColor; use IPC::Open3;
Could you please try this ?
(that may not work\, and is\, of course\, lame - _all_ could be a perl script\, including /bin/sh :-))
Regards\, Adi
Adrian Enache (via RT) wrote:
On Mon\, Jul 14\, 2003 at 05:35:13AM -0000\, alian wrote:
I can't build 5.8.1 nor blead with -Duseshrplib on Mandrake. saturne:\~$ more /usr/bin/gcc #! /usr/bin/perl -w
Could you please try this ?
(that may not work\, and is\, of course\, lame - _all_ could be a perl script\, including /bin/sh :-))
Regards\, Adi
--- /arc/bleadperl/Makefile.SH 2003-07-05 01:58:12.000000000 +0300 +++ ./Makefile.SH 2003-07-14 23:17:49.000000000 +0300 @@ -114\,6 +114\,7 @@ exec "$@" EOT chmod 755 preload ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl" + nopreload="LD_PRELOAD= " ;; os390) test -f /bin/env && ldlibpth="/bin/env $ldlibpth" ;; @@ -166\,7 +167\,7 @@ $spitshell >Makefile \<\<!GROK!THIS! # # I now supply perly.c with the kits\, so don't remake perly.c without byacc BYACC = $byacc -CC = $cc +CC = $nopreload $cc LD = $ld
LDFLAGS = $ldflags
This doesn't work: ../../miniperl "-I../../lib" "-I../../lib" ../../lib/ExtUtils/xsubpp -noprototypes -typemap ../../lib/ExtUtils/typemap DynaLoader.xs > DynaLoader.xsc && mv DynaLoader.xsc DynaLoader.c cc -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/include/libelf -O2 -DVERSION=\"1.04\" -DXS_VERSION=\"1.04\" -fpic "-I../.." -DPERL_CORE -DLIBC="/lib/libc-2.2.4.so" DynaLoader.c Can't locate Term/ANSIColor.pm in @INC (@INC contains: /usr/local/lib/perl5/5.9.0/i686-linux /usr/local/lib/perl5/5.9.0 /usr/local/lib/perl5/site_perl/5.9.0/i686-linux /usr/local/lib/perl5/site_perl/5.9.0 /usr/local/lib/perl5/site_perl .) at /usr/bin/cc line 91. BEGIN failed--compilation aborted at /usr/bin/cc line 91.
As dynaloader use miniperl & makefile.PL\, we lost nopreload:
saturne:/usr/local/workplace/perl/perl-current$ LD_LIBRARY_PATH=. ./miniperl -V -Ilib Summary of my perl5 (revision 5.0 version 9 subversion 0 patch 20159) configuration: Platform: osname=linux\, osvers=2.4.20\, archname=i686-linux .... Compiler: cc='cc'\, ccflags ='...
On Tue\, 15 Jul 2003\, Alian wrote:
Adrian Enache (via RT) wrote:
On Mon\, Jul 14\, 2003 at 05:35:13AM -0000\, alian wrote:
I can't build 5.8.1 nor blead with -Duseshrplib on Mandrake. saturne:\~$ more /usr/bin/gcc #! /usr/bin/perl -w
For the time being\, one workaround would be to skip the perl wrapper around gcc\, and just use
sh Configure -Dcc=/path/to/real/cc
Another thing that may help is to "smarten" Makefile.SH so that it only builds the preload script if it is necessary to do so. Or\, more simply\, perhaps we should make the script actually set LD_PRELOAD only if $archlib/CORE/$libperl already exists.
Try this (untested!)
On Tue\, Jul 15\, 2003 at 10:52:58AM -0400\, Andy Dougherty wrote:
Another thing that may help is to "smarten" Makefile.SH so that it only builds the preload script if it is necessary to do so. Or\, more simply\, perhaps we should make the script actually set LD_PRELOAD only if $archlib/CORE/$libperl already exists.
And then (when $archlib/CORE/$libperl really exists) would this work ;-) ?
FWIW\, I'll choose not to hardwire at all the dynamic library path in the perl binary. (harwiring paths may always prove to be a very bad idea). When testing\, LD_LIBRARY_PATH= is just enough to make all things work fine\, and after installing I run ldconfig with $archlib/CORE as its argument. (or other directory I like to move libperl.so to\, ex. /usr/lib).
(of course\, the problem is with binary distributions\, they'll have to do the same).
Regards\, Adi
For the time being\, one workaround would be to skip the perl wrapper around gcc\, and just use
sh Configure \-Dcc=/path/to/real/cc
Of course. But you must know you must do it. And the error message in the failed build isn't enough explicit. A note in a README.linux can be a good thing. (It's linux release specific\, I see this for Mandrake & Yellow Dog).
Another thing that may help is to "smarten" Makefile.SH so that it only builds the preload script if it is necessary to do so. Or\, more simply\, perhaps we should make the script actually set LD_PRELOAD only if $archlib/CORE/$libperl already exists.
Try this (untested!)
The patch at the end of this mail work perfect. It solve my problem. Thank you.
--- perl-5.8.x/Makefile.SH Sat Jul 5 11:14:19 2003 +++ perl-5.8.x-andy/Makefile.SH Tue Jul 15 10:50:20 2003 @@ -104\,6 +104\,13 @@
case "$osname" in linux\)
+ # If there is a pre-existing $libperl from a previous + # installation\, Linux needs to use LD_PRELOAD to + # override the LD_LIBRARY_PATH setting. See the + # INSTALL file\, under "Building a shared perl library". + # If there is no pre-existing $libperl\, we don't need + # to do anything further. + if test -f $archlib/CORE/$libperl; then rm -f preload cat \<\<'EOT' > preload #! /bin/sh @@ -114\,7 +121\,8 @@ EOT chmod 755 preload ldlibpth="$ldlibpth `pwd`/preload `pwd`/$libperl" - ;; + fi + ;; os390) test -f /bin/env && ldlibpth="/bin/env $ldlibpth" ;; esac
On Tue\, 15 Jul 2003\, Enache Adrian wrote:
On Tue\, Jul 15\, 2003 at 10:52:58AM -0400\, Andy Dougherty wrote:
Another thing that may help is to "smarten" Makefile.SH so that it only builds the preload script if it is necessary to do so. Or\, more simply\, perhaps we should make the script actually set LD_PRELOAD only if $archlib/CORE/$libperl already exists.
And then (when $archlib/CORE/$libperl really exists) would this work ;-) ?
No\, it wouldn't. However\, as is stated in INSTALL\, it's generally a bad idea to ever have $archlib/CORE/$libperl already existing. This preload trick should be used only if the user has ignored the warning from INSTALL. As it is currently\, however\, the preload trick incorrectly interferes even if you did follow the advice in INSTALL. In the case of /usr/bin/gcc being a perl script\, this incorrect preloading caused a failure.
-- Andy Dougherty doughera@lafayette.edu
On Tue\, Jul 15\, 2003 at 12:26:02PM -0400\, Andy Dougherty wrote:
On Tue\, 15 Jul 2003\, Enache Adrian wrote:
On Tue\, Jul 15\, 2003 at 10:52:58AM -0400\, Andy Dougherty wrote:
Another thing that may help is to "smarten" Makefile.SH so that it only builds the preload script if it is necessary to do so. Or\, more simply\, perhaps we should make the script actually set LD_PRELOAD only if $archlib/CORE/$libperl already exists.
And then (when $archlib/CORE/$libperl really exists) would this work ;-) ?
No\, it wouldn't. However\, as is stated in INSTALL\, it's generally a bad idea to ever have $archlib/CORE/$libperl already existing. This preload
Does it mean I have to wipe out my old perl before building a new one ? I won't do that before build and make test succeeded.
(sorry if I misunderstood\, but I wasn't been able to locate the place in INSTALL where is recommended not to have $archlib/CORE/$libperl already existing).
Regards\, Adi
On Wed\, 16 Jul 2003\, Enache Adrian wrote:
On Tue\, Jul 15\, 2003 at 12:26:02PM -0400\, Andy Dougherty wrote:
On Tue\, 15 Jul 2003\, Enache Adrian wrote:
On Tue\, Jul 15\, 2003 at 10:52:58AM -0400\, Andy Dougherty wrote:
Another thing that may help is to "smarten" Makefile.SH so that it only builds the preload script if it is necessary to do so. Or\, more simply\, perhaps we should make the script actually set LD_PRELOAD only if $archlib/CORE/$libperl already exists.
And then (when $archlib/CORE/$libperl really exists) would this work ;-) ?
No\, it wouldn't. However\, as is stated in INSTALL\, it's generally a bad idea to ever have $archlib/CORE/$libperl already existing. This preload
Does it mean I have to wipe out my old perl before building a new one ?
Yes\, but only if all the following conditions are true:
1. Your old perl had a shared libperl. 2. The new perl your are building also has a shared libperl with the same name (e.g. libperl.so.8)\, that differs in some way from the old one. (For example\, it might include -DDEBUGGING.) 3. Your new perl uses the same name for the architecture-dependent library as the existing one does. 4. Your system does not have a method of overriding the built-in LD_RUN_PATH (or equivalient) setting of the perl binary.
Condition 3 is usually the key one. That's the one discussed in the INSTALL file in the two paragraphs starting with
There is also an potential problem with the shared perl library if ...
It's easy to avoid -- just install into a different $archlib. For most users not on p5p\, this isn't a problem\, since $archlib automatically includes the version number and several of the key configuration options (threads\, 64 bits). For users installing frequent snapshots (all of which contain the same version number) it can be a problem. Such users can always use a different $archlib (or even a different $prefix) if they wish.
-- Andy Dougherty doughera@lafayette.edu
On Wed\, 16 Jul 2003\, Enache Adrian wrote:
(sorry if I misunderstood\, but I wasn't been able to locate the place in INSTALL where is recommended not to have $archlib/CORE/$libperl already existing).
It's not explicitly stated in precisely those terms. Here's a patch that might make it more explicit:
Andy Dougherty doughera@lafayette.edu
Andy Dougherty wrote:
Another thing that may help is to "smarten" Makefile.SH so that it only builds the preload script if it is necessary to do so. Or\, more simply\, perhaps we should make the script actually set LD_PRELOAD only if $archlib/CORE/$libperl already exists.
Try this (untested!)
Thanks\, applied to blead as #20172 (as well as your INSTALL nit).
@doughera88 - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#22941 (status was 'resolved')
Searchable as RT22941$