Fwd: Make problem Building 64 bit Perl 5.8.8 from source on Solaris 10 with gcc 3.4.6
- From: jonathan.leffler@xxxxxxxxx (Jonathan Leffler)
- Date: Thu, 20 Mar 2008 10:21:08 -0700
Darn the mailing list!
---------- Forwarded message ----------
From: Jonathan Leffler <jonathan.leffler@xxxxxxxxx>
Date: Thu, Mar 20, 2008 at 10:20 AM
Subject: Re: Make problem Building 64 bit Perl 5.8.8 from source on Solaris
10 with gcc 3.4.6
To: "Vachon, Frederick P (Fred) A5IT" <Fred.Vachon@xxxxxxxxx>
On Thu, Mar 20, 2008 at 10:03 AM, Fred Vachon, Frederick P (Fred) A5IT <
Fred.Vachon@xxxxxxxxx> wrote:
I'm new to this list. I looked over the various Perl mailing lists and
decided on this one although my problem isn't directly related to DBI.
But the reason I'm trying to compile Perl from source as 64 bit is to
use the DBI module and DBD:Oracle (and if I ever can get Perl to Build
I'll probably need help with the DBI!).
I am trying to build a 64 bit Perl from source on my home directory (as
non root) on Solaris 10. I downloaded the most current stable version of
Perl 5.8.8 from CPAN. I'm using the Solaris gcc compiler in
/usr/local/bin/gcc which is version 3.4.6. I get through the Configure
step OK but fail when trying to run make. The tail of the output is
listed below. I have searched the internet for others with this problem
but have not been able to find a solution. I have read the README file
for Solaris, the INSTALL notes and have looked through the hints script.
I am not a sysadmin so my options are limited - I cannot install a
different gcc compiler or make any changes to the system directories. My
objective is to have my own version of Perl so I can add the DBI and
DBD::ORACLE modules.
I am running Configure this way. I am taking all the defaults except I
remove directory /usr/lib as mentioned in the Solaris README notes.
sh ./Configure -Dprefix=/home/fred/perl_5.8.8 -Dcc=gcc -Duse64bitall
-Aldflags="-mcpu=v9 -m64" -Alddlflags="-mcpu=v9 -m64 -G"
This is my LD_LIBRARY_PATH and PATH
LD_LIBRARY_PATH
/usr/local/lib:/usr/ccs/lib:/usr/sfw/lib:/usr/dt/lib:/usr/openwin/lib:/u
sr/share/lib:$ORACLE_HOME/lib32
PATH
/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/ccs/bin:/usr/sfw/bin:/usr/op
enwin/bin:/etc:$ORACLE_HOME/bin:/usr/ucb
This is the error from make:
CCCMD = gcc -DPERL_CORE -c -mcpu=v9 -m64 -Wa,-xarch=v9
-fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/ll
gcc -m64 -mcpu=v9 -m64 -L/usr/local/lib -o miniperl \
miniperlmain.o opmini.o libperl.a
Undefined first referenced
symbol in file
cos libperl.a(pp.o)
exp libperl.a(pp.o)
log libperl.a(pp.o)
pow libperl.a(pp.o)
sin libperl.a(pp.o)
ceil libperl.a(pp.o)
fmod libperl.a(pp.o)
sqrt libperl.a(pp.o)
atan2 libperl.a(pp.o)
floor libperl.a(pp.o)
ld: fatal: Symbol referencing errors. No output written to miniperl
collect2: ld returned 1 exit status
make: *** [miniperl] Error 1
Those are maths library functions - the link line needs to include -lm.
I'm not clear why it doesn't - I never had this problem on my Solaris boxes.
You might need to replace /usr/lib with /usr/lib/sparcv9.
Here's the 'perl -V' output from a successful 64-bit Perl (with threading
and multiplicity) built on Solaris 8 with GCC 4.0.2 back in 2006:
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi-64
uname='sunos anubis 5.8 generic_117350-16 sun4u sparc sunw,ultra-5_10
solaris '
config_args='-Duse64bitall -Duseithreads -Dusethreads -Dusemultiplicity
-Dcc=gcc -m64'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc -m64', ccflags ='-D_REENTRANT -mcpu=v9 -m64 -Wa,-xarch=v9
-fno-strict-aliasing -pipe -Wd
eclaration-after-statement -I/usr/gnu64/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O',
cppflags='-D_REENTRANT -mcpu=v9 -m64 -Wa,-xarch=v9 -fno-strict-aliasing
-pipe -Wdeclaration-afte
r-statement -I/usr/gnu64/include'
ccversion='', gccversion='4.0.2', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc -m64', ldflags ='-m64 -L/usr/lib/sparcv9 -L/usr/gnu64/lib
-L/usr/ccs/lib/sparcv9 '
libpth=/usr/lib/sparcv9 /usr/gnu64/lib /usr/ccs/lib/sparcv9
libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lpthread -lc
perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=false, libperl=
libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags=' -G -m64 -L/usr/lib/sparcv9
-L/usr/gnu64/lib -L/usr/ccs/lib/sparc
v9'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT
USE_ITHREADS USE_LARGE_FILES USE_PERLIO
USE_REENTRANT_API
Built under solaris
Compiled at Feb 13 2006 12:40:40
@INC:
/usr/perl/v5.8.8-64bit-thread-multi/lib/5.8.8/sun4-solaris-thread-multi-64
/usr/perl/v5.8.8-64bit-thread-multi/lib/5.8.8
/usr/perl/v5.8.8-64bit-thread-multi/lib/site_perl/5.8.8/sun4-solaris-thread-multi-64
/usr/perl/v5.8.8-64bit-thread-multi/lib/site_perl/5.8.8
/usr/perl/v5.8.8-64bit-thread-multi/lib/site_perl
This isn't a recommendation to use threaded Perl or a Perl with multiplicity
- this is just the flavour I needed and therefore have compiled up ready to
send you the output. .
You could install your own GCC compiler - just put it in ~/gcc instead of
/usr/local/bin. However, the problem is not related to GCC versions - it is
about library path setups.
Some description of the oddities in my setup. When compiling 64-bit, I
specify the basic 64-bit compiler option in the CC command name: "gcc
-m64". I have to exclude /usr/local -- it is an automounted read-only file
system containing archaic garbage (like Perl 5.4.4) and I don't trust
anything in it. I have /usr/gnu or /usr/gnu64 as the local 32-bit and
64-bit equivalents of /usr/local. I install my versions of Perl into
/usr/perl (which is actually a symlink somewhere else, but the name given to
the compilation system is /usr/perl/v5.8.xxxx etc. I have 8 variants of
Perl installed, from 5.5.3 (don't really need that any more) through 5.10.0.
These are some of the things I have tried so far to fix this:
1. From the INSTALL notes I found reference to the Missing Undefined
Symbols problem. So I did a make distclean and started over. When config
offered an opportunity to edit config.sh I went in and saw that libs
variable was empty. I changed it to be libs='-lsocket -lnsl -ldl -lm
-lc'. That didn't work - same make error.
2. So I tried another suggestion from the INSTALL notes and tried not
using nm extraction with the -Uusenm option for configure. I started
over again with distclean but that didn't work either.
3. So I'm really stuck - I've tried many other things - mainly playing
around with directory paths when prompted running Configure, in
config.sh, and in PATH and LD_LIBRARY_PATH - adding the sparv9
directories... anything I could think of - but no luck.
Any help would be greatly appreciated. I have been struggling with this
problem for several days and cannot get past the make problem. Somehow
it's not finding the math library - or it's getting confused between
32bit and 64bit libraries - but I don't know how to fix it.
Cheers! Fred
--
Jonathan Leffler <jonathan.leffler@xxxxxxxxx> #include <disclaimer.h>
Guardian of DBD::Informix - v2008.0229 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
--
Jonathan Leffler <jonathan.leffler@xxxxxxxxx> #include <disclaimer.h>
Guardian of DBD::Informix - v2008.0229 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."
- References:
- Make problem Building 64 bit Perl 5.8.8 from source on Solaris 10 with gcc 3.4.6
- From: Frederick P A5IT Vachon
- Make problem Building 64 bit Perl 5.8.8 from source on Solaris 10 with gcc 3.4.6
- Prev by Date: RE: What causes this 32 bit problem??
- Next by Date: RE: Make problem Building 64 bit Perl 5.8.8 from source on Solaris 10 with gcc 3.4.6
- Previous by thread: Make problem Building 64 bit Perl 5.8.8 from source on Solaris 10 with gcc 3.4.6
- Next by thread: RE: Make problem Building 64 bit Perl 5.8.8 from source on Solaris 10 with gcc 3.4.6
- Index(es):
Relevant Pages
|
|