Closed humanopi closed 9 months ago
If you don't have a basic building setup yet, install these:
sudo apt install build-essential git cmake
First build libdeflate like this:
git clone https://github.com/ebiggers/libdeflate
cd libdeflate
make
Now clone this project and install libraries:
git clone https://github.com/xtreme8000/BetterSpades
sudo apt install libgl1-mesa libgl1-mesa-dev libopenal1 libopenal-dev libglfw-dev libenet-dev libglew-dev
Copy libdeflate/libdeflate.a
to BetterSpades/deps
Then in BetterSpades/
:
cd build
cmake ..
make -j 4
This should leave the finished binary as BetterSpades/build/BetterSpades/client
Note: this way of building only works on a Raspberry Pi with full OpenGL driver enabled (see raspi-config
).
-- The C compiler identification is GNU 8.3.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 -- Compiler is -- Build type is -- Downloading ini.c -- Downloaded ini.c successfully -- Downloading ini.h -- Downloaded ini.h successfully -- Downloading lodepng/lodepng.c -- Downloaded lodepng/lodepng.c successfully -- Downloading lodepng/lodepng.h -- Downloaded lodepng/lodepng.h successfully -- Downloading dr_wav.c CMake Error at src/CMakeLists.txt:11 (message): Failed to download dr_wav.c ("Couldn't resolve host name") Call Stack (most recent call first): src/CMakeLists.txt:20 (download_file_if_it_doesnt_exist)
-- Configuring incomplete, errors occurred! See also "/home/pi/libdeflate/BetterSpades/build/CMakeFiles/CMakeOutput.log".
i got this erro
Looks like your internet connection is unstable.
Maybe try downloading dr_wav.h by yourself and place it in BetterSpades/src/dr_wav.c
. Note that it has to be renamed to dr_wav.c
.
it installed, but now im getting another errror:
pi@raspberrypi:~/libdeflate/BetterSpades/build $ cmake .. -- Compiler is -- Build type is CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find glfw3 (missing: glfw3_INCLUDE_DIR) Call Stack (most recent call first): /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) cmake/Modules/Findglfw3.cmake:32 (find_package_handle_standard_args) src/CMakeLists.txt:120 (find_package)
-- Configuring incomplete, errors occurred! See also "/home/pi/libdeflate/BetterSpades/build/CMakeFiles/CMakeOutput.log".
did you sudo apt install libglfw-dev
?
@xtreme8000 can you release a linux x86_64 binary please. Im also having trouble building it from AUR
Stale issue - @xtreme8000 close issue? (I have success with building BetterSpades on Linux as well if needed)
how to build on linux? im using a raspberry pi sorry if this is a common question, but i cant understand how to compile on linux