On Wednesday 23 April 2008, you wrote:
> > So, I don't understand why this isn't discovering that these types have
> > been declared. Can anyone offer some insight?
>
> Best thing to do is to use --debug-trycompile. 

Thanks for the tip. The outcome, however, is not at all what I expected. Check 
this out (sorry that the line wrapping will make the shell command look 
weird):

[EMAIL PROTECTED]:/tmp/build-intl$ rm -r *
[EMAIL PROTECTED]:/tmp/build-intl$ cmake --debug-trycompile 
~/src/tux4kids/tuxmath/trunk/intl/
debug trycompile on
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Looking for iconv
-- Looking for iconv - found
-- Found iconv library:
-- CMAKE_REQUIRED_INCLUDES:
-- CMAKE_REQUIRED_INCLUDES: /usr/include
-- Looking for include files HAVE_INTTYPES_H
-- Looking for include files HAVE_INTTYPES_H - found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for asprintf
-- Looking for asprintf - found
-- Looking for wprintf
-- Looking for wprintf - found
-- Looking for printf
-- Looking for printf - found
-- Looking for intmax_t
-- Looking for intmax_t - found
-- Looking for uintmax_t
-- Looking for uintmax_t - found
-- Looking for LC_MESSAGES
-- Looking for LC_MESSAGES - found
-- Check size of intmax_t
-- Check size of intmax_t - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/build-intl

It works! It works! Now I don't have to debug anything, since it suddenly 
works. So, let's turn off the debugging:

[EMAIL PROTECTED]:/tmp/build-intl$ rm -r *
[EMAIL PROTECTED]:/tmp/build-intl$ cmake ~/src/tux4kids/tuxmath/trunk/intl/
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Looking for iconv
-- Looking for iconv - found
-- Found iconv library:
-- CMAKE_REQUIRED_INCLUDES:
-- CMAKE_REQUIRED_INCLUDES: /usr/include
-- Looking for include files HAVE_INTTYPES_H
-- Looking for include files HAVE_INTTYPES_H - found
-- Looking for snprintf
-- Looking for snprintf - found
-- Looking for asprintf
-- Looking for asprintf - not found.
-- Looking for wprintf
-- Looking for wprintf - not found.
-- Looking for printf
-- Looking for printf - found
-- Looking for intmax_t
-- Looking for intmax_t - not found.
-- Looking for uintmax_t
-- Looking for uintmax_t - not found.
-- Looking for LC_MESSAGES
-- Looking for LC_MESSAGES - found
-- Check size of intmax_t
-- Check size of intmax_t - failed
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/build-intl

It's perfectly reproducible: I can repeat either way many times, and it works 
only with debug-trycompile on.

I examined the CMakeError.log. It's my first time looking at it, so I don't 
really know what I expect to see, but it doesn't seem to be weird: it looks 
like it tried to compile a file and encountered an undefined symbol. I just 
don't know why. I'm attaching both the error & output logs, just in case your 
far more experienced eyes catch anything.

I can try to reduce to a more minimal test case and send the required files to 
the list if that would be useful.

Best,
--Tim
Determining if the asprintf exist failed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o   -c /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: ‘asprintf’ undeclared (first use in this function)
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: (Each undeclared identifier is reported only once
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: for each function it appears in.)
make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o] Error 1
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2

File /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdio.h>

void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef asprintf
  cmakeRequireSymbol(0,&asprintf);
#endif
  return 0;
}

Determining if the wprintf exist failed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o   -c /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: ‘wprintf’ undeclared (first use in this function)
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: (Each undeclared identifier is reported only once
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: for each function it appears in.)
make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o] Error 1
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2

File /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdio.h>

void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef wprintf
  cmakeRequireSymbol(0,&wprintf);
#endif
  return 0;
}

Determining if the intmax_t exist failed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o   -c /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: expected expression before ‘intmax_t’
make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o] Error 1
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2

File /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdint.h>

void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef intmax_t
  cmakeRequireSymbol(0,&intmax_t);
#endif
  return 0;
}

Determining if the uintmax_t exist failed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o   -c /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8: error: expected expression before ‘uintmax_t’
make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o] Error 1
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2

File /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdint.h>

void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef uintmax_t
  cmakeRequireSymbol(0,&uintmax_t);
#endif
  return 0;
}

