Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Trouble Compiling

by JSchmitz (Canon)
on Dec 27, 2001 at 19:42 UTC ( #134613=perlquestion: print w/replies, xml ) Need Help??

JSchmitz has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to compile Perl 5.6.1 on a fresh out of the box Sun Blade 100 running Solaris 8. When I run 'make' I get this error after a little bit:

ld: fatal: Symbol referencing errors. No output written to miniperl
collect2: ld returned 1 exit status
make: *** miniperl Error 1

I realize that "ld" means it is some kind of library issue but don't know what. I am passing it the correct path to all the library files can't find any docs on this problem either any help would be stellar - cheers


Replies are listed 'Best First'.
Re: Trouble Compiling
by robin (Chaplain) on Dec 27, 2001 at 19:57 UTC
    Check out the README.solaris file in your Perl distribution for a detailed breakdown of possible problems. I'll make one guess though:

    Do you have oldish versions of GNU as and/or ld installed? Try putting /usr/ccs/bin at the front of your PATH before you try the compile. Do a make distclean and start the whole process again. Run Configure with the switch -Dcc=gcc.

    GNU ld never used to work properly on Solaris with Perl. I think they've fixed it recently, but maybe you have an old version. The native ld is in /usr/ccs/bin, so if that's first in the path that's the one that'll be used.

Re: Trouble Compiling
by descartes (Friar) on Dec 27, 2001 at 20:25 UTC

    Actually, most of the things that come out of the box with Solaris 8 don't work right.

    For the record, ld is the object linker, so while it may have something to do with libraries, more likely it has to do with the object code you are creating.

    Your problem may be with the linker, and it may be with the way your compiler is creating the bitcode. Either way, a quick and (in my opinion) permanent fix would be to (as suggested above) move /usr/local/bin and /usr/local/sbin before /usr/ccs/bin and/or /usr/ucb/bin in your path.

    Then, run, don't walk, to the ibiblio Solaris archives and get some newer tools. Recent compiles of a large number of tools are available there, including gcc, gdb, and so forth.

    You can find it here:

    Hope this helps.

    Rene Descartes
    -- Programmus, ergo sum.

Re: Trouble Compiling
by grinder (Bishop) on Dec 27, 2001 at 19:51 UTC
    I suspect this is weird Solaris magic at work. Make sur that /usr/ucb/bin precedes /usr/ccs/bin. I think you must be picking up /usr/ccs/bin/ld instead of /usr/ucb/bin/ld. Or something like that, the details are hazy. Do a find(1) to see where different copies of ld are installed.

    g r i n d e r
    just another bofh

    print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u';
Re: Trouble Compiling
by oneiros (Scribe) on Dec 27, 2001 at 20:22 UTC
    hedo. If you are running gcc 2.95.x, make sure you are using /usr/ccs/bin/ld. If you're using gcc3.0.x, try using gnu ld (normally /usr/local/bin/ld). Adjust the order of your $PATH to ensure you're using the correct ld for your setup. HTH.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://134613]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2023-05-30 21:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found