Help on compiling Perl 5.8.8

Discussion in 'Perl Misc' started by Robert Hicks, Aug 17, 2007.

  1. Robert Hicks

    Robert Hicks Guest

    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
     
    Robert Hicks, Aug 17, 2007
    #1
    1. Advertising

  2. Robert Hicks

    Sisyphus Guest

    "Robert Hicks" <> wrote in message
    news:...
    > 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
     
    Sisyphus, Aug 18, 2007
    #2
    1. Advertising

  3. Robert Hicks

    Robert Hicks Guest

    On Aug 18, 1:09 am, "Sisyphus" <> 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
     
    Robert Hicks, Aug 18, 2007
    #3
  4. Robert Hicks

    Sisyphus Guest

    "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
     
    Sisyphus, Aug 18, 2007
    #4
  5. Robert Hicks

    Robert Hicks Guest

    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
     
    Robert Hicks, Aug 19, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,816
  2. Garrett Cooper
    Replies:
    0
    Views:
    558
    Garrett Cooper
    Feb 24, 2009
  3. Garrett Cooper
    Replies:
    0
    Views:
    500
    Garrett Cooper
    Feb 24, 2009
  4. Lon Baker
    Replies:
    1
    Views:
    224
    Csaba Henk
    Mar 21, 2005
  5. Mark Seger

    Compiling perl? perl??

    Mark Seger, Nov 30, 2006, in forum: Perl Misc
    Replies:
    3
    Views:
    119
Loading...

Share This Page