develooper Front page | perl.perl5.porters | Postings from October 2003

[perl #24258] ExtUtils::Embed::ldopts produces wrong output for static perl

Thread Next
From:
Stas Bekman
Date:
October 22, 2003 19:19
Subject:
[perl #24258] ExtUtils::Embed::ldopts produces wrong output for static perl
Message ID:
rt-24258-66314.18.5324419055083@rt.perl.org
# New Ticket Created by  Stas Bekman 
# Please include the string:  [perl #24258]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24258 >



This is a bug report for perl from stas@stason.org,
generated with the help of perlbug 1.34 running under perl v5.8.1.


-----------------------------------------------------------------
[Please enter your report here]

This bugreport is talking about 5.8.1, but quite possible it applies to other 
versions as well, as I don't have any other static perl builds available at 
the moment.

ExtUtils::Embed says:

   perl -MExtUtils::Embed -e ldopts -- DynaLoader

   This will print arguments for linking with just the DynaLoader
   extension and libperl.a.

but it doesn't. I get:

   perl-5.8.1-ithread-nouseshrplib -MExtUtils::Embed -e ldopts -- DynaLoader

-rdynamic  -L/usr/local/lib 
/home/stas/perl/5.8.1-ithread-nouseshrplib/lib/5.8.1/i686-linux-thread-multi/auto/DynaLoader/DynaLoader.a 
/home/stas/perl/5.8.1-ithread-nouseshrplib/lib/5.8.1/i686-linux-thread-multi/auto/DynaLoader/DynaLoader.a 
-L/home/stas/perl/5.8.1-ithread-nouseshrplib/lib/5.8.1/i686-linux-thread-multi/CORE 
-lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc

instead of giving me:

/home/stas/perl/5.8.1-ithread-nouseshrplib/lib/5.8.1/i686-linux-thread-multi/CORE/libperl.a

it gives:

-L/home/stas/perl/5.8.1-ithread-nouseshrplib/lib/5.8.1/i686-linux-thread-multi/CORE 
-lperl

which is suitable for shared libperl.so, which I don't have (for this
particular build).

not talking about the duplicated Dynaloader.a entry (notice that I
have followed the instructions in the manpage), which is not a bug but 
probable something that could be cleaned up ;) but it's unrelated to the topic 
of this report.

This bug was reported by Bryn Dyment, running on
freebsd/4.8-release/gcc-2.95.4, as it causes for him a failure to link httpd
with static modperl 1.0 library.  Surprisingly linking with -lperl
when there is no shared library works just fine on linux/3.3.1. It
could be an issue with gcc. I don't have 2.95 to verify whether this
is an issue with gcc. But I tend to believe that we have a bug in
ExtUtils::Embed.

Brian has posted his 'perl -V' here:
http://www.bigtrouble.com/perl_minus_V_output.html

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
     category=utilities
     severity=medium
---
Site configuration information for perl v5.8.1:

Configured by stas at Thu Sep 25 18:41:59 PDT 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
   Platform:
     osname=linux, osvers=2.4.21-0.18mdkcustom, archname=i686-linux-thread-multi
     uname='linux rabbit.stason.org 2.4.21-0.18mdkcustom #6 mon jun 16 
16:26:34 est 2003 i686 unknown unknown gnulinux '
     config_args='-des -Dprefix=/home/stas/perl/5.8.1-ithread-nouseshrplib 
-Dusethreads -Doptimize=-g -Uuseshrplib -Dusedevel'
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
     useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
     use64bitint=undef use64bitall=undef uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
     optimize='-g',
     cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
     ccversion='', gccversion='3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)', 
gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -L/usr/local/lib'
     libpth=/usr/local/lib /lib /usr/lib
     libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
     libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
     gnulibc_version='2.3.2'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
     cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:


---
@INC for perl v5.8.1:
     /home/stas/perl/5.8.1-ithread-nouseshrplib/lib/5.8.1/i686-linux-thread-multi
     /home/stas/perl/5.8.1-ithread-nouseshrplib/lib/5.8.1
 
/home/stas/perl/5.8.1-ithread-nouseshrplib/lib/site_perl/5.8.1/i686-linux-thread-multi
     /home/stas/perl/5.8.1-ithread-nouseshrplib/lib/site_perl/5.8.1
     /home/stas/perl/5.8.1-ithread-nouseshrplib/lib/site_perl
     .

---
Environment for perl v5.8.1:
     HOME=/home/stas
     LANGUAGE=en_AU:en_US:en
     LC_ADDRESS=en_AU
     LC_COLLATE=en_AU
     LC_CTYPE=en_AU
     LC_IDENTIFICATION=en_AU
     LC_MEASUREMENT=en_AU
     LC_MESSAGES=en_AU
     LC_MONETARY=en_AU
     LC_NAME=en_AU
     LC_NUMERIC=en_AU
     LC_PAPER=en_AU
     LC_TELEPHONE=en_AU
     LC_TIME=en_AU
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
 
PATH=/usr//bin:/bin:/usr/bin:.:/usr/local/bin:/usr/X11R6/bin:/usr/games:/home/stas/bin:/home/stas/bin:/usr/local/bin:/usr/X11R6/bin:/usr/java/j2re1.4.0/bin/
     PERLDOC_PAGER=less -R
     PERL_BADLANG (unset)
     SHELL=/bin/tcsh


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About