Help on compiling Perl 5.8.8

Help on compiling Perl 5.8.8

am 17.08.2007 21:04:22 von 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

Re: Help on compiling Perl 5.8.8

am 18.08.2007 07:09:31 von Sisyphus

"Robert Hicks" wrote in message
news:1187377462.759466.281780@d55g2000hsg.googlegroups.com.. .
> 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

Re: Help on compiling Perl 5.8.8

am 18.08.2007 15:22:55 von Robert Hicks

On Aug 18, 1:09 am, "Sisyphus" wrote:

> 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

Re: Help on compiling Perl 5.8.8

am 18.08.2007 16:14:26 von Sisyphus

"Robert Hicks" wrote in message
..
..
>
> 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

Re: Help on compiling Perl 5.8.8

am 19.08.2007 19:29:47 von Robert Hicks

On Aug 18, 10:14 am, "Sisyphus" wrote:
> "Robert Hicks" wrote in message
>
> .
> .
>
>
>
> > 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

Thanks, I will follow your advice.

Robert