#1313 closed defect (fixed)
r11488 does not compile with "--without-pch"
Reported by: | Julian Ospald | Owned by: | leper |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 10 |
Component: | Build & Packages | Keywords: | compile error |
Cc: | Patch: |
Description
latest svn won't compile with "--without-pch" set: ./update-workspaces.sh \
--with-system-nvtt \ --with-system-enet \ --with-system-mozjs185 \ --without-pch
relevant lines:
../../../source/ps/PreprocessorWrapper.h:35:29: error: ‘CStr’ does not name a type
../../../source/ps/PreprocessorWrapper.h:35:35: error: ISO C++ forbids declaration of ‘expr’ with no type
../../../source/ps/PreprocessorWrapper.h:37:2: error: ‘CStr’ does not name a type
CCmpFootprint.cpp
x86_64-pc-linux-gnu-g++ -march=native -O2 -pipe -march=native -O2 -pipe -MMD -MP -DNDEBUG -DCONFIG_FINAL=1 -DCONFIG2_FAM=0 -DLIB_STATIC_LINK -DINSTALLED_BINDIR=/usr/games/bin -DINSTALLED_DATADIR=/usr/share/games/0ad -DINSTALLED_LIBDIR=/usr/games/lib64/0ad -DWITH_SYSTEM_MOZJS185 -I/usr/X11R6/include/X11 -I/usr/X11R6/include -I/usr/include/X11 -I../../../source/pch/simulation2 -I../../../source -g -Wall -O3 -Wno-switch -Wno-reorder -Wno-invalid-offsetof -Wextra -Wno-missing-field-initializers -Wunused-parameter -Wredundant-decls -Wnon-virtual-dtor -Wundef -fstack-protector-all -D_FORTIFY_SOURCE=2 -fstrict-aliasing -fpch-preprocess -fno-omit-frame-pointer -msse -fvisibility=hidden pkg-config mozjs185 --cflags
-MF obj/simulation2_Release/CCmpFootprint.d -MT "obj/simulation2_Release/CCmpFootprint.o" -o "obj/simulation2_Release/CCmpFootprint.o" -c "../../../source/simulation2/components/CCmpFootprint.cpp"
../../../source/ps/PreprocessorWrapper.cpp:37:6: error: prototype for ‘bool CPreprocessorWrapper::TestConditional(const CStr8&)’ does not match any in class ‘CPreprocessorWrapper’
../../../source/ps/PreprocessorWrapper.h:35:7: error: candidate is: bool CPreprocessorWrapper::TestConditional(const int&)
../../../source/ps/PreprocessorWrapper.cpp:68:56: error: no ‘CStr8 CPreprocessorWrapper::Preprocess(const CStr8&)’ member function declared in class ‘CPreprocessorWrapper’
make[1]: * [obj/engine_Release/PreprocessorWrapper.o] Error 1
make: * [engine] Error 2
make: * Waiting for unfinished jobs....
workaround: don't set "--without-pch"
desired behavior: compiles both ways
Attachments (3)
Change History (13)
by , 12 years ago
Attachment: | 0ad-build.log added |
---|
comment:1 by , 12 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 12 years ago
Thanks for reporting this one. Non-pch builds are not tested every time some of our C++ code changes so it's good to report such failures. The above change should fix the non-pch build.
comment:3 by , 12 years ago
Milestone: | Backlog → Alpha 10 |
---|
comment:4 by , 12 years ago
now I get:
x86_64-pc-linux-gnu-g++ -march=native -O2 -pipe -march=native -O2 -pipe -MMD -MP -DNDEBUG -DCONFIG_FINAL=1 -DCONFIG2_FAM=0 -DLIB_STATIC_LINK -DINSTALLED_BINDIR=/usr/games/bin -DINSTALLED_DATADIR=/usr/share/games/0ad -DINSTALLED_LIBDIR=/usr/games/lib64/0ad -DWITH_SYSTEM_MOZJS185 -DNVTT_SHARED=1 -I/usr/X11R6/include/X11 -I/usr/X11R6/include -I/usr/include/X11 -I../../../source/pch/graphics -I../../../source -g -Wall -O3 -Wno-switch -Wno-reorder -Wno-invalid-offsetof -Wextra -Wno-missing-field-initializers -Wunused-parameter -Wredundant-decls -Wnon-virtual-dtor -Wundef -fstack-protector-all -D_FORTIFY_SOURCE=2 -fstrict-aliasing -fpch-preprocess -fno-omit-frame-pointer -msse -fvisibility=hidden sdl-config --cflags
pkg-config mozjs185 --cflags
-MF obj/graphics_Release/MaterialManager.d -MT "obj/graphics_Release/MaterialManager.o" -o "obj/graphics_Release/MaterialManager.o" -c "../../../source/graphics/MaterialManager.cpp"
../../../source/graphics/MaterialManager.cpp: In member function ‘CMaterial CMaterialManager::LoadMaterial(const VfsPath&)’:
../../../source/graphics/MaterialManager.cpp:91:26: error: variable ‘std::stringstream str’ has initializer but incomplete type
make[1]: * [obj/graphics_Release/MaterialManager.o] Error 1
make: * [graphics] Error 2
make: * Waiting for unfinished jobs....
comment:5 by , 12 years ago
Hm I can't reproduce that on my system. What's your gcc version? Did you clean the working directory (calling clean-workspaces.sh in the same directory as update-workspaces.sh)?
If cleaning your working dir solves the problem great, otherwise some more information would be great.
by , 12 years ago
Attachment: | 2nd-0ad-build.log added |
---|
by , 12 years ago
comment:6 by , 12 years ago
tested again... only happens with "--without-pch"
build environment is always clean
In 11491: