Building STK on Fedora Linux

Building STK on Fedora Linux

Postby Anon » 12 Sep 2014, 21:29

Since September 5th, Supertuxkart requires libGLEW 1.10 to build. Unfortunately, the repositories for Fedora 20 only have 1.9. I don't think it's in RPM Fusion either.

Without waiting for Fedora 21 to come out, is there anyway to get libGLEW 1.10 on Fedora Linux? I'd prefer to install it from a repository, since I don't trust myself enough to manually compile and install something outside of my home directory.

So, is there anyone here who uses Fedora and has a way to do this?
Anon
 
Posts: 208
Joined: 03 Jul 2014, 16:30

Re: Building STK on Fedora Linux

Postby deve » 13 Sep 2014, 14:24

Compiling package yourself is much better than install it from other repository. But if you really don't want to do it, you can try to install this one package from Fedora 21 repos. I don't know Fedora well, but you should be able to download and install it manually. This usually works fine. In the past I used Debian with stable, testing, experimental and Ubuntu repos ;-)

Anyway compiling it yourself should be simple to do and I suggest to do it. Maybe this will help you:
http://glew.sourceforge.net/build.html

There are listed needed dependencies for Fedora. You need to make glew.lib.
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: Building STK on Fedora Linux

Postby Akien » 13 Sep 2014, 16:38

If you want a clean package, I would suggest you to download the source RPM from Fedora 21: http://dl.fedoraproject.org/pub/fedora/ ... 21.src.rpm (or from Rawhide, but they haven't updated yet to glew 1.11.0, so it's the same package).

Then you can create your own RPM based on this source RPM using "rpmbuild --rebuild glew-1.10.0-5.fc21.src.rpm". I wrote a howto for this method, but it's for Mageia and uses urpmi, you might have to find the Fedora equivalent with yum: https://wiki.mageia.org/en/How_to_do_your_own_backports

You can also try to install Fedora 21's binary RPM directly (glew + glew-devel), it might work out of the box.
Godot Engine project manager and maintainer.
Occasional FOSS gamedev: Lugaru, OpenDungeons, Jetpaca, Minilens.
User avatar
Akien
 
Posts: 737
Joined: 22 Feb 2014, 13:14

Re: Building STK on Fedora Linux

Postby Anon » 14 Sep 2014, 04:12

Thanks for the replies. After some more research, I managed to get the build to work with the glew packages from Fedora 21.


For any other Fedora users that have the same problem, here's what I did:

First, I downloaded the libGLEW, glew-devel, and glew packages from here. I then tried to install them with "yum install <filename>", which failed because I had packages installed which depended on glew 1.9.

As a workaround for installing the packages in /usr/, I extracted their contents into my home folder using the default system archive manager. Next, I changed the line "include_directories(${GLEW_INCLUDE_DIR})" in "stk-code/CMakeLists.txt" to point to the "include" directory under where I had extracted the packages (e.g., "include_directories(/home/username/bin/glew/usr/include)"). After doing this, I was able to compile the game by running cmake and make with "LD_LIBRARY_PATH=/home/username/bin/glew/usr/lib64" and "LIBRARY_PATH=/home/username/bin/glew/usr/lib64". I then launched the game with "LD_LIBRARY_PATH=/home/username/bin/glew/usr/lib64 ./supertuxkart"

That's all. If you don't have anything that depends on glew 1.9 though, you should be able to completely skip the second half. Also, it might still work if the only environment variable used during compilation is "LIBRARY_PATH" with make.

Now, I'm by no means an expert in doing this kind of stuff so feel free to to post any corrections or improvements if there's something I've missed or done inefficiently.
Anon
 
Posts: 208
Joined: 03 Jul 2014, 16:30

Re: Building STK on Fedora Linux

Postby deve » 14 Sep 2014, 12:30

You should be able to use:
cd build
cmake .. -DGLEW_INCLUDE_DIR=/opt/glew/include -DGLEW_LIBRARY=/opt/glew/lib/libGLEW.so

When you will use "cmake -i" and you will choose to show advanced options, you will see all avaliable properties.
deve
 
Posts: 268
Joined: 23 Jan 2014, 13:45

Re: Building STK on Fedora Linux

Postby vlj » 14 Sep 2014, 16:59

Maybe PKG_CONFIG_PATH works too, eg "PKG_CONFIG_PATH=/opt/glew/lib/pkgconfig ccmake .."
In addition it'll work with any mesa installed in /opt/glew
vlj
 
Posts: 58
Joined: 27 Dec 2013, 04:22

Re: Building STK on Fedora Linux

Postby hiker » 16 Sep 2014, 13:50

Hi,

note that we have included glew into our sources, so there is no more need to add (or compile) your own version, it will all be done as part of STK now.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Who is online

Users browsing this forum: No registered users and 1 guest

cron