[CMake] Sun GCC builds (cooltools)

George Neill georgen at neillnet.com
Fri Mar 21 07:29:15 EDT 2008


Brad,

More info compiling with SUN GCC 4.2 (cooltools) on sun sparc.

I think I have narrowed it to HAVE_POSIX_STRERROR_R not being defined
in Utilities/cmcurl.  It seems strange since it compiles and produces
the expected results when I do it by hand.

-bash-3.00$ env | grep CC
CC=/opt/gcc/bin/gcc
-bash-3.00$ $CC -DHAVE_POSIX_STRERROR_R CurlTests.c
-bash-3.00$ ./a.out
-bash-3.00$ ./a.out ; echo $?
0

This appears to be the cause of my troubles,

Linking C executable cmTryCompileExec
/export/home/gneill/src/build/Bootstrap.cmk/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1
/opt/gcc/bin/gcc      -DHAVE_POSIX_STRERROR_R  -fPIC
CMakeFiles/cmTryCompileExec.dir/CurlTests.c.o  -o cmTryCompileExec
-ldl -lsocket -lnsl -lcrypto -lssl
ld.so.1: cmTryCompileExec: fatal: libcrypto.so.0.9.7: open failed: No
such file or directory
Child killed

libcrypto.so.0.9.7 and libssl.so.0.9.7 are in /usr/sfw/lib on my
system (but they are certainly not in my LD_LIBRARY_PATH or system
path)  so I am not sure why it's trying to use those.


-bash-3.00$ crle

Default configuration file (/var/ld/ld.config) not found
  Default Library Path (ELF):   /lib:/usr/lib  (system default)
  Trusted Directories (ELF):    /lib/secure:/usr/lib/secure  (system default)
-bash-3.00$ echo $LD_LIBRARY_PATH


I will do some more digging ...

Thanks,
George.


More information about the CMake mailing list