-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-compiled headers does not allow to compile the game properly #42598
Comments
Looks like your clang complains about (also use ``` when quoting multi-line text to preserve line breaks) |
Wait a minute what's this bit here |
The same problem is also triggered by the Archlinux AUR build script, or simply the following commands :
The second build always fails with Reversing the TILES=0|1 build order only changes the error : Removing PCH between builds does solve the problem ( (Cross-link to the PR introducing this change : #42535 ) |
That makes more sense, thanks. That's a limitation of edit: and just to be clear: you gain nothing by skipping |
Actually a workaround might be to infix |
Excuse me, step |
In-between
I'm not really sure if that is acceptable workflow for this project, so I won't submit a documentation change. The workaround I mention above is also pretty untenable for all the defines in our current Makefile (and I personally am not interested in writing it atm) |
There's no real consideration for building both tiles and curses sequentially, but it is expecting that you make clean between each recompile with different make flags, so option 2 or 3 would be what I'd generally expect for that. |
If one wishes to build both tiles and curses then it's best to use the CMake build and separate build dirs. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered. |
This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it |
This commit resolves issue #102, kindly submitted by twice-the-fun @2xsaiko, by bumping Cataclysm: Dark Days Ahead to its most stable release *and* significantly refactoring our ebuild. Specifically, this commit: * Bumps C:DDA to 0.9F (Frank). * Adds a new "pch" USE flag controlling precompiled header support. Sadly, enabling this flag prevents the "ncurses" and "sdl" USE flags from both being enabled concurrently. Why? Because CleverRaven/Cataclysm-DDA#42598, for which there exists no sane workaround. For this reason, we advise disabling the "pch" USE flag for "games-roguelike/cataclysm-dda". * Patches away a growing laundry list of Gentoo QA notices caused by unsafe and non-portable globally scoped behaviour in makefiles. * When compiling with g++, conditionally removes the Clang-specific "-Wno-unknown-warning-option" option unsupported by g++ from makefiles. * Installs C:DDA ".desktop" and icon files.
I always build the game using command:
make -j$(nproc) NATIVE=linux64 CCACHE=1 RELEASE=1 LTO=1 TILES=1 SOUND=1 CLANG=1 BACKTRACE=0 RUNTESTS=0` When i was on commit 5c118cddba6c2d8effbc2420851b70bc1c6a7587 everything was fine, but on commit 36d06eb1f6a31111b5f5b37d83414c2f2d7a557d i am getting errors like that: `[nikow@thinira Cataclysm-DDA]$ make -j$(nproc) NATIVE=linux64 CCACHE=1 RELEASE=1 LTO=1 TILES=1 SOUND=1 CLANG=1 BACKTRACE=0 RUNTESTS=0 astyle -V: Artistic Style Version 3.1 find data -name "*.json" -print0 | grep -v -z -F -f json_blacklist | \ xargs -0 -L 1 tools/format/json_formatter.cgi no astyle regressions CCACHE_CPP2=1 CCACHE_SLOPPINESS=pch_defines,time_macros ccache clang++ -DRELEASE -DGIT_VERSION -DTILES -DLOCALIZE -ffast-math -O3 -flto -Xclang -fno-pch-timestamp -Werror -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wredundant-decls -fsigned-char -std=c++14 -MMD -MP -m64 -I/usr/include/SDL2 -D_REENTRANT -DSDL_SOUND -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -Ipch -Winvalid-pch -include-pch pch/pch.hpp.pch -c src/activity_actor.cpp -o obj/tiles/activity_actor.o CCACHE_CPP2=1 CCACHE_SLOPPINESS=pch_defines,time_macros ccache clang++ -DRELEASE -DGIT_VERSION -DTILES -DLOCALIZE -ffast-math -O3 -flto -Xclang -fno-pch-timestamp -Werror -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wredundant-decls -fsigned-char -std=c++14 -MMD -MP -m64 -I/usr/include/SDL2 -D_REENTRANT -DSDL_SOUND -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -Ipch -Winvalid-pch -include-pch pch/pch.hpp.pch -c src/activity_handlers.cpp -o obj/tiles/activity_handlers.o CCACHE_CPP2=1 CCACHE_SLOPPINESS=pch_defines,time_macros ccache clang++ -DRELEASE -DGIT_VERSION -DTILES -DLOCALIZE -ffast-math -O3 -flto -Xclang -fno-pch-timestamp -Werror -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wredundant-decls -fsigned-char -std=c++14 -MMD -MP -m64 -I/usr/include/SDL2 -D_REENTRANT -DSDL_SOUND -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -Ipch -Winvalid-pch -include-pch pch/pch.hpp.pch -c src/activity_item_handling.cpp -o obj/tiles/activity_item_handling.o CCACHE_CPP2=1 CCACHE_SLOPPINESS=pch_defines,time_macros ccache clang++ -DRELEASE -DGIT_VERSION -DTILES -DLOCALIZE -ffast-math -O3 -flto -Xclang -fno-pch-timestamp -Werror -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wredundant-decls -fsigned-char -std=c++14 -MMD -MP -m64 -I/usr/include/SDL2 -D_REENTRANT -DSDL_SOUND -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -Ipch -Winvalid-pch -include-pch pch/pch.hpp.pch -c src/advanced_inv.cpp -o obj/tiles/advanced_inv.o CCACHE_CPP2=1 CCACHE_SLOPPINESS=pch_defines,time_macros ccache clang++ -DRELEASE -DGIT_VERSION -DTILES -DLOCALIZE -ffast-math -O3 -flto -Xclang -fno-pch-timestamp -Werror -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wredundant-decls -fsigned-char -std=c++14 -MMD -MP -m64 -I/usr/include/SDL2 -D_REENTRANT -DSDL_SOUND -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -Ipch -Winvalid-pch -include-pch pch/pch.hpp.pch -c src/advanced_inv_area.cpp -o obj/tiles/advanced_inv_area.o CCACHE_CPP2=1 CCACHE_SLOPPINESS=pch_defines,time_macros ccache clang++ -DRELEASE -DGIT_VERSION -DTILES -DLOCALIZE -ffast-math -O3 -flto -Xclang -fno-pch-timestamp -Werror -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wredundant-decls -fsigned-char -std=c++14 -MMD -MP -m64 -I/usr/include/SDL2 -D_REENTRANT -DSDL_SOUND -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -Ipch -Winvalid-pch -include-pch pch/pch.hpp.pch -c src/advanced_inv_pane.cpp -o obj/tiles/advanced_inv_pane.o CCACHE_CPP2=1 CCACHE_SLOPPINESS=pch_defines,time_macros ccache clang++ -DRELEASE -DGIT_VERSION -DTILES -DLOCALIZE -ffast-math -O3 -flto -Xclang -fno-pch-timestamp -Werror -Wall -Wextra -Wformat-signedness -Wlogical-op -Wmissing-declarations -Wmissing-noreturn -Wnon-virtual-dtor -Wold-style-cast -Woverloaded-virtual -Wpedantic -Wsuggest-override -Wunused-macros -Wzero-as-null-pointer-constant -Wno-unknown-warning-option -Wredundant-decls -fsigned-char -std=c++14 -MMD -MP -m64 -I/usr/include/SDL2 -D_REENTRANT -DSDL_SOUND -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -Ipch -Winvalid-pch -include-pch pch/pch.hpp.pch -c src/ammo.cpp -o obj/tiles/ammo.o <built-in>:1:9: error: macro is not used [-Werror,-Wunused-macros] #define TILES 1 ^ <built-in>:2:9: error: macro is not used [-Werror,-Wunused-macros] #define _REENTRANT 1 ^ <built-in>:3:9: error: macro is not used [-Werror,-Wunused-macros] #define SDL_SOUND 1 ^ 3 errors generated. make: *** [Makefile:912: obj/tiles/ammo.o] Błąd 1 make: *** Oczekiwanie na niezakończone zadania.... <built-in>:1:9: error: macro is not used [-Werror,-Wunused-macros] #define TILES 1 ^ <built-in>:2:9: error: macro is not used [-Werror,-Wunused-macros] #define _REENTRANT 1 ^ <built-in>:3:9: error: macro is not used [-Werror,-Wunused-macros] #define SDL_SOUND 1 ^ 3 errors generated. make: *** [Makefile:912: obj/tiles/advanced_inv_pane.o] Błąd 1 <built-in>:1:9: error: macro is not used [-Werror,-Wunused-macros] #define TILES 1 ^ <built-in>:2:9: error: macro is not used [-Werror,-Wunused-macros] #define _REENTRANT 1 ^ <built-in>:3:9: error: macro is not used [-Werror,-Wunused-macros] #define SDL_SOUND 1 ^ 3 errors generated. make: *** [Makefile:912: obj/tiles/advanced_inv_area.o] Błąd 1 <built-in>:1:9: error: macro is not used [-Werror,-Wunused-macros] #define TILES 1 ^ <built-in>:2:9: error: macro is not used [-Werror,-Wunused-macros] #define _REENTRANT 1 ^ <built-in>:3:9: error: macro is not used [-Werror,-Wunused-macros] #define SDL_SOUND 1 ^ 3 errors generated. make: *** [Makefile:912: obj/tiles/advanced_inv.o] Błąd 1 <built-in>:1:9: error: macro is not used [-Werror,-Wunused-macros] #define TILES 1 ^ <built-in>:2:9: error: macro is not used [-Werror,-Wunused-macros] #define _REENTRANT 1 ^ <built-in>:3:9: error: macro is not used [-Werror,-Wunused-macros] #define SDL_SOUND 1 ^ 3 errors generated. make: *** [Makefile:912: obj/tiles/activity_actor.o] Błąd 1 <built-in>:1:9: error: macro is not used [-Werror,-Wunused-macros] #define TILES 1 ^ <built-in>:2:9: error: macro is not used [-Werror,-Wunused-macros] #define _REENTRANT 1 ^ <built-in>:3:9: error: macro is not used [-Werror,-Wunused-macros] #define SDL_SOUND 1 ^ 3 errors generated. make: *** [Makefile:912: obj/tiles/activity_item_handling.o] Błąd 1 <built-in>:1:9: error: macro is not used [-Werror,-Wunused-macros] #define TILES 1 ^ <built-in>:2:9: error: macro is not used [-Werror,-Wunused-macros] #define _REENTRANT 1 ^ <built-in>:3:9: error: macro is not used [-Werror,-Wunused-macros] #define SDL_SOUND 1 ^ 3 errors generated. make: *** [Makefile:912: obj/tiles/activity_handlers.o] Błąd 1
Steps To Reproduce
git checkout 5c118cddba6c2d8effbc2420851b70bc1c6a7587
make -j$(nproc) NATIVE=linux64 CCACHE=1 RELEASE=1 LTO=1 CLANG=1 BACKTRACE=0 RUNTESTS=0
make -j$(nproc) NATIVE=linux64 CCACHE=1 RELEASE=1 LTO=1 TILES=1 SOUND=1 CLANG=1 BACKTRACE=0 RUNTESTS=0
git checkout 36d06eb1f6a31111b5f5b37d83414c2f2d7a557d
make -j$(nproc) NATIVE=linux64 CCACHE=1 RELEASE=1 LTO=1 TILES=1 SOUND=1 CLANG=1 BACKTRACE=0 RUNTESTS=0
Expected behavior
Game compiles and creates playable executable.
Versions and configuration
Additional context
There is workaround provided by @anothersimulacrum, flag
PCH=0
solves issue.The text was updated successfully, but these errors were encountered: