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.

Coltrane58
  • 317
  • 1
  • 4
  • Yes I get exactly the same errors on macOS 10.15.5. I will have a look at it – Håkon Hægland Jun 17 '20 at 22:49
  • The problem was fixed in devel branch by [this](https://github.com/Perl/perl5/pull/24) PR in Oct 2019 so it should be fixed in [5.30.1](https://github.com/Perl/perl5/releases/tag/v5.30.1) – Håkon Hægland Jun 18 '20 at 12:57

1 Answers1

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
Håkon Hægland
  • 39,012
  • 21
  • 81
  • 174
  • how can I rerun perlbrew without over writing libperl.t? – Coltrane58 Jun 18 '20 at 09:58
  • 1
    According to the [INSTALL](https://metacpan.org/pod/distribution/perl/INSTALL) document you should simply have to do `make; make test; make install` from within the build directory – Håkon Hægland Jun 18 '20 at 10:58
  • 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? – Coltrane58 Jun 18 '20 at 11:22
  • 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? – Håkon Hægland Jun 18 '20 at 11:25
  • 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? – Coltrane58 Jun 18 '20 at 11:46
  • If you want to build with thread support, you need to rerun `Configure` (provided you did not specify it the first time) – Håkon Hægland Jun 18 '20 at 11:47
  • okay I just figured out how to get the correct version. phew. what would the Configure commandline look like for threading? – Coltrane58 Jun 18 '20 at 11:49
  • Something like this: `sh Configure -Dprefix=$your_installation_dir -des -Dusethreads` – Håkon Hægland Jun 18 '20 at 11:52