[CMake] Sun GCC builds (cooltools)
George Neill
georgen at neillnet.com
Thu Mar 20 14:24:34 EDT 2008
Brad,
> The bootstrap is not supposed to define that macro. During a normal
> build it is defined in "cmConfigure.h" but the config header written by
> the bootstrap (in Bootstrap.cmk/cmConfigure.h) does not define it. Are
> you sure it was a clean checkout? Could there be a stale cmConfigure.h
> in the source tree left from the in-source build with Sun CC?
You are absolutely right. With a fresh checkout/compile this morning
I didn't get that error when bootstrapping ... I should have double
checked before posting, my apologies.
The make however does fail still,
/export/home/gneill/src/CMake/Utilities/cmcurl/strerror.c:28:2: error:
#error "you MUST have either POSIX or glibc strerror_r if strerror_r
is found"
/export/home/gneill/src/CMake/Utilities/cmcurl/strerror.c: In function
'Curl_strerror':
/export/home/gneill/src/CMake/Utilities/cmcurl/strerror.c:649:
warning: initialization makes pointer from integer without a cast
*** Error code 1
The following command caused the error:
cd /export/home/gneill/src/CMake/Utilities/cmcurl && /opt/gcc/bin/gcc
-DCURL_STATICLIB -DHAVE_CONFIG_H -DCURL_STATICLIB
-I/export/home/gneill/src/CMake/Utilities -I/e
xport/home/gneill/src/CMake/Utilities/cmcurl -o
CMakeFiles/cmcurl.dir/strerror.o -c
/export/home/gneill/src/CMake/Utilities/cmcurl/strerror.c
make: Fatal error: Command failed for target
`Utilities/cmcurl/CMakeFiles/cmcurl.dir/strerror.o'
Current working directory /export/home/gneill/src/CMake
Here's a snippet definition from /usr/include/string.h
#if defined(__STDC__)
#if defined(__EXTENSIONS__) || \
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
defined(_XPG6) || defined(_REENTRANT)
extern int strerror_r(int, char *, size_t);
#endif
.
.
.
#else /* __STDC__ */
#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
defined(_XPG6) || defined(_REENTRANT)
extern int strerror_r();
#endif
.
.
.
#endif /* __STDC__ */
My guess is that cmake should probably -D_REENTRANT (on sun) when
building cmcurl.
Later,
George.
More information about the CMake
mailing list