Friday, January 25, 2013

Fixing perl floor build problems

Some older Perls fail to build with something like:


pp_pack.o: In function `S_pack_rec':
pp_pack.c:(.text+0x519b): undefined reference to `floor'
pp_pack.c:(.text+0x51be): undefined reference to `floor'
pp_pack.c:(.text+0x51e3): undefined reference to `floor'
opmini.o: In function `Perl_load_module_nocontext':
opmini.c:(.text+0xe53f): undefined reference to `pthread_getspecific'

To fix this add -lpthread -lm to the run-time libraries, e.g.:

perlbrew install perl-5.10.1 -Accflags="$CFLAGS" -Aldflags="-lpthread -lm" -Duseithreads -Dusemultiplicity 

It may still fail with "cc: error: lib/auto/IO/Compress/Compress.a: No such file or directory" which I'm still investigating.

2 comments:

  1. Ever got finished investigating the "Compress.a/file not found" error? I'm just looking at the same error.

    ReplyDelete