Page 1 of 1

Xrandr Problem when building Stk

PostPosted: 20 Aug 2014, 21:16
by Totoplus62
I've already fixed several problems when trying to build stk on ubuntu with bluez and libbluetooth but I still have one with Xrandr. Can someone help me ? (I am not an expert of linux OS :p )
{l Code}: {l Select All Code}
thomas@thomas-Inspiron-N5110:~/supertuxkart/stk-code$ cd cmake_build
thomas@thomas-Inspiron-N5110:~/supertuxkart/stk-code/cmake_build$ cmake ..
-- No build type selected, default to STKRelease
-- Could NOT find XRANDR (missing:  XRANDR_LIBRARY XRANDR_INCLUDE_DIR)
CMake Error at CMakeLists.txt:140 (message):
  XRANDR not found.


Thanks

Re: Xrandr Problem when building Stk

PostPosted: 20 Aug 2014, 21:31
by Akien
Hi Totoplus62,
You need the development headers for the xrandr library. I think those would be called libxrandr-dev on Ubuntu.

Re: Xrandr Problem when building Stk

PostPosted: 31 Aug 2014, 22:18
by Wuzzy
If that’s true, then the README files are failing to mention a crucial dependency, am I right?

Re: Xrandr Problem when building Stk

PostPosted: 31 Aug 2014, 22:28
by Arthur
The INSTALL.md file and the wiki instructions does have libxrandr-dev as a listed dependency, at least when looking at the instructions for Debian/Ubuntu.

INSTALL.md {l Wrote}:##Building STK on Linux

First, make sure that you have the following packages installed:

* OpenGL (mesa)
* OpenAL (recommended: openal-soft-devel)
* Ogg (libogg-dev)
* Vorbis (libvorbis-dev)
* libcurl (libcurl-devel)
* libbluetooth (bluez-devel)

Ubuntu command:

