Help on compiling Perl 5.8.8

R

Robert Hicks

We rebuilt a Linux (x86_64) server and during the attempt to make I
get:

/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/
include/gdbm -O2 -Wall
cc -L/usr/local/lib -o miniperl \
miniperlmain.o opmini.o libperl.a /usr/lib/libcrypt.a
libperl.a(pp.o)(.text+0x272c): In function `Perl_pp_pow':
: undefined reference to `pow'
libperl.a(pp.o)(.text+0x346d): In function `Perl_pp_modulo':
: undefined reference to `floor'
libperl.a(pp.o)(.text+0x3495): In function `Perl_pp_modulo':
: undefined reference to `floor'
libperl.a(pp.o)(.text+0x355b): In function `Perl_pp_modulo':
: undefined reference to `fmod'
libperl.a(pp.o)(.text+0x7ce3): In function `Perl_pp_atan2':
: undefined reference to `atan2'
libperl.a(pp.o)(.text+0x7dc3): In function `Perl_pp_sin':
: undefined reference to `sin'
libperl.a(pp.o)(.text+0x7ee3): In function `Perl_pp_cos':
: undefined reference to `cos'
libperl.a(pp.o)(.text+0x8253): In function `Perl_pp_exp':
: undefined reference to `exp'
libperl.a(pp.o)(.text+0x83a5): In function `Perl_pp_log':
: undefined reference to `log'
libperl.a(pp.o)(.text+0x8577): In function `Perl_pp_sqrt':
: undefined reference to `sqrt'
libperl.a(pp.o)(.text+0x8728): In function `Perl_pp_int':
: undefined reference to `ceil'
libperl.a(pp.o)(.text+0x873e): In function `Perl_pp_int':
: undefined reference to `floor'
libperl.a(pp_pack.o)(.text+0x444c): In function `S_pack_rec':
: undefined reference to `floor'
libperl.a(pp_pack.o)(.text+0x4470): In function `S_pack_rec':
: undefined reference to `floor'
collect2: ld returned 1 exit status
make: *** [miniperl] Error 1
[rhicks@sartrain perl-5.8.8]$


We did not get that after we first built the server last week (we are
demoing).

Robert
 
S

Sisyphus

Robert Hicks said:
We rebuilt a Linux (x86_64) server and during the attempt to make I
get:

/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/
include/gdbm -O2 -Wall
cc -L/usr/local/lib -o miniperl \
miniperlmain.o opmini.o libperl.a /usr/lib/libcrypt.a
libperl.a(pp.o)(.text+0x272c): In function `Perl_pp_pow':
: undefined reference to `pow'
libperl.a(pp.o)(.text+0x346d): In function `Perl_pp_modulo':
: undefined reference to `floor'
libperl.a(pp.o)(.text+0x3495): In function `Perl_pp_modulo':
: undefined reference to `floor'
libperl.a(pp.o)(.text+0x355b): In function `Perl_pp_modulo':
: undefined reference to `fmod'
libperl.a(pp.o)(.text+0x7ce3): In function `Perl_pp_atan2':
: undefined reference to `atan2'
libperl.a(pp.o)(.text+0x7dc3): In function `Perl_pp_sin':
: undefined reference to `sin'
libperl.a(pp.o)(.text+0x7ee3): In function `Perl_pp_cos':
: undefined reference to `cos'
libperl.a(pp.o)(.text+0x8253): In function `Perl_pp_exp':
: undefined reference to `exp'
libperl.a(pp.o)(.text+0x83a5): In function `Perl_pp_log':
: undefined reference to `log'
libperl.a(pp.o)(.text+0x8577): In function `Perl_pp_sqrt':
: undefined reference to `sqrt'
libperl.a(pp.o)(.text+0x8728): In function `Perl_pp_int':
: undefined reference to `ceil'
libperl.a(pp.o)(.text+0x873e): In function `Perl_pp_int':
: undefined reference to `floor'
libperl.a(pp_pack.o)(.text+0x444c): In function `S_pack_rec':
: undefined reference to `floor'
libperl.a(pp_pack.o)(.text+0x4470): In function `S_pack_rec':
: undefined reference to `floor'
collect2: ld returned 1 exit status
make: *** [miniperl] Error 1
[rhicks@sartrain perl-5.8.8]$

Looks like you need to link to libm (since that's where those references are
defined).
You might be able to hack your way past the problem by running:

cc -L/usr/local/lib -o miniperl miniperlmain.o opmini.o libperl.a
/usr/lib/libcrypt.a /usr/lib/libm.a

and then run 'make' again.

Or maybe add the "usr/lib/libm.a" to the end of that command in the makefile
itself - before running 'make'.

Cheers,
Rob
 
R

Robert Hicks

Looks like you need to link to libm (since that's where those references are
defined).
You might be able to hack your way past the problem by running:

cc -L/usr/local/lib -o miniperl miniperlmain.o opmini.o libperl.a
/usr/lib/libcrypt.a /usr/lib/libm.a

and then run 'make' again.

Or maybe add the "usr/lib/libm.a" to the end of that command in the makefile
itself - before running 'make'.

Cheers,
Rob

I wonder why it is happening though. We built the server on Monday and
Perl compiled flawlessly and when we rebuilt on Thursday using the
same process I get the error now. Strange...

Robert
 
S

Sisyphus

..
..
I wonder why it is happening though. We built the server on Monday and
Perl compiled flawlessly and when we rebuilt on Thursday using the
same process I get the error now. Strange...

I agree, it's odd. I'm no expert (especially on anything that aint windows),
but as I understand it, libm is linked in automatically (by default) on some
systems (eg windows), but is not linked in automatically on some other
systems.

My best guess is that, under the original build, libm was linked in by
default. But under the new rebuild libm has to be explicitly linked in.
Furthermore, configure has not detected this change (which would probably be
a bug in configure), and the new makefile therefore fails in that regard.

Or something like that :)

If you can verify that my original suggestion of modifying the makefile
actually works, then I think that suggests that configure is not doing its
job correctly, and you should submit a bug report.

If neither of my original suggestions are helpful then you should probably
ignore me altogether and wait for a more knowledgeable reply :)

(Best way to submit a bug report is to run 'perlbug'.)

Cheers,
Rob
 
R

Robert Hicks

.
.




I agree, it's odd. I'm no expert (especially on anything that aint windows),
but as I understand it, libm is linked in automatically (by default) on some
systems (eg windows), but is not linked in automatically on some other
systems.

My best guess is that, under the original build, libm was linked in by
default. But under the new rebuild libm has to be explicitly linked in.
Furthermore, configure has not detected this change (which would probably be
a bug in configure), and the new makefile therefore fails in that regard.

Or something like that :)

If you can verify that my original suggestion of modifying the makefile
actually works, then I think that suggests that configure is not doing its
job correctly, and you should submit a bug report.

If neither of my original suggestions are helpful then you should probably
ignore me altogether and wait for a more knowledgeable reply :)

(Best way to submit a bug report is to run 'perlbug'.)

Cheers,
Rob

Thanks, I will follow your advice.

Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top