develooper Front page | perl.perl5.porters | Postings from September 2019

[perl #134412] can't build shared Perl on Linux

Thread Previous
From:
Tony Cook via RT
Date:
September 10, 2019 00:07
Subject:
[perl #134412] can't build shared Perl on Linux
Message ID:
rt-4.0.24-24381-1568074050-1338.134412-15-0@perl.org
On Sun, 08 Sep 2019 18:57:41 -0700, xyf.xiao@outlook.com wrote:
> This is a bug report for perl from xyf.xiao@outlook.com,
> generated with the help of perlbug 1.41 running under perl 5.30.0.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> when build perl as below:
> ./Configure -DEBUGGING=both -Duseshrplib -Duse64bitall -Dusedtrace
> -des
> 
> 
> perl is still built as libperl.a
> 
> 
> [Please do not change anything below this line]
> -----------------------------------------------------------------
> ---
> ./perl -V
> ./perl: error while loading shared libraries:
> /home/andy/perl5/perlbrew/perls/perl-5.30.0/lib/5.30.0/x86_64-
> linux/CORE/libperl.a: invalid ELF header
> 
> andy@andyhome:~/perl5/perlbrew/build/perl-5.30.0/perl-5.30.0$ uname -a
> Linux andyhome 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC
> 2019 x86_64 x86_64 x86_64 GNU/Linux

It looks like you're building with perlbrew, what happens if you build directly instead?

I just built 5.30.0 with:

 ./Configure -des -Dusedtrace -Duseshrplib -DDEBUGGING=both -Duse64bitall -Dprefix=/home/tony/perl/5.30.0-dtrace
 make -j6 test-prep
 TEST_JOBS=6 make -j6 test_harness
 make install

No libperl.a was installed:

 tony@mars:.../git/perl$ find /home/tony/perl/5.30.0-dtrace/ -name libperl.a
 tony@mars:.../git/perl$ 

and perl is dynamically linked to libperl.so:

$ ldd ~/perl/5.30.0-dtrace/bin/perl
        linux-vdso.so.1 (0x00007ffc79f99000)
        libperl.so => /home/tony/perl/5.30.0-dtrace/lib/5.30.0/x86_64-linux/CORE/libperl.so (0x00007f1e22aeb000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1e228ce000)
        libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f1e226b6000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1e224b2000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1e221ae000)
        libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f1e21f76000)
        libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f1e21d73000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1e219d4000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f1e2336e000)

To see if perlbrew added anything you might try:

 grep config_args config.sh

in the build directory.

Tony

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=134412

Thread Previous


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