Open SnowySailor opened 5 years ago
SFML supports 2 types of libraries, static and dynamic, and this error can occur if you mix them. I use static libraries in my builds with the SFML_STATIC
preprocessor flag, not sure if the same is true on Linux...
@SnowySailor can you explain to me how you installed SFML, the contents of the downloaded zip make no sense. I too use ubuntu and I have no idea how to get this game up and running.
here's what i tried :
git clone https://github.com/HackerPoet/MarbleMarcher.git
git checkout shader-backport #did not work
sudo apt install cmake libeigen3-dev libsfml-dev libboost-dev libboost-system-dev libboost-filesystem-dev
cd MarbleMarcher/
mkdir build
cmake -SFML_STATIC
# OUTPUT :
#-- The C compiler identification is GNU 8.2.0
#-- The CXX compiler identification is GNU 8.2.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
#-- Found SFML 2.5.0 in /usr/lib/x86_64-linux-gnu/cmake/SFML
#-- Configuring done
#-- Generating done
#-- Build files have been written to: /home/t/MarbleMarcher/MarbleMarcher
cmake --build build
# OUTPUT :
#Error: could not load cache
if i understand correctly in order to have the two dependencies : eigen3 and sfml
libeigen3-dev and libsfml-dev are suitable libs.
you will need libsfml 2.5 packages and ubuntu 18.04 repositories doesn't have them, i downloaded .deb packages from ubuntu 18.10 repositories
if you have libsfml 2.5 packages remove -SFML_STATIC
and build again
hope it helps ;)
BTW I was able to get this to build on Ubuntu 18.04 w/ SFML 2.5.1 (but building from source), and submitted this PR: #39
Not sure if it'll resolve the static vs. shared linking, but it at least gets things going.
@tuxutku Could you link to the deb, please?
off course @Modanung https://pkgs.org/download/libsfml-audio2.5 https://pkgs.org/download/libsfml-system2.5 https://pkgs.org/download/libsfml-window2.5 https://pkgs.org/download/libsfml-network2.5 https://pkgs.org/download/libsfml-graphics2.5 https://pkgs.org/download/libsfml-dev WARNING: don't forget to download for the right distro WARNING: you have to install all WARNING: you have to download 2.5.0 version of the libsfml-dev or it will conflict
As i was not sure and it took me some time to get it working i am gonna post a summary.
MarbleMarcher
on Ubuntu 18.04libsfml-dev
version 2.5.0
libsfml-dev
version 2.4.1, MarbleMarcher
needs 2.5.0libsfml
packages version 2.5.0 for your distribution
sudo apt install ./*
sudo apt install libeigen3-dev git cmake make
MarbleMarcher
source
cd ~
git clone https://github.com/HackerPoet/MarbleMarcher
cd MarbleMarcher
CmakeLists.txt
SFML_STATIC
word (cause we are using the installed deb packages)MarbleMarcher
( set -eux;
mkdir build && cd build
cmake ..
make -j
cp MarbleMarcher ..
)
MarbleMarcher
via ./MarbleMarcher
I installed SFML once from source and once using the precompiled libraries for Linux here: https://www.sfml-dev.org/download/sfml/2.5.1/ (also tried 2.5.0).
Everything up until
cmake --build build
worked fine. Once I ran that command, however, I got the following error:Seems to be something to do with SFML, but I'm not sure exactly what. I thought it was something to do with the specific library I installed, but I got the same error when using the precompiled one. Any ideas?
Thanks