[SunHELP] Unable to ' -static' compile programs with gcc

Sandwich Maker adh at an.bradford.ma.us
Wed Oct 26 16:51:04 CDT 2005


" From: fabio <fabio at crearium.com>
" 
" Sandwich Maker wrote:
" 
" >" From: fabio <fabio at crearium.com>
" >" 
" >" hello,
" >" 
" >" -bash-3.00$ cat 1.c;\gcc -static -ggdb 1.c -o 1
" >" main(){
" >"       printf("hello world\n");
" >" }
" >" ld: fatal: library -lc: not found
" >" ld: fatal: library -lc: not found
" >" ld: fatal: File processing errors. No output written to 1
" >" collect2: ld returned 1 exit status
" >" 
" >" -bash-3.00$ find / -name "libc.so.1" -print 2>/dev/null
" >" /usr/lib/sparcv9/libc.so.1
" >" /usr/lib/libc.so.1
" >" /usr/lib/libp/libc.so.1
" >" /usr/lib/libp/sparcv9/libc.so.1
" >" /lib/sparcv9/libc.so.1
" >" /lib/libc.so.1
" >
" >these are dynamic; static would be libc.a
" >
" >" -bash-3.00$ uname -srm
" >" SunOS 5.10 sun4u
" >" 
" >" The option -g works fine but I need the option ggdb. Option -static 
" >" doesnt work either. But It compiles ok if no option is given.
" >
" >sun's position on late-model solarii is that static binaries and
" >static linking are passe'.  unless gcc comes with its own libc you're
" >out of luck.  i don't think sun's forte compiler comes with static
" >libs either.
" >  
" >
" I dont understand, we cant build static binaries in Solaris sparc ?

not any more.

" Any workaround?

build in an earlier solaris environmant that still supports static.  i
posted that in my first reply.
________________________________________________________________________
Andrew Hay                                  the genius nature
internet rambler                            is to see what all have seen
adh at an.bradford.ma.us                       and think what none thought



More information about the SunHELP mailing list