In order to compile Perl 5.8.0 64-bit using gcc 3.2.1 on our E420R I needed to specify -shared: * Add -shared to the link line, in addition to -Wl,-E -G, for instance: LD_RUN_PATH="" gcc -Wl,-E -G -L/usr/local/lib -shared \ bsd_glob.o Glob.o -o ../../../lib/auto/File/Glob/Glob.so * In config.sh: lddlflags=' -Wl,-E -G -L/usr/local/lib -L/usr/lib/pic/sparcv9 -shared' * In Makefile: LDDLFLAGS = -Wl,-E -G -L/usr/local/lib -L/usr/lib/pic/sparcv9 -shared Thanks to Kevin P. Inscoe! He sent me the following link: http://www.netsys.com/sunmgr/1999-01/msg00100.html One suggestion to bail on gcc as it's support for 64-bit is still pretty flaky (I agree). I had already tried Sun's Workshop 6.0 and Forte compilers and got even worse results, plus I really wanted to stay with gcc since you need to use the same compiler for your Perl modules. Thanks to: Glenn Harrison Peter Evans Kevin P. Inscoe > > Platform: SunOS cressida 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-80 > Compiler: gcc 3.2.1 > Currently installed perl: binary of 5.8.0 from www.sunfreeware.com (32-bit) > > > Ughhh! > > I have a pressing need to get our Perl 5.8.0 compiled 64-bit. > I _finally_ got through the configuration stage and I think I > have a pretty sane config.sh (attached). > > But the make bombs out with: > > gcc -L/usr/local/lib -o miniperl \ > miniperlmain.o opmini.o libperl.a > /usr/local/lib/gcc-lib/sparcv9-sun-solaris2.8/3.2.1/../../../../sparcv9-sun-s > olaris2.8/bin/ld: skipping incompatible /usr/local/lib/libgcc.so when searchi > ng for -lgcc > /usr/local/lib/gcc-lib/sparcv9-sun-solaris2.8/3.2.1/../../../../sparcv9-sun-s > olaris2.8/bin/ld: skipping incompatible /usr/local/lib/libgcc.so when searchi > ng for -lgcc > libperl.a(util.o): In function `Perl_my_socketpair': > util.o(.text+0x6270): undefined reference to `socketpair' > libperl.a(pp.o): In function `Perl_pp_pow': > pp.o(.text+0x3d78): undefined reference to `pow' > libperl.a(pp.o): In function `Perl_pp_modulo': > pp.o(.text+0x4bcc): undefined reference to `floor' > pp.o(.text+0x4c08): undefined reference to `floor' > pp.o(.text+0x4c84): undefined reference to `fmod' > [...] > > which proceeds to list a bunch of routines from -lm, -lsocket and -lnsl. > A full log of the make is in the attached file Install.make2.Apr2.2003 > > But in my config.sh: > > libsfiles=' libsocket.so.1 libnsl.so.1 libdl.so.1 libm.so.1 libc.so.1' > libsfound=' /usr/lib/sparcv9/libsocket.so.1 /usr/lib/sparcv9/libnsl.so.1 /usr > /lib/sparcv9/libdl.so.1 /usr/lib/sparcv9/libm.so.1 /usr/lib/sparcv9/libc.so.1 > ' > [...] > libswanted='sfio socket bind inet nsl nm ndbm gdbm dbm db dl dld sun m c cpos > ix posix ndir dir bsd BSD PW x util ' > > > WTF? I don't see anything in the archives or FAQ. > > Dave > > > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > David Foster National Center for Microscopy and Imaging Research > Programmer/Analyst University of California, San Diego > dfoster[at]ucsd[dot]edu Department of Neuroscience, Mail 0608 > (858) 534-7968 http://ncmir.ucsd.edu/ > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > "The reasonable man adapts himself to the world; the unreasonable one > persists in trying to adapt the world to himself. Therefore, all progress > depends on the unreasonable." -- George Bernard Shaw > > [demime 0.99c.7 removed an attachment of type APPLICATION/x-sun-shell-script which had a name of config.sh] > `sh cflags "optimize='-O'" miniperlmain.o` miniperlmain.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" perl.o` perl.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" gv.o` gv.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" toke.o` toke.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" perly.o` perly.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" op.o` op.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" regcomp.o` regcomp.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" dump.o` dump.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" util.o` util.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" mg.o` mg.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" reentr.o` reentr.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" hv.o` hv.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" av.o` av.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" run.o` run.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" pp_hot.o` pp_hot.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" sv.o` sv.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" pp.o` pp.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" scope.o` scope.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" pp_ctl.o` pp_ctl.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" pp_sys.o` pp_sys.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" doop.o` doop.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" doio.o` doio.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" regexec.o` regexec.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" utf8.o` utf8.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" taint.o` taint.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" deb.o` deb.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" universal.o` universal.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" xsutils.o` xsutils.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" globals.o` globals.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" perlio.o` perlio.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" perlapi.o` perlapi.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" numeric.o` numeric.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" locale.o` locale.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" pp_pack.o` pp_pack.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > `sh cflags "optimize='-O'" pp_sort.o` pp_sort.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > rm -f libperl.a > /usr/local/bin/ar rcu libperl.a perl.o gv.o toke.o perly.o op.o regcomp.o dump.o util.o mg.o reentr.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o locale.o pp_pack.o pp_sort.o > rm -f opmini.c > cp op.c opmini.c > `sh cflags "optimize='-O'" opmini.o` -DPERL_EXTERNAL_GLOB opmini.c > CCCMD = gcc -DPERL_CORE -c -fno-strict-aliasing -mcpu=v9 -m64 -mcpu=v9 -m64 -Wa,-xarch=v9 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -Wall > rm -f opmini.c > gcc -L/usr/lib/sparcv9 -L/usr/local/lib -o miniperl \ > miniperlmain.o opmini.o libperl.a > /usr/local/lib/gcc-lib/sparcv9-sun-solaris2.8/3.2.1/../../../../sparcv9-sun-sola ris2.8/bin/ld: skipping incompatible /usr/local/lib/libgcc.so when searching for -lgcc > /usr/local/lib/gcc-lib/sparcv9-sun-solaris2.8/3.2.1/../../../../sparcv9-sun-sola ris2.8/bin/ld: skipping incompatible /usr/local/lib/libgcc.so when searching for -lgcc > libperl.a(util.o): In function `Perl_my_socketpair': > util.o(.text+0x6270): undefined reference to `socketpair' > libperl.a(pp.o): In function `Perl_pp_pow': > pp.o(.text+0x3d78): undefined reference to `pow' > libperl.a(pp.o): In function `Perl_pp_modulo': > pp.o(.text+0x4bcc): undefined reference to `floor' > pp.o(.text+0x4c08): undefined reference to `floor' > pp.o(.text+0x4c84): undefined reference to `fmod' > libperl.a(pp.o): In function `Perl_pp_atan2': > pp.o(.text+0xb274): undefined reference to `atan2' > libperl.a(pp.o): In function `Perl_pp_sin': > pp.o(.text+0xb420): undefined reference to `sin' > libperl.a(pp.o): In function `Perl_pp_cos': > pp.o(.text+0xb60c): undefined reference to `cos' > libperl.a(pp.o): In function `Perl_pp_exp': > pp.o(.text+0xbc90): undefined reference to `exp' > libperl.a(pp.o): In function `Perl_pp_log': > pp.o(.text+0xbed0): undefined reference to `log' > libperl.a(pp.o): In function `Perl_pp_sqrt': > pp.o(.text+0xc124): undefined reference to `sqrt' > libperl.a(pp_sys.o): In function `Perl_pp_sysread': > pp_sys.o(.text+0x6398): undefined reference to `recvfrom' > libperl.a(pp_sys.o): In function `Perl_pp_send': > pp_sys.o(.text+0x7210): undefined reference to `sendto' > pp_sys.o(.text+0x7230): undefined reference to `send' > libperl.a(pp_sys.o): In function `Perl_pp_socket': > pp_sys.o(.text+0x8d20): undefined reference to `socket' > libperl.a(pp_sys.o): In function `Perl_pp_sockpair': > pp_sys.o(.text+0x9268): undefined reference to `socketpair' > libperl.a(pp_sys.o): In function `Perl_pp_bind': > pp_sys.o(.text+0x95f8): undefined reference to `bind' > libperl.a(pp_sys.o): In function `Perl_pp_connect': > pp_sys.o(.text+0x98ac): undefined reference to `connect' > libperl.a(pp_sys.o): In function `Perl_pp_listen': > pp_sys.o(.text+0x9b0c): undefined reference to `listen' > libperl.a(pp_sys.o): In function `Perl_pp_accept': > pp_sys.o(.text+0x9dac): undefined reference to `accept' > libperl.a(pp_sys.o): In function `Perl_pp_shutdown': > pp_sys.o(.text+0xa1c8): undefined reference to `shutdown' > libperl.a(pp_sys.o): In function `Perl_pp_ssockopt': > pp_sys.o(.text+0xa53c): undefined reference to `getsockopt' > pp_sys.o(.text+0xa604): undefined reference to `setsockopt' > libperl.a(pp_sys.o): In function `Perl_pp_getpeername': > pp_sys.o(.text+0xa8b0): undefined reference to `getsockname' > pp_sys.o(.text+0xa8c4): undefined reference to `getpeername' > libperl.a(pp_sys.o): In function `Perl_pp_gnetent': > pp_sys.o(.text+0x126a8): undefined reference to `getnetbyname' > pp_sys.o(.text+0x1271c): undefined reference to `getnetbyaddr' > pp_sys.o(.text+0x1272c): undefined reference to `getnetent' > pp_sys.o(.text+0x12758): undefined reference to `h_errno' > pp_sys.o(.text+0x1275c): undefined reference to `h_errno' > pp_sys.o(.text+0x12764): undefined reference to `h_errno' > pp_sys.o(.text+0x1276c): undefined reference to `h_errno' > libperl.a(pp_sys.o): In function `Perl_pp_gprotoent': > pp_sys.o(.text+0x12a38): undefined reference to `getprotobyname' > pp_sys.o(.text+0x12a78): undefined reference to `getprotobynumber' > pp_sys.o(.text+0x12a88): undefined reference to `getprotoent' > libperl.a(pp_sys.o): In function `Perl_pp_gservent': > pp_sys.o(.text+0x12d78): undefined reference to `getservbyname' > pp_sys.o(.text+0x12e08): undefined reference to `getservbyport' > pp_sys.o(.text+0x12e18): undefined reference to `getservent' > libperl.a(pp_sys.o): In function `Perl_pp_snetent': > pp_sys.o(.text+0x130ac): undefined reference to `setnetent' > libperl.a(pp_sys.o): In function `Perl_pp_sprotoent': > pp_sys.o(.text+0x13158): undefined reference to `setprotoent' > libperl.a(pp_sys.o): In function `Perl_pp_sservent': > pp_sys.o(.text+0x13204): undefined reference to `setservent' > libperl.a(pp_sys.o): In function `Perl_pp_enetent': > pp_sys.o(.text+0x132c0): undefined reference to `endnetent' > libperl.a(pp_sys.o): In function `Perl_pp_eprotoent': > pp_sys.o(.text+0x1337c): undefined reference to `endprotoent' > libperl.a(pp_sys.o): In function `Perl_pp_eservent': > pp_sys.o(.text+0x13438): undefined reference to `endservent' > libperl.a(doio.o): In function `Perl_do_openn': > doio.o(.text+0x1a10): undefined reference to `getsockname' > libperl.a(pp_pack.o): In function `Perl_pack_cat': > pp_pack.o(.text+0x84b4): undefined reference to `floor' > pp_pack.o(.text+0x84e4): undefined reference to `floor' > collect2: ld returned 1 exit status > make: *** [miniperl] Error 1 > _______________________________________________ > sunmanagers mailing list > sunmanagers@sunmanagers.org > http://www.sunmanagers.org/mailman/listinfo/sunmanagers << All opinions expressed are mine, not the University's >> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= David Foster National Center for Microscopy and Imaging Research Programmer/Analyst University of California, San Diego dfoster[at]ucsd[dot]edu Department of Neuroscience, Mail 0608 (858) 534-7968 http://ncmir.ucsd.edu/ =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable." -- George Bernard Shaw _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived on Tue Jul 8 14:17:31 2003
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:15 EST