Determining size of intmax_t failed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSize.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSize.o   -c /tmp/build-intl/CMakeFiles/CMakeTmp/CheckTypeSize.c
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckTypeSize.c: In function ‘main’:
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckTypeSize.c:27: error: ‘intmax_t’ undeclared (first use in this function)
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckTypeSize.c:27: error: (Each undeclared identifier is reported only once
/tmp/build-intl/CMakeFiles/CMakeTmp/CheckTypeSize.c:27: error: for each function it appears in.)
make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckTypeSize.o] Error 1
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2

CheckTypeSize.c:
#define CHECK_TYPE_SIZE_TYPE intmax_t
#ifdef CHECK_TYPE_SIZE_TYPE


#ifdef HAVE_SYS_TYPES_H
#  include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */

#ifdef HAVE_STDINT_H
#  include <stdint.h>
#endif /* HAVE_STDINT_H */

#ifdef HAVE_STDDEF_H
#  include <stddef.h>
#endif /* HAVE_STDDEF_H */



#ifdef __CLASSIC_C__
int main(){
  int ac;
  char*av[];
#else
int main(int ac, char*av[]){
#endif
  if(ac > 1000){return *av[0];}
  return sizeof(CHECK_TYPE_SIZE_TYPE);
}

#else  /* CHECK_TYPE_SIZE_TYPE */

#  error "CHECK_TYPE_SIZE_TYPE has to specify the type"

#endif /* CHECK_TYPE_SIZE_TYPE */


The system is: Linux - 2.6.24-16-generic - unknown
Determining if the C compiler is GNU succeeded with the following output:
# 1 "/usr/share/cmake-2.4/Modules/CMakeTestGNU.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/share/cmake-2.4/Modules/CMakeTestGNU.c"

void THIS_IS_GNU();

Determining if the C++ compiler is GNU succeeded with the following output:
# 1 "/usr/share/cmake-2.4/Modules/CMakeTestGNU.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/share/cmake-2.4/Modules/CMakeTestGNU.c"

void THIS_IS_GNU();

Determining if the C compiler works passed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.o   -c /tmp/build-intl/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/gcc        -fPIC "CMakeFiles/cmTryCompileExec.dir/testCCompiler.o"   -o cmTryCompileExec -rdynamic 
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'


Determining size of void* passed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckTypeSize.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckTypeSize.o   -c /tmp/build-intl/CMakeFiles/CMakeTmp/CheckTypeSize.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/gcc        -fPIC "CMakeFiles/cmTryCompileExec.dir/CheckTypeSize.o"   -o cmTryCompileExec -rdynamic 
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'


Determining if the CXX compiler works passed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building CXX object CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.o
/usr/bin/c++    -o CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.o -c /tmp/build-intl/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTryCompileExec
/usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/c++         -fPIC "CMakeFiles/cmTryCompileExec.dir/testCXXCompiler.o"   -o cmTryCompileExec -rdynamic 
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'


Determining if the function iconv exists passed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.o
/usr/bin/gcc  -DCHECK_FUNCTION_EXISTS=iconv   -o CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.o   -c /usr/share/cmake-2.4/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/gcc      -DCHECK_FUNCTION_EXISTS=iconv  -fPIC "CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.o"   -o cmTryCompileExec -rdynamic 
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'


Determining if the snprintf exist passed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o   -c /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/gcc        -fPIC "CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o"   -o cmTryCompileExec -rdynamic 
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'

File /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdio.h>

void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef snprintf
  cmakeRequireSymbol(0,&snprintf);
#endif
  return 0;
}

Determining if the printf exist passed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o   -c /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/gcc        -fPIC "CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o"   -o cmTryCompileExec -rdynamic 
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'

File /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdio.h>

void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef printf
  cmakeRequireSymbol(0,&printf);
#endif
  return 0;
}

Determining if the LC_MESSAGES exist passed with the following output:
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory `/tmp/build-intl/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report /tmp/build-intl/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o
/usr/bin/gcc   -o CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o   -c /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec
/usr/bin/cmake -P CMakeFiles/cmTryCompileExec.dir/cmake_clean_target.cmake
/usr/bin/gcc        -fPIC "CMakeFiles/cmTryCompileExec.dir/CheckSymbolExists.o"   -o cmTryCompileExec -rdynamic 
make[1]: Leaving directory `/tmp/build-intl/CMakeFiles/CMakeTmp'

File /tmp/build-intl/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <locale.h>

void cmakeRequireSymbol(int dummy,...){(void)dummy;}
int main()
{
#ifndef LC_MESSAGES
  cmakeRequireSymbol(0,&LC_MESSAGES);
#endif
  return 0;
}

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to