Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't build shared Perl on Linux #17148

Closed
p5pRT opened this issue Sep 9, 2019 · 6 comments
Closed

can't build shared Perl on Linux #17148

p5pRT opened this issue Sep 9, 2019 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 9, 2019

Migrated from rt.perl.org#134412 (status was 'rejected')

Searchable as RT134412$

@p5pRT
Copy link
Author

p5pRT commented Sep 9, 2019

From [email protected]

Created by [email protected]

when build perl as below​:
./Configure -DEBUGGING=both -Duseshrplib -Duse64bitall -Dusedtrace -des

perl is still built as libperl.a

Perl Info

./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




@p5pRT
Copy link
Author

p5pRT commented Sep 10, 2019

From @tonycoz

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

@p5pRT
Copy link
Author

p5pRT commented Sep 10, 2019

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2019

From [email protected]

Created by [email protected]

when build perl as below​:
./Configure -DEBUGGING=both -Duseshrplib -Duse64bitall -Dusedtrace -des

perl is still built as libperl.a

Perl Info
---
./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


@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2019

From @tonycoz

On Sun, 22 Sep 2019 22​:01​:30 -0700, xyf.xiao@​outlook.com wrote​:

Sorry for the such delay to reply! I had pheumonia and had to go into
hospital for 2 weeks. 🙁
I've build shared perl from tarball extracted directly, and everything
is ok. Thanks.

Thanks, closing.

Tony

@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2019

@tonycoz - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant