[CMake] Problem building 2.4.6 on AIX using xlr_c 6
Kent Boortz
kent at mysql.com
Thu Mar 1 21:13:23 EST 2007
Hi,
I could not compile released "cmake-2.4.6" on AIX 5.2 using xlr_c
6.0.0. The problem is that some headers are included first and later
"zconf.h" that will in this setup do
#define const
This will in effect remove all const declarations after this point.
The compile continues with defining the fuctions and then detect that
the declaration and definition doesn't match. The error message is a
bit strange (there is no explicit "unsigned" in the source), likely a
small flaw in the compiler
"Utilities/cmcurl/strerror.c", line 45.1: 1506-343 (S) Redeclaration of curl_easy_strerror differs from previous declaration on line 1318 of "Utilities/cmcurl/curl/curl.h".
"Utilities/cmcurl/strerror.c", line 45.1: 1506-050 (I) Return type "unsigned char*" in redeclaration is not compatible with the previous return type "const unsigned char*".
"Utilities/cmcurl/strerror.c", line 254.1: 1506-343 (S) Redeclaration of curl_multi_strerror differs from previous declaration on line 215 of "Utilities/cmcurl/curl/multi.h".
"Utilities/cmcurl/strerror.c", line 254.1: 1506-050 (I) Return type "unsigned char*" in redeclaration is not compatible with the previous return type "const unsigned char*".
"Utilities/cmcurl/strerror.c", line 283.1: 1506-343 (S) Redeclaration of curl_share_strerror differs from previous declaration on line 1329 of "Utilities/cmcurl/curl/curl.h".
"Utilities/cmcurl/strerror.c", line 283.1: 1506-050 (I) Return type "unsigned char*" in redeclaration is not compatible with the previous return type "const unsigned char*".
To force it to compile, I removed the define of "const" to be empty
*** Utilities/cmzlib/zconf.h.ORIG Fri Mar 2 02:58:17 2007
--- Utilities/cmzlib/zconf.h Fri Mar 2 03:04:27 2007
***************
*** 89,100 ****
# endif
#endif
- #ifndef STDC
- # ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
- # define const
- # endif
- #endif
-
/* Some Mac compilers merge all .h files incorrectly: */
#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
# define NO_DUMMY_DECL
--- 89,94 ----
I understand this is not a permanent solution, just pointing out the
problem and the work around that makes it compile in this case,
kent
--
Kent Boortz, Senior Software Developer
MySQL AB, www.mysql.com
Office: +46 18 174400 ext. 4450 (VoIP)
Office: +46 19 182931
Mobile: +46 70 2791171
More information about the CMake
mailing list