Chasm-Reverse icon indicating copy to clipboard operation
Chasm-Reverse copied to clipboard

Error while compiling: Cannot find source file: ../panzer_ogl_lib/polygon_buffer.cpp

Open WPFilmmaker opened this issue 8 years ago • 9 comments

After giving "cmake .." get an error:

-- Found SDL2: /usr/lib/x86_64-linux-gnu/libSDL2main.a;/usr/lib/x86_64-linux-gnu/libSDL2.so;-lpthread -- Performing Test HAVE_MMX -- Performing Test HAVE_MMX - Success -- Configuring done CMake Error at PanzerChasm/CMakeLists.txt:256 (add_executable): Cannot find source file: ../panzer_ogl_lib/polygon_buffer.cpp Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx CMake Error: CMake can not determine linker language for target: PanzerChasm CMake Error: Cannot determine link language for target "PanzerChasm". -- Generating done -- Build files have been written to: /home/stuff/Downloads/Chasm-Reverse-master/build-dir

Make gives:

Scanning dependencies of target PaletteExtractor [ 2%] Building CXX object CMakeFiles/PaletteExtractor.dir/PaletteExtractor/main.cpp.o [ 5%] Building CXX object CMakeFiles/PaletteExtractor.dir/Common/files.cpp.o [ 8%] Building CXX object CMakeFiles/PaletteExtractor.dir/Common/palette.cpp.o [ 11%] Building CXX object CMakeFiles/PaletteExtractor.dir/Common/tga.cpp.o [ 13%] Linking CXX executable PaletteExtractor [ 13%] Built target PaletteExtractor Scanning dependencies of target ObjToTGAConverter [ 16%] Building CXX object CMakeFiles/ObjToTGAConverter.dir/ObjToTGAConverter/main.cpp.o [ 19%] Building CXX object CMakeFiles/ObjToTGAConverter.dir/Common/files.cpp.o [ 22%] Building CXX object CMakeFiles/ObjToTGAConverter.dir/Common/palette.cpp.o [ 25%] Building CXX object CMakeFiles/ObjToTGAConverter.dir/Common/tga.cpp.o [ 27%] Linking CXX executable ObjToTGAConverter [ 27%] Built target ObjToTGAConverter Scanning dependencies of target FloorsExtractor [ 30%] Building CXX object CMakeFiles/FloorsExtractor.dir/FloorsExtractor/main.cpp.o [ 33%] Building CXX object CMakeFiles/FloorsExtractor.dir/Common/files.cpp.o [ 36%] Building CXX object CMakeFiles/FloorsExtractor.dir/Common/palette.cpp.o [ 38%] Building CXX object CMakeFiles/FloorsExtractor.dir/Common/tga.cpp.o [ 41%] Linking CXX executable FloorsExtractor [ 41%] Built target FloorsExtractor Scanning dependencies of target ArchiveDepacker [ 44%] Building CXX object CMakeFiles/ArchiveDepacker.dir/ArchiveDepacker/main.cpp.o [ 47%] Building CXX object CMakeFiles/ArchiveDepacker.dir/Common/files.cpp.o [ 50%] Linking CXX executable ArchiveDepacker [ 50%] Built target ArchiveDepacker Scanning dependencies of target BlendtabAnalyzer [ 52%] Building CXX object CMakeFiles/BlendtabAnalyzer.dir/BlendtabAnalyzer/main.cpp.o [ 55%] Building CXX object CMakeFiles/BlendtabAnalyzer.dir/Common/files.cpp.o [ 58%] Building CXX object CMakeFiles/BlendtabAnalyzer.dir/Common/palette.cpp.o [ 61%] Building CXX object CMakeFiles/BlendtabAnalyzer.dir/Common/tga.cpp.o [ 63%] Linking CXX executable BlendtabAnalyzer [ 63%] Built target BlendtabAnalyzer Scanning dependencies of target MapToTGAConverter [ 66%] Building CXX object CMakeFiles/MapToTGAConverter.dir/MapToTGAConverter/main.cpp.o [ 69%] Building CXX object CMakeFiles/MapToTGAConverter.dir/Common/files.cpp.o [ 72%] Building CXX object CMakeFiles/MapToTGAConverter.dir/Common/tga.cpp.o [ 75%] Linking CXX executable MapToTGAConverter [ 75%] Built target MapToTGAConverter Scanning dependencies of target CarToTGAConverter [ 77%] Building CXX object CMakeFiles/CarToTGAConverter.dir/CarToTGAConverter/main.cpp.o [ 80%] Building CXX object CMakeFiles/CarToTGAConverter.dir/Common/files.cpp.o [ 83%] Building CXX object CMakeFiles/CarToTGAConverter.dir/Common/palette.cpp.o [ 86%] Building CXX object CMakeFiles/CarToTGAConverter.dir/Common/tga.cpp.o [ 88%] Linking CXX executable CarToTGAConverter [ 88%] Built target CarToTGAConverter Scanning dependencies of target CelDepacker [ 91%] Building CXX object CMakeFiles/CelDepacker.dir/CelDepacker/main.cpp.o [ 94%] Building CXX object CMakeFiles/CelDepacker.dir/Common/files.cpp.o [ 97%] Building CXX object CMakeFiles/CelDepacker.dir/Common/tga.cpp.o [100%] Linking CXX executable CelDepacker [100%] Built target CelDepacker Scanning dependencies of target PanzerChasm make[2]: *** No rule to make target 'PanzerChasm/CMakeFiles/PanzerChasm.dir/build'. Stop. CMakeFiles/Makefile2:381: recipe for target 'PanzerChasm/CMakeFiles/PanzerChasm.dir/all' failed make[1]: *** [PanzerChasm/CMakeFiles/PanzerChasm.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

I am on Lubuntu 16.04.4

WPFilmmaker avatar Mar 25 '18 00:03 WPFilmmaker

From README:

Attention: do not forget update submodules before build!

alexey-lysiuk avatar Mar 25 '18 05:03 alexey-lysiuk

@alexey-lysiuk Thank you for your answer, I tried to google it but couldn't find how to update submodules, could you help me? Thanks!

WPFilmmaker avatar Mar 25 '18 13:03 WPFilmmaker

git submodule update --init --recursive

alexey-lysiuk avatar Mar 25 '18 13:03 alexey-lysiuk

@alexey-lysiuk I tried to run it everywhere but it doesn't find any git file :( I know I am a newbie but could you specify where do I have to run it? This relates to #34 It is really hard for inexperienced users to give any feedback about the game (I compiled some software but only because there is a straightforward documentation to help). Thank you.

WPFilmmaker avatar Mar 31 '18 12:03 WPFilmmaker

I believe that explaining basic things about compiling from source code is out of scope for most of open source projects. You need to figure out how to install git yourself. Downloading source code as .zip archive doesn't work as expected because it skips content of Git modules. With git installed a command to grab the code would be git clone --recursive https://github.com/Panzerschrek/Chasm-Reverse.git

alexey-lysiuk avatar Mar 31 '18 13:03 alexey-lysiuk

@alexey-lysiuk Thanks I did that and I think it run properly as I got:

stuff@stuff-VirtualBox:~/Downloads/Chasm-Reverse-master$ git clone --recursive https://github.com/Panzerschrek/Chasm-Reverse.git Cloning into 'Chasm-Reverse'... remote: Counting objects: 7829, done. remote: Compressing objects: 100% (6/6), done. remote: Total 7829 (delta 0), reused 0 (delta 0), pack-reused 7823 Receiving objects: 100% (7829/7829), 1.31 MiB | 521.00 KiB/s, done. Resolving deltas: 100% (6262/6262), done. Checking connectivity... done. Submodule 'panzer_ogl_lib' (https://github.com/Panzerschrek/panzer_ogl_lib.git) registered for path 'panzer_ogl_lib' Cloning into 'panzer_ogl_lib'... remote: Counting objects: 217, done. remote: Total 217 (delta 0), reused 1 (delta 0), pack-reused 216 Receiving objects: 100% (217/217), 91.47 KiB | 0 bytes/s, done. Resolving deltas: 100% (127/127), done. Checking connectivity... done. Submodule path 'panzer_ogl_lib': checked out '7f736a06a4a2b0786eb459eaa26980b91222203e'

But "cmake .." gives:

`stuff@stuff-VirtualBox:~/Downloads/Chasm-Reverse-master/obj$ cmake .. -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE
-- Found SDL2: /usr/lib/x86_64-linux-gnu/libSDL2main.a;/usr/lib/x86_64-linux-gnu/libSDL2.so;-lpthread
-- Performing Test HAVE_MMX -- Performing Test HAVE_MMX - Success -- Configuring done CMake Error at PanzerChasm/CMakeLists.txt:256 (add_executable): Cannot find source file: ../panzer_ogl_lib/polygon_buffer.cpp Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

CMake Error: CMake can not determine linker language for target: PanzerChasm CMake Error: Cannot determine link language for target "PanzerChasm". -- Generating done -- Build files have been written to: /home/stuff/Downloads/Chasm-Reverse-master/obj`

WPFilmmaker avatar Apr 02 '18 12:04 WPFilmmaker

That's because everything was cloned into Chasm-Reverse subdirectory of ~/Downloads/Chasm-Reverse-master directory. So, you are still trying to build sources from downloaded .zip file.

alexey-lysiuk avatar Apr 02 '18 12:04 alexey-lysiuk

@alexey-lysiuk I managed to compile it, however when I run the executable "PanzerChasm" I get couldn't open file CSM.BIN

Any Idea?

WPFilmmaker avatar Apr 03 '18 00:04 WPFilmmaker

You need to own the original game. The mentioned file should be copied from its CD.

alexey-lysiuk avatar Apr 03 '18 05:04 alexey-lysiuk

Fixed in #53 README.md update. Please close.

jopadan avatar Apr 14 '23 20:04 jopadan