Perlbrew failed building 5.28.2 with "porting/libperl.t: Unexpected /usr/bin/nm error: no symbols"
Asked Answered
K

1

6

I'm relatively new to perl and not used to having to build a development tool. I tried to build 5.28.2 and it failed with the following:

Test Summary Report
-------------------
porting/libperl.t                                                (Wstat: 65280 Tests: 35 Failed: 0)
  Non-zero exit status: 255
  Parse errors: No plan found in TAP output
Files=2657, Tests=1169052, 1297 wallclock secs (88.11 usr 13.73 sys + 620.41 cusr 99.27 csys = 821.52 CPU)
Result: FAIL
make: *** [test_harness] Error 1
##### Brew Failed ##### 

The problem is reported as:

porting/libperl.t: Unexpected /usr/bin/nm error: no symbols
porting/libperl.t: Unexpected /usr/bin/nm errors
porting/libperl.t .................................................. 
Dubious, test returned 255 (wstat 65280, 0xff00)
All 35 subtests passed 

Now to my untrained eye it seems there are 0 failures. I'm tempted to run the build with notest or force but then I don't know what I'm getting. btw, I am enabling threading in this build. So, is this the thing I can ignore? much thanks

note: this is on a Mac with OSX 10.15.4.

Kristalkristan answered 17/6, 2020 at 21:25 Comment(3)
Yes I get exactly the same errors on macOS 10.15.5. I will have a look at itNierman
The problem was fixed in devel branch by this PR in Oct 2019 so it should be fixed in 5.30.1Nierman
perl5-porters is likely to remove this test because it doesn't mean much for end users: github.com/Perl/perl5/issues/21677Markhor
W
3

Here is some more information about the failed test:

$ cd /Users/hakonhaegland/perl5/perlbrew/build/perl-5.28.2/perl-5.28.2/t
$ ./perl -I../lib TEST porting/libperl.t
t/porting/libperl ... porting/libperl.t: Unexpected /usr/bin/nm error: no symbols
porting/libperl.t: Unexpected /usr/bin/nm errors
FAILED--no leader found
Failed 1 test out of 0, 0.00% okay.
    porting/libperl.t
### Since not all tests were successful, you may want to run some of
### them individually and examine any diagnostic messages they produce.
### See the INSTALL document's section on "make test".
### You may have to set your dynamic library search path,
### DYLD_LIBRARY_PATH, to point to the build directory:
###   setenv DYLD_LIBRARY_PATH `pwd`:$DYLD_LIBRARY_PATH; cd t; ./perl harness
###   DYLD_LIBRARY_PATH=`pwd`:$DYLD_LIBRARY_PATH; export DYLD_LIBRARY_PATH; cd t; ./perl harness
###   export DYLD_LIBRARY_PATH=`pwd`:$DYLD_LIBRARY_PATH; cd t; ./perl harness
### for csh-style shells, like tcsh; or for traditional/modern
### Bourne-style shells, like bash, ksh, and zsh, respectively.
Elapsed: 0 sec
u=0.01  s=0.01  cu=0.07  cs=0.03  scripts=0  tests=0

Edit

Some more investigation shows that the nm output on libperl.a gives an unexpected output no symbols to STDERR:

$ /usr/bin/nm -m ../libperl.a > /dev/null
no symbols

(It would be interesting to know why this happens) Anyway, you can fix the test by editing line 579 in t/porting/libperl.t from

if (/nm: no name list/ && $^O eq 'darwin') {

to

if ((/nm: no name list/ || /^no symbols$/) && $^O eq 'darwin') {

Then rerun the test:

$ ./perl -I../lib TEST porting/libperl.t
t/porting/libperl ... ok
All tests successful.
Elapsed: 0 sec
u=0.01  s=0.00  cu=0.09  cs=0.02  scripts=1  tests=35
Woodsy answered 17/6, 2020 at 22:58 Comment(8)
how can I rerun perlbrew without over writing libperl.t?Kristalkristan
According to the INSTALL document you should simply have to do make; make test; make install from within the build directoryNierman
I ran perlbrew install 5.28.2 --as=5.28.2 --thread --notest --force and although it seemed to build when I run Perl -V it shows an older build date. What do I need to do to set the new build as the current build?Kristalkristan
If you install a the same perl version again but with different build options, perlbrew will currently overwrite the old build directory. Is this what you are observing?Nierman
Okay, I just ran make and make install. everything compiled and install seemed to work. I checked the date of perl executable and it shows the correct time but when I perl -V it still shows an April date. btw, how do I specify threading when running make?Kristalkristan
If you want to build with thread support, you need to rerun Configure (provided you did not specify it the first time)Nierman
okay I just figured out how to get the correct version. phew. what would the Configure commandline look like for threading?Kristalkristan
Something like this: sh Configure -Dprefix=$your_installation_dir -des -DusethreadsNierman

© 2022 - 2024 — McMap. All rights reserved.