SFML community forums

General => SFML wiki => Topic started by: Nexus on March 29, 2015, 11:52:51 pm

Title: List of dependencies
Post by: Nexus on March 29, 2015, 11:52:51 pm
Since the SFML dependencies have changed a lot recently (especially with XCB), it  would be nice to gather a list of required libraries on Linux. Finding out the package names can be tedious at times, and it's not necessary that every user does so again and again. I've written a small script for Ubuntu, but I've only added entries over time. Some (e.g. X11 ones) might not be needed anymore... And depending on the distribution, there can also be differences.

Here is the link. (https://github.com/SFML/SFML/wiki/Tutorial%3A-Installing-SFML-dependencies) Please feel free to improve it where possible.

Maybe the page can be extended for Windows and static linking.
Title: Re: List of dependencies
Post by: Jesper Juhl on April 02, 2015, 09:15:54 pm
Instead of providing a static list of packages for a single distribution, why not just build the complete package list from the library files themselves?  I mean, when a new release is made a build could be done on a few distributions and then a list of packages could be extracted by looking at the library files, seeing what they link to and what packages provide those files. Then a list could be published for those distributions that will be known to be complete and a script can be created for others to do the same on their favorite distributions to share with others.

For example, on CentOS 7 which is what I'm currently running on a work laptop I can get a list of needed packages (to share with others of course since obviously my machine already have them all) like this:

ldd /usr/local/lib/libsfml-*.so.2.2.0 | egrep -v "^/.+:$" | egrep -v "linux-vdso|ld-linux-x86-64|libsfml" | awk {'print $3'} | xargs -i yum whatprovides {} 2>/dev/null
(adjust if your SFML is not in /usr/local/lib or your distribution is not using yum - pacman for Arch Linux and dpkg/apt for Debian based distros can all do similar things btw)
Title: Re: List of dependencies
Post by: Mario on May 11, 2015, 09:57:06 am
Wouldn't that still just list runtime dependencies rather than buildtime as well? For example, it might list "libwhatever", but not "libwhatever-dev".