Interrupt / systemshock

Shockolate - A minimalist and cross platform System Shock source port.
GNU General Public License v3.0
801 stars 62 forks source link

Everything is broken #381

Closed shamazmazum closed 3 years ago

shamazmazum commented 3 years ago

Commit 1a840b91f8abc7472a54fa5d1243ef7e9d6b15d2 broke the build on FreeBSD:

vasily@vonbraun:~/test/systemshock/build % cmake -DENABLE_SDL2=ON -DENABLE_SOUND=ON -DENABLE_FLUIDSYNTH=ON ..
-- The C compiler identification is Clang 10.0.1
-- The CXX compiler identification is Clang 10.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenGL: /usr/local/lib/libGL.so
-- SDL2 found: /usr/local/include/SDL2 -L/usr/local/lib  -lSDL2
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "1.7.3")
-- Checking for module 'SDL2_mixer>=2.0.4'
--   Found SDL2_mixer, version 2.0.4
-- Checking for module 'fluidsynth'
--   Found fluidsynth, version 2.1.3
-- Found ALSA: /usr/local/lib/libasound.so (found version "1.1.2")
-- ALSA found
-- Found Git: /usr/local/bin/git (found version "2.30.0")
-- Version is 0.7.8-g1a840b91
-- Enabled features:
 * ENABLE_OPENGL, Enable OpenGL support
 * ENABLE_SDL2, Enable SDL2 support
 * ENABLE_SOUND, Enable sound support (requires SDL2_mixer)
 * ENABLE_FLUIDSYNTH, Enable FluidSynth MIDI support

-- Disabled features:
 * ENABLE_EXAMPLES, Enable example application (can be broken!)
 * ENABLE_DEBUG_BLIT, Enable debugging blitter

-- The ASM compiler identification is Clang
-- Found assembler: /usr/bin/cc
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vasily/test/systemshock/build
vasily@vonbraun:~/test/systemshock/build % make
Scanning dependencies of target GAME_LIB
[  0%] Building C object CMakeFiles/GAME_LIB.dir/src/GameSrc/ai.c.o
In file included from /home/vasily/test/systemshock/src/GameSrc/ai.c:55:
/home/vasily/test/systemshock/src/GameSrc/Headers/game_screen.h:70:24: error: unknown type name 'uiEvent'
uchar main_kb_callback(uiEvent *h, LGRegion *r, intptr_t udata);
                       ^
/home/vasily/test/systemshock/src/GameSrc/Headers/game_screen.h:73:82: error: unknown type name 'uiHandlerProc'
void generic_reg_init(uchar create_reg, LGRegion *reg, LGRect *rct, uiSlab *slb, uiHandlerProc key_h, uiHandlerProc maus_h);
                                                                                 ^
/home/vasily/test/systemshock/src/GameSrc/Headers/game_screen.h:73:103: error: unknown type name 'uiHandlerProc'
void generic_reg_init(uchar create_reg, LGRegion *reg, LGRect *rct, uiSlab *slb, uiHandlerProc key_h, uiHandlerProc maus_h);
                                                                                                      ^
3 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /home/vasily/test/systemshock/build
*** Error code 1

Stop.
make[1]: stopped in /home/vasily/test/systemshock/build
*** Error code 1

Stop.
make: stopped in /home/vasily/test/systemshock/build

It's just too large to find specific details.

donnierussellii commented 3 years ago

This seems to have something to do with: -include precompiled.h See CMakeLists.txt 378

From the documentation: "-include file Process file as if #include "file" appeared as the first line of the primary source file. However, the first directory searched for file is the preprocessor’s working directory instead of the directory containing the main source file. If not found there, it is searched for in the remainder of the #include "…" search chain as normal. If multiple -include options are given, the files are included in the order they appear on the command line."

shamazmazum commented 3 years ago

Oh, I think I need to close this as I do not even remember what this issue is about. I built shockolate fine and even added it to FreeBSD's port collection.