I think you are right, an issue with nanosleep would make a lot of sense. I did not need to make the change for nanosleep, and that would mean it is in the libc... which fails to build statically.
I am going to find out a previous version of Solaris or OpenSolaris to test it out. Thanks. Le 06/11/2011 07:20, Matt Johnston a écrit : > I think you cannot build static programs on Solaris. From the > cc manpage > > Note: Many system libraries, such as libc, are only > available as dynamic libraries in the Solaris 64-bit > compilation environment. Therefore, do not use -Bstatic > as the last toggle on the command line. > > I guess it's similar to Linux except glibc will link then fail at runtime :) > > Antony mentioned needing the realtime library for nanosleep, > but to me it looks like it's in the main libc on Solaris 11. > Did you need to change that? > > Cheers, > Matt > > On Sat, Nov 05, 2011 at 06:01:13PM +0100, phocean wrote: >> Hi all, >> >> I am trying to compile scp on Solaris 11. >> >> So far I faced the same issue as Antony with u_int64_t, but the >> workaround was easy. >> >> Now it fails like this : >> >> $ make PROGRAMS="scp" STATIC=1 >> gcc -L/usr/local/lib -R/usr/local/lib -static -o scp scp.o >> progressmeter.o atomicio.o scpmisc.o compat.o >> ld: fatal: library -lc: not found >> ld: fatal: file processing errors. No output written to scp >> collect2: ld returned 1 exit status >> make: *** [scp] Erreur 1 >> >> Obviously /usr/lib is not the correct path, but what is this library it >> is complaining about? >> I tried in vain to adjust this path to /usr/lib and /lib. >> Any idea? >> >> Sadly I know little about Solaris and programming stuff... >> >> Thank you in advance, >> >> Best regards, >> -- >> phocean -- phocean