weigert / splash

Unix Data Splashing Tool
MIT License
172 stars 4 forks source link

Not working on archlinux #3

Closed PaxSov closed 4 years ago

PaxSov commented 4 years ago

I saw your post on r/unixporn and it looks great. If I build it from source I get this error:

In file included from splash.cpp:1: splash.h:6:10: fatal error: boost/filesystem/operations.hpp: No such file or directory 6 | #include <boost/filesystem/operations.hpp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:7: splash] Error 1

archlinux does not have boost_system and boost_filesystem as packages, I do have boost-libs installed though

Thank you in advance

weigert commented 4 years ago

It is surely possible to compile c++ with the boost libraries on arch, so this is likely fixable.

Do you know where arch package manager installs the boost libraries? Then you could look into this location and see how the libraries are actually named (should be ".so" files in there somewhere).

It is possible that either:

A: The compiler doesn't know where to find the boost libraries because the linking is not correct in the makefile. You need to change in the makefile the -L part to where ever libraries are on arch. B: They are linked correctly but have a slightly different name on arch, and so the include directive can't find them.

As far as I know it is quite tedious to set up arch, so I'm not sure if I can setup a quick arch distro and test it out myself.

If you find a fix or can't find a fix please let me know. I can help do some research.

Thanks for helping test compatibility!

b3nj5m1n commented 4 years ago

@weigert I have the same issue, I am also on arch. It seems like arch saves the libraries in /usr/lib/ but I'm not sure how to correctly change the makefile to include them. Here are the .so filenames:

libboost_system.so.1.72.0 (libc6,x86-64) => /usr/lib/libboost_system.so.1.72.0
libboost_system.so.1.69.0 (libc6,x86-64) => /usr/lib/libboost_system.so.1.69.0
libboost_system.so (libc6,x86-64) => /usr/lib/libboost_system.so
libboost_filesystem.so.1.72.0 (libc6,x86-64) => /usr/lib/libboost_filesystem.so.1.72.0
libboost_filesystem.so.1.69.0 (libc6,x86-64) => /usr/lib/libboost_filesystem.so.1.69.0
libboost_filesystem.so (libc6,x86-64) => /usr/lib/libboost_filesystem.so

Btw, you could quickly set up a distro such as manjaro, that one is based on arch and has a very easy installer. Edit: I tried compiling them directly using this command: gcc splash.cpp -Wfatal-errors -O -I/usr/local/include -ldl -lX11 -lXfixes -lXrender -lGL -lGLEW /usr/lib/libboost_system.so /usr/lib/libboost_filesystem.so And I still get the same error, which makes me think that this the issue is not that the compiler doesn't find the libraries. But I also don't really know anything about cpp.

weigert commented 4 years ago

@b3nj5m1n Thanks for the info! This is very valuable.

In the makefile, try changing the line:

LFLAGS = -I/usr/local/include -L/usr/local/lib

to:

LFLAGS = -I/usr/local/include -L/usr/local/lib -L/usr/lib

to include the libraries there. Then just compile normally with make all.

Let me know if that works!

If not, I might set up manjaro! Thanks for the tip.

b3nj5m1n commented 4 years ago

@weigert Sorry, doesn't seem to fix it.

weigert commented 4 years ago

Okedoke, thanks for the info. I will look into it!

Note: If anybody else reads this and manages to get it to work on arch or manjaro, please let me know how to link and include correctly! Currently it seems this is just a compilation issue with g++. So a little C++ experience would fix this quickly.

ZeeCas commented 4 years ago

Currently works on Archlinux for me I fixed the boost issues by installing the base "boost" package from pacman. Boost-libs doesnt contain all needed packages https://imgur.com/a/eFfeLrp

weigert commented 4 years ago

Awesome! Thanks a lot for posting the screenshot too! Appreciate it.

I added a note in the Readme to show that it is fully compatible with arch.

Just want to note that I updated the windowing code a little bit to make it fully compatible with other DEs (XFCE, Gnome, semi-i3), so an extra flag is required in your compositor to prevent shading of the splash. It's described in the readme.

tmpm697 commented 4 years ago

@ZeeDerp what packages need to install on arch? I installed boost but still have errors when running ./setup.sh

make: Entering directory '/home/user/splash/splash'
In file included from splash.h:14,
                 from splash.cpp:1:
include/window.cpp:3:10: fatal error: glm/glm.hpp: No such file or directory
    3 | #include <glm/glm.hpp>
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:7: splash] Error 1
tmpm697 commented 4 years ago

This is the command on arch to install all deps:

sudo pacman -S boost glm sdl2 sdl2_image sdl2_ttf