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

fabio fabio at crearium.com
Wed Oct 26 02:55:21 CDT 2005


-bash-3.00$ cat 1.c;\gcc -static -ggdb 1.c -o 1
      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

-bash-3.00$ echo $LD_LIBRARY_PATH ; \gcc -v

Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as 
--with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.4.2

-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.

Sorry for the offtopic, any help will be appreciatted.


More information about the SunHELP mailing list