Wyrmgus
Wyrmgus copied to clipboard
Cmake error on Fedora 29
CFLAGS and CXXFLAGS is set to “/usr/include/SDL2” because otherwise it complains that the header “SDL_video.h” can not be found. Package “SDL2_devel” and “SDL-devel” are installed. The following is the contents of “CMakeErrors.log” after doing “cmake .”. Version 1554c0d80fe0e177f6f93f7bf0e554b2f70409e7.
Determining size of SDL_OPENGLES, failed with the following output:
Change Dir: /home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_bd4ec/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_bd4ec.dir/build.make CMakeFiles/cmTC_bd4ec.dir/build
gmake[1]: se entra en el directorio '/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_bd4ec.dir/SDLGLES_NATIVE.c.o
/usr/lib64/ccache/cc -I/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/SDL -I/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/include/SDL -I/usr/include/SDL2 -o CMakeFiles/cmTC_bd4ec.dir/SDLGLES_NATIVE.c.o -c /home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:24:22: error: ‘SDL_OPENGLES’ no se declaró aquí (no en una función); ¿quiso decir ‘SDL_ENOMEM’?
#define SIZE (sizeof(SDL_OPENGLES,))
^~~~~~~~~~~~
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:26:12: nota: en expansión de macro ‘SIZE’
('0' + ((SIZE / 10000)%10)),
^~~~
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:24:35: error: expected expression before ‘)’ token
#define SIZE (sizeof(SDL_OPENGLES,))
^
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:26:12: nota: en expansión de macro ‘SIZE’
('0' + ((SIZE / 10000)%10)),
^~~~
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:24:35: error: expected expression before ‘)’ token
#define SIZE (sizeof(SDL_OPENGLES,))
^
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:27:12: nota: en expansión de macro ‘SIZE’
('0' + ((SIZE / 1000)%10)),
^~~~
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:24:35: error: expected expression before ‘)’ token
#define SIZE (sizeof(SDL_OPENGLES,))
^
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:28:12: nota: en expansión de macro ‘SIZE’
('0' + ((SIZE / 100)%10)),
^~~~
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:24:35: error: expected expression before ‘)’ token
#define SIZE (sizeof(SDL_OPENGLES,))
^
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:29:12: nota: en expansión de macro ‘SIZE’
('0' + ((SIZE / 10)%10)),
^~~~
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:24:35: error: expected expression before ‘)’ token
#define SIZE (sizeof(SDL_OPENGLES,))
^
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:30:12: nota: en expansión de macro ‘SIZE’
('0' + (SIZE % 10)),
^~~~
gmake[1]: *** [CMakeFiles/cmTC_bd4ec.dir/build.make:66: CMakeFiles/cmTC_bd4ec.dir/SDLGLES_NATIVE.c.o] Error 1
gmake[1]: se sale del directorio '/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_bd4ec/fast] Error 2
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/SDLGLES_NATIVE.c:
#include <sys/types.h>
#include <stdint.h>
#include <stddef.h>
#include "SDL_video.h"
#undef KEY
#if defined(__i386)
# define KEY '_','_','i','3','8','6'
#elif defined(__x86_64)
# define KEY '_','_','x','8','6','_','6','4'
#elif defined(__ppc__)
# define KEY '_','_','p','p','c','_','_'
#elif defined(__ppc64__)
# define KEY '_','_','p','p','c','6','4','_','_'
#elif defined(__aarch64__)
# define KEY '_','_','a','a','r','c','h','6','4','_','_'
#elif defined(__ARM_ARCH_7A__)
# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','A','_','_'
#elif defined(__ARM_ARCH_7S__)
# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','S','_','_'
#endif
#define SIZE (sizeof(SDL_OPENGLES,))
char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
('0' + ((SIZE / 10000)%10)),
('0' + ((SIZE / 1000)%10)),
('0' + ((SIZE / 100)%10)),
('0' + ((SIZE / 10)%10)),
('0' + (SIZE % 10)),
']',
#ifdef KEY
' ','k','e','y','[', KEY, ']',
#endif
'\0'};
#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
int require = 0;
require += info_size[argc];
(void)argv;
return require;
}
Determining size of errno_t failed with the following output:
Change Dir: /home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_adee8/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_adee8.dir/build.make CMakeFiles/cmTC_adee8.dir/build
gmake[1]: se entra en el directorio '/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_adee8.dir/ERRNOT.c.o
/usr/lib64/ccache/cc -I/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/SDL -I/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/include/SDL -I/usr/include/SDL2 -o CMakeFiles/cmTC_adee8.dir/ERRNOT.c.o -c /home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/ERRNOT.c
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/ERRNOT.c:24:22: error: ‘errno_t’ no se declaró aquí (no en una función); ¿quiso decir ‘ino_t’?
#define SIZE (sizeof(errno_t))
^~~~~~~
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/ERRNOT.c:26:12: nota: en expansión de macro ‘SIZE’
('0' + ((SIZE / 10000)%10)),
^~~~
gmake[1]: *** [CMakeFiles/cmTC_adee8.dir/build.make:66: CMakeFiles/cmTC_adee8.dir/ERRNOT.c.o] Error 1
gmake[1]: se sale del directorio '/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_adee8/fast] Error 2
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CheckTypeSize/ERRNOT.c:
#include <sys/types.h>
#include <stdint.h>
#include <stddef.h>
#include "SDL_video.h"
#undef KEY
#if defined(__i386)
# define KEY '_','_','i','3','8','6'
#elif defined(__x86_64)
# define KEY '_','_','x','8','6','_','6','4'
#elif defined(__ppc__)
# define KEY '_','_','p','p','c','_','_'
#elif defined(__ppc64__)
# define KEY '_','_','p','p','c','6','4','_','_'
#elif defined(__aarch64__)
# define KEY '_','_','a','a','r','c','h','6','4','_','_'
#elif defined(__ARM_ARCH_7A__)
# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','A','_','_'
#elif defined(__ARM_ARCH_7S__)
# define KEY '_','_','A','R','M','_','A','R','C','H','_','7','S','_','_'
#endif
#define SIZE (sizeof(errno_t))
char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
('0' + ((SIZE / 10000)%10)),
('0' + ((SIZE / 1000)%10)),
('0' + ((SIZE / 100)%10)),
('0' + ((SIZE / 10)%10)),
('0' + (SIZE % 10)),
']',
#ifdef KEY
' ','k','e','y','[', KEY, ']',
#endif
'\0'};
#ifdef __CLASSIC_C__
int main(argc, argv) int argc; char *argv[];
#else
int main(int argc, char *argv[])
#endif
{
int require = 0;
require += info_size[argc];
(void)argv;
return require;
}
Determining if the function strcpy_s exists failed with the following output:
Change Dir: /home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_f4103/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_f4103.dir/build.make CMakeFiles/cmTC_f4103.dir/build
gmake[1]: se entra en el directorio '/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f4103.dir/CheckFunctionExists.c.o
/usr/lib64/ccache/cc -I/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/SDL -I/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/include/SDL -I/usr/include/SDL2 -DCHECK_FUNCTION_EXISTS=strcpy_s -o CMakeFiles/cmTC_f4103.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_f4103
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f4103.dir/link.txt --verbose=1
/usr/lib64/ccache/cc -I/usr/include/SDL2 -DCHECK_FUNCTION_EXISTS=strcpy_s -lpthread -rdynamic CMakeFiles/cmTC_f4103.dir/CheckFunctionExists.c.o -o cmTC_f4103
/usr/bin/ld: CMakeFiles/cmTC_f4103.dir/CheckFunctionExists.c.o: en la función `main':
CheckFunctionExists.c:(.text+0x10): referencia a `strcpy_s' sin definir
collect2: error: ld devolvió el estado de salida 1
gmake[1]: *** [CMakeFiles/cmTC_f4103.dir/build.make:87: cmTC_f4103] Error 1
gmake[1]: se sale del directorio '/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_f4103/fast] Error 2
Determining if the function strncpy_s exists failed with the following output:
Change Dir: /home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_42102/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_42102.dir/build.make CMakeFiles/cmTC_42102.dir/build
gmake[1]: se entra en el directorio '/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_42102.dir/CheckFunctionExists.c.o
/usr/lib64/ccache/cc -I/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/SDL -I/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/include/SDL -I/usr/include/SDL2 -DCHECK_FUNCTION_EXISTS=strncpy_s -o CMakeFiles/cmTC_42102.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_42102
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_42102.dir/link.txt --verbose=1
/usr/lib64/ccache/cc -I/usr/include/SDL2 -DCHECK_FUNCTION_EXISTS=strncpy_s -lpthread -rdynamic CMakeFiles/cmTC_42102.dir/CheckFunctionExists.c.o -o cmTC_42102
/usr/bin/ld: CMakeFiles/cmTC_42102.dir/CheckFunctionExists.c.o: en la función `main':
CheckFunctionExists.c:(.text+0x10): referencia a `strncpy_s' sin definir
collect2: error: ld devolvió el estado de salida 1
gmake[1]: *** [CMakeFiles/cmTC_42102.dir/build.make:87: cmTC_42102] Error 1
gmake[1]: se sale del directorio '/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_42102/fast] Error 2
Determining if the strcat_s exist failed with the following output:
Change Dir: /home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/gmake" "cmTC_b4989/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_b4989.dir/build.make CMakeFiles/cmTC_b4989.dir/build
gmake[1]: se entra en el directorio '/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_b4989.dir/CheckSymbolExists.c.o
/usr/lib64/ccache/cc -I/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/SDL -I/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/include/SDL -I/usr/include/SDL2 -o CMakeFiles/cmTC_b4989.dir/CheckSymbolExists.c.o -c /home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/CheckSymbolExists.c: En la función ‘main’:
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: error: ‘strcat_s’ no se declaró aquí (primer uso en esta función); ¿quiso decir ‘strcat’?
return ((int*)(&strcat_s))[argc];
^~~~~~~~
strcat
/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:19: nota: cada identificador sin declarar se reporta sólo una vez para cada función en el que aparece
gmake[1]: *** [CMakeFiles/cmTC_b4989.dir/build.make:66: CMakeFiles/cmTC_b4989.dir/CheckSymbolExists.c.o] Error 1
gmake[1]: se sale del directorio '/home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_b4989/fast] Error 2
File /home/mario/sw/wyrmsun/wyrmgus/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <string.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef strcat_s
return ((int*)(&strcat_s))[argc];
#else
(void)argc;
return 0;
#endif
}
It looks like you are including both SDL and SDL2 headers for compilation? That could be the source of the issue. Wyrmgus uses SDL 1.2.
I tried with both, on separate occasions, and it fails on both with the same error.
In that I'm afraid I'm not sure what the problem is, sorry :(
Thanks for your attempt.