• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 527
  • Last Modified:

Can't install Perl on Redhat

I wasn't sure which category I should place this question in.  If it belongs elsewhere, please let me know - my apologies as well.

I have a server running Redhat Enterprise 4 (64-bit architecture).  It already has Perl (5.8.5) installed.  However, I am trying to install 5.8.6.  Following the instructions in INSTALL, I ran

> sh Configure -de

No problem (I think).  But then, when I run

> make

It crashes with the following errors:

cc -L/usr/local/lib -o miniperl \
    miniperlmain.o opmini.o libperl.a
libperl.a(pp.o)(.text+0x2813): In function `Perl_pp_pow':
: undefined reference to `pow'
libperl.a(pp.o)(.text+0x358d): In function `Perl_pp_modulo':
: undefined reference to `floor'
libperl.a(pp.o)(.text+0x35b5): In function `Perl_pp_modulo':
: undefined reference to `floor'
libperl.a(pp.o)(.text+0x367b): In function `Perl_pp_modulo':
: undefined reference to `fmod'
libperl.a(pp.o)(.text+0x7e33): In function `Perl_pp_atan2':
: undefined reference to `atan2'
libperl.a(pp.o)(.text+0x7f13): In function `Perl_pp_sin':
: undefined reference to `sin'
libperl.a(pp.o)(.text+0x8033): In function `Perl_pp_cos':
: undefined reference to `cos'
libperl.a(pp.o)(.text+0x83a3): In function `Perl_pp_exp':
: undefined reference to `exp'
libperl.a(pp.o)(.text+0x84fd): In function `Perl_pp_log':
: undefined reference to `log'
libperl.a(pp.o)(.text+0x86c7): In function `Perl_pp_sqrt':
: undefined reference to `sqrt'
libperl.a(pp.o)(.text+0x8878): In function `Perl_pp_int':
: undefined reference to `ceil'
libperl.a(pp.o)(.text+0x888e): In function `Perl_pp_int':
: undefined reference to `floor'
libperl.a(pp_pack.o)(.text+0x51cf): In function `S_pack_rec':
: undefined reference to `floor'
libperl.a(pp_pack.o)(.text+0x51f3): In function `S_pack_rec':
: undefined reference to `floor'
collect2: ld returned 1 exit status
make: *** [miniperl] Error 1

I don't know why this error occurs.  It probably has something to do with the 64-bit architecture.  The following webpage might  explain the solution, but I'm not sure how to follow its instructions.
     http://sunportal.sunmanagers.org/pipermail/summaries/2003-July/004055.html

It also may be a shared library problem between the two installations, as this webpage indicates (even though it is addressing a different program altogether).
     http://www.webservertalk.com/archive146-2004-5-245294.html

I installed Perl 5.8.6 on my Fedora Core 3 workstation with no problems.  What gives?
0
LucentNugent
Asked:
LucentNugent
  • 3
1 Solution
 
pjedmondCommented:
Looking at your errors, I'm going to suggest that what is happening is due to incompatabilities within the perl package you have downloaded, not your architecture, although the fact you are trying to compile this on a 64 bit architecture may be causing it to refer to '64 bit' specific bits of code that might have a problem.

However, looking at what you are trying to do, my first approach would be to remove the old version of perl before trying to install this one, as it is possible that the incorrect libraries are being referenced. Hopefully ,that will force the correct libraries/header files to be used.

HTH:)
0
 
ahoffmannCommented:
beside probably other problems:
  your Makefile does not use the proper libm.so
0
 
LucentNugentAuthor Commented:
I think you're onto it, ahoffman.  I tried running Configure interactively and here is what I discovered.  It asks me which directories to use for my library searches:

> Directories to use for library searches? [/usr/local/lib /lib /usr/lib]

I hit ENTER to accept the defaults it suggested.  Then I looked in those three directories.  Here is what is in /lib:

cpp                       libdevmapper.so               libnss1_nis-2.3.4.so     libpthread-0.10.so
firmware                  libdevmapper.so.1.00          libnss1_nis.so.1         libpthread.so.0
i686                      libdl-2.3.4.so                libnss_compat-2.3.4.so   libresolv-2.3.4.so
kbd                       libdl.so.2                    libnss_compat.so.1       libresolv.so.2
ld-2.3.4.so               libgcc_s-3.4.3-20041213.so.1  libnss_compat.so.2       librt-2.3.4.so
ld-linux.so.2             libgcc_s.so.1                 libnss_dns-2.3.4.so      librt.so.1
libanl-2.3.4.so           libm-2.3.4.so                 libnss_dns.so.1          libSegFault.so
libanl.so.1               libm.so.6                     libnss_dns.so.2          libtermcap.so.2
libBrokenLocale-2.3.4.so  libNoVersion-2.3.4.so         libnss_files-2.3.4.so    libtermcap.so.2.0.8
libBrokenLocale.so.1      libNoVersion.so.1             libnss_files.so.1        libthread_db-1.0.so
libc-2.3.4.so             libnsl-2.3.4.so               libnss_files.so.2        libthread_db.so.1
libcidn-2.3.4.so          libnsl.so.1                   libnss_hesiod-2.3.4.so   libutil-2.3.4.so
libcidn.so.1              libnss1_compat-2.3.4.so       libnss_hesiod.so.2       libutil.so.1
libcrypt-2.3.4.so         libnss1_compat.so.1           libnss_nis-2.3.4.so      lsb
libcrypt.so.1             libnss1_dns-2.3.4.so          libnss_nisplus-2.3.4.so  modules
libc.so.6                 libnss1_dns.so.1              libnss_nisplus.so.2      security
libdevmapper.a            libnss1_files-2.3.4.so        libnss_nis.so.1          tls
libdevmapper.a.1.00       libnss1_files.so.1            libnss_nis.so.2

Sorry for all the files.  But, you'll notice that in here are: libm-2.3.4.so and libm.so.6.  These are my math libraries, right?

Then comes this in the interactive prompt:

Checking for optional libraries...
No -lsfio.
No -lsocket.
No -lbind.
No -linet.
No -lnsl.
No -lnm.
No -lndbm.
No -lgdbm.
No -ldbm.
No -ldb.
No -lmalloc.
No -ldl.
No -ldld.
No -lld.
No -lsun.
No -lm.
No -lcrypt.
No -lsec.
No -lutil.
No -lc.
No -lcposix.
No -lposix.
No -lucb.
No -lBSD.

In order to compile perl5 on your machine, a number of libraries
are usually needed.  Include any other special libraries here as well.
Say "none" for none.  The default list is almost always right.
-----

It looks like it's not finding any libraries.  Could that be because it's looking for libm.so and doesn't recognize  libm-2.3.4.so or libm.so.6 as the right file?  I don't know much about compiling/linking in C.

Thanks.

0
 
LucentNugentAuthor Commented:
Excuse me, libm.so.6 is actually just a link to libm-2.3.4.so
0
 
LucentNugentAuthor Commented:
Okay, here's what I did.  I went to /lib and created a soft link: libm.so -> libm-2.3.4.so

This made it work and I now have both 5.8.5 and 5.8.6 (the new version) working.  Thanks!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now