```
sudo apt-get install autoconf automake build-essential cmake libogg-dev libvorbis-dev libopenal-dev libxxf86vm-dev \
libgl1-mesa-dev libglu1-mesa-dev libcurl4-openssl-dev libfribidi-dev libbluetooth-dev libxrandr-dev

But I don't know why we have that list at the top, which wouldn't be complete even if libxrandr-dev were added... so yeah, it could possibly be overlooked by users.

Re: Xrandr Problem when building Stk

PostPosted: 31 Aug 2014, 23:38
by Wuzzy
Not every GNU/Linux user uses Ubuntu or any other Debian-derivate, you know? xD

Translating the “Ubuntu command” to one’s distribution packages is not a task you should expect from a GNU/Linux user. I would suggest to simply list the official names of the libraries.

“OpenGL” is not a library, despite its name. It is a standard. An user does not neccessarily have to use MESA, as MESA is not the only possible OpenGL implementation. This could be translated to “An OpenGL library, for example MESA”.
As far I know “libbluetooth” is not an actual library name, but for some insane reason the Debian packagers give that name to BlueZ. But I am not sure, correct me if I am wrong.

Here is a proposed rewrite of a section for INSTALL.md (possibly incomplete, but you’ll get the idea):

{l Code}: {l Select All Code}
##Building STK under GNU/Linux
###Generic GNU/Linux instructions
You need to have the following software installed:

* An OpenGL implementation, for example MESA. You probably already have this installed if this is not your first 3D game on GNU/Linux.
* OpenAL ([Homepage](http://www.openal.org/))
* GNU FriBidi ([Homepage](http://fribidi.org/))
* libogg ([Homepage](https://www.xiph.org/ogg/))
* libvorbis ([Homepage](https://www.xiph.org/vorbis/))
* libcurl ([Homepage](http://curl.haxx.se/libcurl/))
* libxrandr ([Homepage](http://www.x.org/wiki/libraries/libxrandr/))
* BlueZ ([Homepage](http://www.bluez.org/))

Refer to your distribution’s documentation if you are unsure about how to install all this software. Chances are, your distribution offers software packages with a similar name.

###Instructions for Ubuntu and other Debian-based systems
*INSERT TEXT HERE*

(This is valid Markdown syntax according to Dingus)

By the way, is BlueZ/libbluetooth really a hard dependency? It seems a bit odd to me.

Edit: Oh, according to the Ubuntu line, GNU FriBidi <http://fribidi.org/> is also required. I added it to the draft above.

Re: Xrandr Problem when building Stk

PostPosted: 01 Sep 2014, 16:42
by deve
Isn't it a bit pedantic? "libbluetooth" tells me more than "BlueZ". And what if some arabic people will fork it and in their distribution you will need to use "ZeulB"? :-P

Fribidi is rather not necessary to compile STK. Libbluetooth too - it is used only for Wii Remotes.

Re: Xrandr Problem when building Stk

PostPosted: 01 Sep 2014, 18:48
by Arthur
Wuzzy {l Wrote}:Not every GNU/Linux user uses Ubuntu or any other Debian-derivate, you know? xD

Translating the “Ubuntu command” to one’s distribution packages is not a task you should expect from a GNU/Linux user.

I know that very well, but arguably, if you're not using Ubuntu or Mint, finding the correct package name will most likely be trivial for you. :p

Re: Xrandr Problem when building Stk

PostPosted: 01 Sep 2014, 18:58
by WillemS
Arthur {l Wrote}:I know that very well, but arguably, if you're not using Ubuntu or Mint, finding the correct package name will most likely be trivial for you. :p


To be honest, I don't really agree with that. :think: What is wrong with just stating the official names, and after that the package names for specific distributions (including Ubuntu)? Or even Ubuntu first, and after that the official names :)

Re: Xrandr Problem when building Stk

PostPosted: 01 Sep 2014, 19:06
by Arthur
Fair point, having both would indeed be the better option. :)
If someone could finish up the rewrite Wuzzy started on, that would be much appreciated (noting which dependencies are optional would also be nice; by default BlueZ is needed but it can be turned off with a cmake flag, and I believe this might be the case for more of them as well).

Re: Xrandr Problem when building Stk

PostPosted: 01 Sep 2014, 20:23
by Akien
Arthur {l Wrote}:
Wuzzy {l Wrote}:Not every GNU/Linux user uses Ubuntu or any other Debian-derivate, you know? xD

Translating the “Ubuntu command” to one’s distribution packages is not a task you should expect from a GNU/Linux user.

I know that very well, but arguably, if you're not using Ubuntu or Mint, finding the correct package name will most likely be trivial for you. :p

+1 for the troll :D

Re: Xrandr Problem when building Stk

PostPosted: 02 Sep 2014, 07:41
by konstin
I just wanted to add that you shouldn't only change Install.md but also the wikipages listing the dependencies (FAQ and Installing on linux iirc)

Re: Xrandr Problem when building Stk

PostPosted: 06 Sep 2014, 20:16
by Wuzzy
Proposed new INSTALL.md snippet with GLEW dependency, for dev version (See here: http://forum.freegamedev.net/viewtopic.php?f=17&t=5802)
{l Code}: {l Select All Code}
##Building STK under GNU/Linux
###Generic GNU/Linux instructions
You need to have the following software installed:

* An OpenGL implementation, for example MESA. You probably already have this installed if this is not your first 3D game on GNU/Linux.
* GLEW ([Homepage](http://glew.sourceforge.net/))
* OpenAL ([Homepage](http://www.openal.org/))
* GNU FriBidi ([Homepage](http://fribidi.org/))
* libogg ([Homepage](https://www.xiph.org/ogg/))
* libvorbis ([Homepage](https://www.xiph.org/vorbis/))
* libcurl ([Homepage](http://curl.haxx.se/libcurl/))
* libxrandr ([Homepage](http://www.x.org/wiki/libraries/libxrandr/))
* BlueZ ([Homepage](http://www.bluez.org/))



One question: What information is still missing in your opinion?