Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Unable to compile SFML 2.1 on Linux  (Read 4964 times)

0 Members and 2 Guests are viewing this topic.

Midleiro F

  • Newbie
  • *
  • Posts: 14
    • View Profile
Unable to compile SFML 2.1 on Linux
« on: September 14, 2013, 05:02:46 pm »
Hi!

At first I tried, unsuccessfully, to use the prebuilt binary packages -- when trying to build a simple program, the compiler said I didn't have libglew1.5. I couldn't install it either, since apt-get says the package libglew1.5 doesn't exist, so I decided to build SFML anew with my own version of libglew.

Now I'm trying to build it from source; however, I'm having trouble meeting some dependencies, namely, libxrandr.

When I try
Quote
sudo apt-get install libxrandr2
, it says I already have it.

When I try
Quote
sudo apt-get install libxrandr-dev
, it says
Quote
The following packages have unmet dependencies:
 libxrandr-dev : Depends: x11proto-randr-dev (>= 1.4) but it is not installable
                 Depends: libxrender-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I was also unable to install x11proto-randr-dev and libxrender-dev.

Any suggestions?
Thanks!

santiaboy

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: Unable to compile SFML 2.1 on Linux
« Reply #1 on: September 15, 2013, 01:17:57 am »
Hey! This are the ones I used, and it worked fine.

Quote
sudo apt-get install libpthread-stubs0-dev
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libx11-dev
sudo apt-get install libxrandr-dev
sudo apt-get install libfreetype6-dev
sudo apt-get install libglew1.5-dev
sudo apt-get install libjpeg8-dev
sudo apt-get install libsndfile1-dev
sudo apt-get install libopenal-dev

I used this tutorial (it's for 2.0, but you can use it as a guide for 2.1) http://sfmlcoder.wordpress.com/2011/08/16/building-sfml-2-0-with-make-for-gcc/ and I have it working

Midleiro F

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Unable to compile SFML 2.1 on Linux
« Reply #2 on: September 15, 2013, 02:18:31 pm »
Thanks for the response!

I followed the exact same tutorial the first time around, and was able to install most of the packages you quoted. However, my problem with the xrandr library remains, as stated in the original post. Trying to install them via Package Manager also yielded no results, as it says the package is broken.

I have also tried
Quote
sudo apt-get install -f
and
Quote
sudo dpkg --configure -a
without results.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Unable to compile SFML 2.1 on Linux
« Reply #3 on: September 15, 2013, 04:59:16 pm »
Have you tried to compile SFML even though you haven't installed the library explicitly?
I had some issues in the past as well, when trying to install xrandr, but often it worked anyways since xrandr shipped with some utility package.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Midleiro F

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Unable to compile SFML 2.1 on Linux
« Reply #4 on: September 15, 2013, 09:32:36 pm »
Have you tried to compile SFML even though you haven't installed the library explicitly?
I had some issues in the past as well, when trying to install xrandr, but often it worked anyways since xrandr shipped with some utility package.

Yes, I have. Unfortunately CMake outputs the following error message:

Quote
CMake Error at src/SFML/Window/CMakeLists.txt:113 (message):
  Xrandr library not found


-- Configuring incomplete, errors occurred!

If it's of any help, my current distribution is Linux Mint 15 Olivia.