0

Im trying to build OpenAL-Soft for an ARM machine (the 3ds) and it stops in the cmake process when CHECK_SYMBOL_EXISTS can't find nanosleep function in time.h i tried commenting the error in CMakeLists.txt to see what would happen and the cmake process works but pthread.h related functions aren't found which causes errors in compilation.

Im using the latest commit from OpenAl soft, i've tried in older versions but same problem. Building with x86 GNU linux compiler works fine.

Im using this toolchain file.

Here's the last part of the 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
}  
Mikiko9
  • 3
  • 1
  • 3
  • Looks like a problem with your toolchain. Find `time.h` header in it (somewhere under `/opt/devkitpro/devkitARM/`) and check whether it provides `nanosleep` function or macro. – Tsyvarev May 08 '17 at 17:22
  • It does. Here's [time.h](https://pastebin.com/AgGXWqdc) – Mikiko9 May 08 '17 at 20:00
  • Well, so you have source file and compilation command line which fails. Have you tried to compile this source manually (with cross-compiler)? – Tsyvarev May 08 '17 at 20:18
  • What do you mean by manually? – Mikiko9 May 08 '17 at 20:43
  • Run compiler with the same options as in command line with the same source file. And see whether it will compile or not. – Tsyvarev May 08 '17 at 22:57

0 Answers0