Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Help on compiling Perl 5.8.8

Reply
Thread Tools

Help on compiling Perl 5.8.8

 
 
Robert Hicks
Guest
Posts: n/a
 
      08-17-2007
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+0x872: 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

 
Reply With Quote
 
 
 
 
Sisyphus
Guest
Posts: n/a
 
      08-18-2007

"Robert Hicks" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.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+0x872: 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

 
Reply With Quote
 
 
 
 
Robert Hicks
Guest
Posts: n/a
 
      08-18-2007
On Aug 18, 1:09 am, "Sisyphus" <(E-Mail Removed)> wrote:
<snip>
> 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

 
Reply With Quote
 
Sisyphus
Guest
Posts: n/a
 
      08-18-2007

"Robert Hicks" <(E-Mail Removed)> 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

 
Reply With Quote
 
Robert Hicks
Guest
Posts: n/a
 
      08-19-2007
On Aug 18, 10:14 am, "Sisyphus" <(E-Mail Removed)> wrote:
> "Robert Hicks" <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Cross-compiling error when compiling 2.6.1... Garrett Cooper Python 0 02-24-2009 09:47 PM
Cross-compiling error when compiling 2.6.1... Garrett Cooper Python 0 02-24-2009 08:55 PM
Compiling perl? perl?? Mark Seger Perl Misc 3 12-01-2006 03:03 AM
Compiling when libedit is in path Is there a trick to compiling Ruby when libedit must exist in the search path? Can you statically link to readline 5.0 in some manner? -- Lon Baker Lon Baker Ruby 1 03-21-2005 08:57 AM
Compiling Perl to exe with Active State Perl Maciej Kozinski Perl 0 11-28-2003 11:48 AM



Advertisments