Success! Thanks.
A guru to solve them…
is no lie.
TLDR: pkgconf
was not installed and so I installed it. I restored /usr/include/SDL2/SDL.h
to its original state. I ran my unedited update script and the game compiled successfully.
I ran
pkgconf --cflags sdl2 SDL2_image SDL2_ttf
and I got
bash: pkgconf: command not found
I installed pkgconf
.
I ran my update script and there’s different errors now:
ENTRANT -MMD -MP -Winvalid-pch -include-pch pch/main-pch.hpp.pch -c src/ballistics.cpp -o obj/tiles/ballistics.o
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:186:5: error: redefinition of enumerator 'SDL_FALSE'
SDL_FALSE = 0,
^
/usr/include/SDL/SDL_stdinc.h:50:5: note: previous definition is here
SDL_FALSE,
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:187:5: error: redefinition of enumerator 'SDL_TRUE'
SDL_TRUE = 1
^
/usr/include/SDL/SDL_stdinc.h:51:5: note: previous definition is here
SDL_TRUE
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:188:3: error: typedef redefinition with different types ('enum SDL_bool' vs 'enum SDL_bool')
} SDL_bool;
^
/usr/include/SDL/SDL_stdinc.h:52:3: note: previous definition is here
} SDL_bool;
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:417:5: error: redefinition of enumerator 'DUMMY_ENUM_VALUE'
DUMMY_ENUM_VALUE
^
/usr/include/SDL/SDL_stdinc.h:75:5: note: previous definition is here
DUMMY_ENUM_VALUE
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:418:3: error: typedef redefinition with different types ('enum SDL_DUMMY_ENUM' vs 'enum SDL_DUMMY_ENUM')
} SDL_DUMMY_ENUM;
^
/usr/include/SDL/SDL_stdinc.h:76:3: note: previous definition is here
} SDL_DUMMY_ENUM;
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:529:23: error: expected unqualified-id
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
^
/usr/include/SDL/SDL_stdinc.h:368:39: note: expanded from macro 'SDL_memset4'
#define SDL_memset4(dst, val, dwords) do { \
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:529:23: error: while loop outside of a function
/usr/include/SDL/SDL_stdinc.h:381:5: note: expanded from macro 'SDL_memset4'
} while (0)
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:583:31: error: 'strchr' is missing exception specification 'noexcept(true)'
extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
^
/usr/include/SDL/SDL_stdinc.h:245:20: note: expanded from macro 'SDL_strchr'
#define SDL_strchr strchr
^
/usr/include/string.h:239:1: note: previous declaration is here
strchr (const char *__s, int __c) __THROW
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:584:31: error: 'strrchr' is missing exception specification 'noexcept(true)'
extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
^
/usr/include/SDL/SDL_stdinc.h:251:21: note: expanded from macro 'SDL_strrchr'
#define SDL_strrchr strrchr
^
/usr/include/string.h:266:1: note: previous declaration is here
strrchr (const char *__s, int __c) __THROW
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:585:31: error: 'strstr' is missing exception specification 'noexcept(true)'
extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
^
/usr/include/SDL/SDL_stdinc.h:257:20: note: expanded from macro 'SDL_strstr'
#define SDL_strstr strstr
^
/usr/include/string.h:343:1: note: previous declaration is here
strstr (const char *__haystack, const char *__needle) __THROW
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:591:31: error: redefinition of 'SDL_ltoa' as different kind of symbol
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
^
/usr/include/SDL/SDL_stdinc.h:409:40: note: expanded from macro 'SDL_itoa'
#define SDL_itoa(value, string, radix) SDL_ltoa((long)value, string, radix)
^
/usr/include/SDL/SDL_stdinc.h:265:32: note: previous definition is here
extern DECLSPEC char * SDLCALL SDL_ltoa(long value, char *string, int radix);
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:591:44: error: expected '(' for function-style cast or type construction
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
~~~ ^
/usr/include/SDL/SDL_stdinc.h:409:55: note: expanded from macro 'SDL_itoa'
#define SDL_itoa(value, string, radix) SDL_ltoa((long)value, string, radix)
^~~~~
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:591:56: error: expected '(' for function-style cast or type construction
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
~~~~ ^
/usr/include/SDL/SDL_stdinc.h:409:62: note: expanded from macro 'SDL_itoa'
#define SDL_itoa(value, string, radix) SDL_ltoa((long)value, string, radix)
^~~~~~
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:591:57: error: use of undeclared identifier 'str'
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
^
/usr/include/SDL2/SDL_stdinc.h:591:66: error: expected '(' for function-style cast or type construction
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
~~~ ^
/usr/include/SDL/SDL_stdinc.h:409:70: note: expanded from macro 'SDL_itoa'
#define SDL_itoa(value, string, radix) SDL_ltoa((long)value, string, radix)
^~~~~
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:592:31: error: redefinition of 'SDL_ultoa' as different kind of symbol
extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
^
/usr/include/SDL/SDL_stdinc.h:410:41: note: expanded from macro 'SDL_uitoa'
#define SDL_uitoa(value, string, radix) SDL_ultoa((long)value, string, radix)
^
/usr/include/SDL/SDL_stdinc.h:271:32: note: previous definition is here
extern DECLSPEC char * SDLCALL SDL_ultoa(unsigned long value, char *string, int radix);
^
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:592:50: error: expected '(' for function-style cast or type construction
extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
~~~~~~~~ ^
/usr/include/SDL/SDL_stdinc.h:410:57: note: expanded from macro 'SDL_uitoa'
#define SDL_uitoa(value, string, radix) SDL_ultoa((long)value, string, radix)
^~~~~
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:592:66: error: expected '(' for function-style cast or type construction
extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
~~~~ ^
/usr/include/SDL/SDL_stdinc.h:410:64: note: expanded from macro 'SDL_uitoa'
#define SDL_uitoa(value, string, radix) SDL_ultoa((long)value, string, radix)
^~~~~~
In file included from src/animation.cpp:29:
In file included from src/cata_tiles.h:25:
In file included from src/sdl_wrappers.h:13:
In file included from /usr/include/SDL2/SDL.h:40:
In file included from /usr/include/SDL2/SDL_main.h:25:
/usr/include/SDL2/SDL_stdinc.h:592:67: error: use of undeclared identifier 'str'
extern DECLSPEC char *SDLCALL SDL_uitoa(unsigned int value, char *str, int radix);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Makefile:995: obj/tiles/animation.o] Error 1
make: *** Waiting for unfinished jobs....
I removed
#include <SDL/SDL.h>
#include <SDL2/SDL.h>
#include "SDL/SDL.h"
#include "SDL2/SDL.h"
# include <SDL/SDL.h>
# include <SDL2/SDL.h>
# include "SDL/SDL.h"
# include "SDL2/SDL.h"
from /usr/include/SDL2/SDL.h
I ran my update script again and it successfully compiled.