0

我正在尝试为 ARM 机器(3ds)构建 OpenAL-Soft,当 CHECK_SYMBOL_EXISTS 无法及时找到 nanosleep 函数时,它会在 cmake 过程中停止。您尝试在 CMakeLists.txt 中评论错误以查看会发生什么以及 cmake进程有效,但未找到导致编译错误的 pthread.h 相关函数。

我使用 OpenAl soft 的最新提交,我在旧版本中尝试过但同样的问题。使用 x86 GNU linux 编译器构建工作正常。

我正在使用这个工具链文件。

这是 CMakeError.log 的最后一部分:

Determining if the aligned_alloc exist failed with the following output:
Change Dir: /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f69e3/fast"
/usr/bin/make -f CMakeFiles/cmTC_f69e3.dir/build.make CMakeFiles/cmTC_f69e3.dir/build
make[1]: se ingresa al directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj
/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc  -DARM11 -D_3DS  -fno-gnu89-inline -std=c11  -mword-relocations -march=armv6k -mtune=mpcore -mfloat-abi=hard  -mtp=soft   -D_LARGEFILE_SOURCE -D_LARGE_FILES   -o CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj   -c /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: 'aligned_alloc' undeclared (first use in this function)
   return ((int*)(&aligned_alloc))[argc];
                   ^
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj] Error 1
make[1]: se sale del directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
make: *** [cmTC_f69e3/fast] Error 2

File /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdlib.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef aligned_alloc
  return ((int*)(&aligned_alloc))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the posix_memalign exist failed with the following output:
Change Dir: /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f69e3/fast"
/usr/bin/make -f CMakeFiles/cmTC_f69e3.dir/build.make CMakeFiles/cmTC_f69e3.dir/build
make[1]: se ingresa al directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj
/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc  -DARM11 -D_3DS  -fno-gnu89-inline -std=c11  -mword-relocations -march=armv6k -mtune=mpcore -mfloat-abi=hard  -mtp=soft   -D_LARGEFILE_SOURCE -D_LARGE_FILES   -o CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj   -c /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: 'posix_memalign' undeclared (first use in this function)
   return ((int*)(&posix_memalign))[argc];
                   ^
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj] Error 1
make[1]: se sale del directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
make: *** [cmTC_f69e3/fast] Error 2

File /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <stdlib.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef posix_memalign
  return ((int*)(&posix_memalign))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the _aligned_malloc exist failed with the following output:
Change Dir: /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f69e3/fast"
/usr/bin/make -f CMakeFiles/cmTC_f69e3.dir/build.make CMakeFiles/cmTC_f69e3.dir/build
make[1]: se ingresa al directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj
/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc  -DARM11 -D_3DS  -fno-gnu89-inline -std=c11  -mword-relocations -march=armv6k -mtune=mpcore -mfloat-abi=hard  -mtp=soft   -D_LARGEFILE_SOURCE -D_LARGE_FILES   -o CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj   -c /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: '_aligned_malloc' undeclared (first use in this function)
   return ((int*)(&_aligned_malloc))[argc];
                   ^
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj] Error 1
make[1]: se sale del directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
make: *** [cmTC_f69e3/fast] Error 2

File /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <malloc.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef _aligned_malloc
  return ((int*)(&_aligned_malloc))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the _controlfp exist failed with the following output:
Change Dir: /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f69e3/fast"
/usr/bin/make -f CMakeFiles/cmTC_f69e3.dir/build.make CMakeFiles/cmTC_f69e3.dir/build
make[1]: se ingresa al directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj
/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc  -DARM11 -D_3DS  -fno-gnu89-inline -std=c11  -mword-relocations -march=armv6k -mtune=mpcore -mfloat-abi=hard  -mtp=soft   -D_LARGEFILE_SOURCE -D_LARGE_FILES   -o CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj   -c /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: '_controlfp' undeclared (first use in this function)
   return ((int*)(&_controlfp))[argc];
                   ^
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj] Error 1
make[1]: se sale del directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
make: *** [cmTC_f69e3/fast] Error 2

File /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <float.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef _controlfp
  return ((int*)(&_controlfp))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the __control87_2 exist failed with the following output:
Change Dir: /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f69e3/fast"
/usr/bin/make -f CMakeFiles/cmTC_f69e3.dir/build.make CMakeFiles/cmTC_f69e3.dir/build
make[1]: se ingresa al directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj
/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc  -DARM11 -D_3DS  -fno-gnu89-inline -std=c11  -mword-relocations -march=armv6k -mtune=mpcore -mfloat-abi=hard  -mtp=soft   -D_LARGEFILE_SOURCE -D_LARGE_FILES   -o CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj   -c /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: '__control87_2' undeclared (first use in this function)
   return ((int*)(&__control87_2))[argc];
                   ^
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTC_f69e3.dir/CheckSymbolExists.c.obj] Error 1
make[1]: se sale del directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
make: *** [cmTC_f69e3/fast] Error 2

File /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <float.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef __control87_2
  return ((int*)(&__control87_2))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the include file windows.h exists failed with the following output:
Change Dir: /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f69e4/fast"
/usr/bin/make -f CMakeFiles/cmTC_f69e4.dir/build.make CMakeFiles/cmTC_f69e4.dir/build
make[1]: se ingresa al directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_f69e4.dir/CheckIncludeFile.c.obj
/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc  -DARM11 -D_3DS  -fno-gnu89-inline -std=c11  -mword-relocations -march=armv6k -mtune=mpcore -mfloat-abi=hard  -mtp=soft  -D_WIN32_WINNT=0x0502  -D_LARGEFILE_SOURCE -D_LARGE_FILES   -o CMakeFiles/cmTC_f69e4.dir/CheckIncludeFile.c.obj   -c /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckIncludeFile.c:1:21: fatal error: windows.h: No such file or directory
 #include <windows.h>
                     ^
compilation terminated.
make[1]: *** [CMakeFiles/cmTC_f69e4.dir/CheckIncludeFile.c.obj] Error 1
make[1]: se sale del directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
make: *** [cmTC_f69e4/fast] Error 2


Determining if the nanosleep exist failed with the following output:
Change Dir: /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_f69e4/fast"
/usr/bin/make -f CMakeFiles/cmTC_f69e4.dir/build.make CMakeFiles/cmTC_f69e4.dir/build
make[1]: se ingresa al directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
Building C object CMakeFiles/cmTC_f69e4.dir/CheckSymbolExists.c.obj
/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc  -DARM11 -D_3DS  -fno-gnu89-inline -std=c11  -mword-relocations -march=armv6k -mtune=mpcore -mfloat-abi=hard  -mtp=soft   -D_LARGEFILE_SOURCE -D_LARGE_FILES   -o CMakeFiles/cmTC_f69e4.dir/CheckSymbolExists.c.obj   -c /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function 'main':
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: 'nanosleep' undeclared (first use in this function)
   return ((int*)(&nanosleep))[argc];
                   ^
/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [CMakeFiles/cmTC_f69e4.dir/CheckSymbolExists.c.obj] Error 1
make[1]: se sale del directorio «/home/sdk/openal-soft/build/CMakeFiles/CMakeTmp»
make: *** [cmTC_f69e4/fast] Error 2

File /home/sdk/openal-soft/build/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <time.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef nanosleep
  return ((int*)(&nanosleep))[argc];
#else
  (void)argc;
  return 0;
#endif
}  
4

0 回答 0