Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Feb 1999 10:20:54 -0500
From:      "Chuck O'Donnell" <cao@bus.net>
To:        freebsd-questions@freebsd.org
Subject:   Perl's Config{ld} broken in 3.1R?
Message-ID:  <19990224102054.C21773@milf18.bus.net>

next in thread | raw e-mail | index | archive | help
I am trying to compile apache-1.3.4 using dynamic module support (DSO)
and mod_perl on a FreeBSD 3.1-RELEASE machine.

During compilation, I get the following error:

---
ld -shared -o libperl.so mod_perl.lo perlxsi.lo perl_config.lo perl_util.lo perlio.lo mod_perl_opmask.lo  Apache.lo Constants.lo ModuleConfig.lo Log.lo URI.lo Util.lo Connection.lo Server.lo File.lo Table.lo -Wl,-E  /usr/libdata/perl/5.00502/mach/auto/DynaLoader/DynaLoader.a -L/usr/libdata/perl/5.00502/mach/CORE -lperl -lm -lc -lcrypt -lperl
/usr/libexec/elf/ld: unrecognized option `-Wl,-E'
*** Error code 1
---

Tracing back though mod_perl config shell scripts, I find the following:

---
perl_ld="`$perl_interp -MConfig -e 'print $Config{ld}'`"
perl_ldflags="`$perl_interp -MConfig -e 'print $Config{ldflags}'`"
perl_lddlflags="`$perl_interp -MConfig -e 'print $Config{lddlflags}'`"
---

And voila, running it on the command line:

---
cao@rose$ perl5 -MConfig -e 'foreach (grep /^ld/, keys %Config) { printf "%-20s %s\n", $_, $Config{$_}; }'
ld                   ld
lddlflags            -shared 
ldflags              -Wl,-E 
---

What `perldoc Config' says about ldflags (carats are mine):

---
       ld   From dlsrc.U:

            This variable indicates the program to be used to
            link libraries for dynamic loading.  On some systems,
            it is ld.  On ELF systems, it should be $cc.  Mostly,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            we'll try to respect the hint file setting.
---

Isn't '-Wl,-E' a `gcc' flag and not `ld'? If so, I guess Config{ld}
should say `cc' or `gcc'?

Thanks.

Chuck


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990224102054.C21773>