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

Author Topic: Can't link graphics module of SFML on Linux  (Read 7833 times)

0 Members and 2 Guests are viewing this topic.

japanskcykel

  • Newbie
  • *
  • Posts: 1
    • View Profile
Can't link graphics module of SFML on Linux
« on: January 26, 2014, 09:36:01 pm »
EDIT3: Solved! I compiled SFML from source and everything is working now!

Hello! I have been trying to get the awesome SFML 2.1 framework to work on my Linux (CrunchBang, built on Debian stable) machine, but no luck. When compiling the following way:
Quote
g++ -std=c++11 -Wall -Wextra -L../libraries/SFML-2.1/lib -Wl,-rpath=../libraries/SFML-2.1/lib -lsfml-system -lsfml-window -lGLEW -lsfml-graphics -o LD29 LD29.o

I get:
Quote
/usr/bin/ld: warning: libGLEW.so.1.5, needed by ../libraries/SFML-2.1/lib/libsfml-graphics.so, not found (try using -rpath or -rpath-link)
../libraries/SFML-2.1/lib/libsfml-graphics.so: undefined reference to `memcpy@GLIBC_2.14'

I have attached the source code and makefile. I am running under Debian stable, G++ verison is 4.7.
Any help is welcome! Thanks a bunch :D

EDIT: Forgot to mention, I do have GLEW installed. When running "dpkg -l | grep glew" I get:
Quote
ii  libglew-dev:amd64                     1.7.0-3                            amd64        OpenGL Extension Wrangler - development environment
ii  libglew1.7:amd64                      1.7.0-3                            amd64        OpenGL Extension Wrangler - runtime environment

EDIT2: I am now trying to compile SFML from source. Wish me luck! (I'll post the results)
« Last Edit: January 26, 2014, 10:10:19 pm by japanskcykel »

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Can't link graphics module of SFML on Linux
« Reply #1 on: February 28, 2014, 12:54:27 am »
I've just been running into the same issue on Debian 7.4 stable (Wheezy) (64bits):
../SFML-2.1/lib/libsfml-graphics.so: undefined reference to `memcpy@GLIBC_2.14'

I found no way to install the right GLib and "dpkg -l | grep glib" gives me the following:
ii  gir1.2-glib-2.0                       1.32.1-1                           amd64        Introspection data for GLib, GObject, Gio and GModule
ii  glib-networking:amd64                 2.32.3-1                           amd64        network-related giomodules for GLib
ii  glib-networking-common                2.32.3-1                           all          network-related giomodules for GLib - data files
ii  glib-networking-services              2.32.3-1                           amd64        network-related giomodules for GLib - D-Bus services
ii  libavahi-glib1:amd64                  0.6.31-2                           amd64        Avahi GLib integration library
ii  libdbus-glib-1-2:amd64                0.100.2-1                          amd64        simple interprocess messaging system (GLib-based shared library)
ii  libglib2.0-0:amd64                    2.33.12+really2.32.4-5             amd64        GLib library of C routines
ii  libjson-glib-1.0-0:amd64              0.14.2-1                           amd64        GLib JSON manipulation library
ii  libtelepathy-glib0:amd64              0.18.2-2                           amd64        Telepathy framework - GLib library

Is recompiling SFML the only way.. ? Can't it be fixed on SFML binaries side?

Any help is appreciated :)
Thanks!
Want to play movies in your SFML application? Check out sfeMovie!

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Can't link graphics module of SFML on Linux
« Reply #2 on: February 28, 2014, 01:11:01 am »

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Can't link graphics module of SFML on Linux
« Reply #3 on: February 28, 2014, 01:40:37 am »
Hmmmm when doing "apt-get -t testing install libc6-dev" I get this…
Reading package lists... Done
E: The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources

And no better result with the other command:
~# apt-get install libc6-dev=2.17-7
Reading package lists... Done
Building dependency tree      
Reading state information... Done
E: Version '2.17-7' for 'libc6-dev' was not found
~# apt-get install libc6-dev=2.17
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '2.17' for 'libc6-dev' was not found

And of course "apt-get install libc6-dev" says it's already installed.
So I really don't know what to do :/

I also tried to follow http://forums.spry.com/debian/620-how-install-testing-packages-debian-stable-apt-get.html and https://we.riseup.net/debian/installing-testing-packages-on-stable to no avail  :-\

Not quite used to Linux so sorry for the newbie questions ;D
Want to play movies in your SFML application? Check out sfeMovie!

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Can't link graphics module of SFML on Linux
« Reply #4 on: February 28, 2014, 02:09:41 am »
Did you read this link? http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html#s-default-version

You need to edit "/etc/apt/apt.conf" (create it if it doesn't exist), and make it contain the following:
APT::Default-Release "stable"


Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Can't link graphics module of SFML on Linux
« Reply #5 on: February 28, 2014, 02:19:22 am »
Not this link but on the one I read it was stated too :(

Code: [Select]
# cat /etc/apt/apt.conf
PT::Default-Release "stable";
# apt-get -t testing install libc6-dev
Reading package lists... Done
E: The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources
# apt-get update
Hit http://security.debian.org wheezy/updates Release.gpg
Hit http://security.debian.org wheezy/updates Release                       
Hit http://security.debian.org wheezy/updates/main Sources                                         
Hit http://security.debian.org wheezy/updates/main amd64 Packages           
Hit http://security.debian.org wheezy/updates/main Translation-en                             
Hit http://pkg.jenkins-ci.org binary/ Release.gpg                                             
Hit http://pkg.jenkins-ci.org binary/ Release                                                 
Hit http://pkg.jenkins-ci.org binary/ Packages                   
Hit http://debian.mirrors.ovh.net wheezy Release.gpg                                         
Hit http://debian.mirrors.ovh.net wheezy Release               
Hit http://debian.mirrors.ovh.net wheezy/main Sources                       
Hit http://debian.mirrors.ovh.net wheezy/main amd64 Packages
Hit http://debian.mirrors.ovh.net wheezy/main Translation-en
Ign http://pkg.jenkins-ci.org binary/ Translation-en_GB
Ign http://pkg.jenkins-ci.org binary/ Translation-en   
Reading package lists... Done
# apt-get -t testing install libc6-dev
Reading package lists... Done
E: The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources
# apt-get install libc6-dev=2.17-7
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '2.17-7' for 'libc6-dev' was not found
Want to play movies in your SFML application? Check out sfeMovie!

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Can't link graphics module of SFML on Linux
« Reply #6 on: February 28, 2014, 02:56:02 am »
Not this link but on the one I read it was stated too :(
Code: [Select]
# cat /etc/apt/apt.conf
PT::Default-Release "stable";

I think you're missing an 'A'. :P

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Can't link graphics module of SFML on Linux
« Reply #7 on: February 28, 2014, 03:02:09 am »
Oh you're right!! Unfortunately it didn't change anything for apt-get :( Thanks for pointing out though :D
Code: [Select]
~# echo "APT::Default-Release "stable";" > /etc/apt/apt.conf
~# cat /etc/apt/apt.conf
APT::Default-Release stable;
~# apt-get update
Hit http://security.debian.org wheezy/updates Release.gpg
Hit http://security.debian.org wheezy/updates Release                       
Hit http://security.debian.org wheezy/updates/main Sources                                         
Hit http://security.debian.org wheezy/updates/main amd64 Packages           
Hit http://security.debian.org wheezy/updates/main Translation-en           
Hit http://pkg.jenkins-ci.org binary/ Release.gpg                           
Hit http://pkg.jenkins-ci.org binary/ Release                               
Hit http://pkg.jenkins-ci.org binary/ Packages                   
Ign http://pkg.jenkins-ci.org binary/ Translation-en_GB                                       
Ign http://pkg.jenkins-ci.org binary/ Translation-en           
Hit http://debian.mirrors.ovh.net wheezy Release.gpg
Hit http://debian.mirrors.ovh.net wheezy Release
Hit http://debian.mirrors.ovh.net wheezy/main Sources
Hit http://debian.mirrors.ovh.net wheezy/main amd64 Packages
Hit http://debian.mirrors.ovh.net wheezy/main Translation-en
Reading package lists... Done
~# apt-get -t testing install libc6-dev
Reading package lists... Done
E: The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources
~# apt-get install libc6-dev=2.17-7
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '2.17-7' for 'libc6-dev' was not found
Want to play movies in your SFML application? Check out sfeMovie!

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Can't link graphics module of SFML on Linux
« Reply #8 on: February 28, 2014, 03:09:39 am »
Actually I think I'm missing something in /etc/apt/sources.list…
At the moment I have:
Code: [Select]
deb http://debian.mirrors.ovh.net/debian/ wheezy main
deb-src http://debian.mirrors.ovh.net/debian/ wheezy main

deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main

deb http://pkg.jenkins-ci.org/debian binary/
But I don't know what to add so that APT can find testing packages (as it states "The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources").
Want to play movies in your SFML application? Check out sfeMovie!

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Can't link graphics module of SFML on Linux
« Reply #9 on: February 28, 2014, 03:15:31 am »
Damn, I was hoping that'd fix it. Try making sure 'stable' is in double quotes, ie: "stable".

Yeah, you're right. What you need to do is copy all those lines, paste them below where they currently are, and change all instances of "wheezy" to "testing".

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Can't link graphics module of SFML on Linux
« Reply #10 on: February 28, 2014, 03:39:00 am »
Oh man thank you soooooooo much that did it!!!!!!  ;D
Now I'm able to link against SFML without any issue!! :)

It was just missing the change from "wheezy" to "testing"!
Want to play movies in your SFML application? Check out sfeMovie!

dabbertorres

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
    • website/blog
Re: Can't link graphics module of SFML on Linux
« Reply #11 on: February 28, 2014, 03:40:34 am »
Awesome! Glad it worked!

BruceJohnJennerLawso

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • My Code on Github
Re: Can't link graphics module of SFML on Linux
« Reply #12 on: March 17, 2014, 09:01:39 pm »
Apologies for restarting this, but could you specifically describe what you did to get the very last part working? I followed everything right up until the end, but Im still getting

E: The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources
 

Im running Crunchbang linux.
Quote
The computer is mightier than the pen, the sword, and usually the programmer.

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
Re: Can't link graphics module of SFML on Linux
« Reply #13 on: March 17, 2014, 09:12:56 pm »
Hello Bruce,

The error was just that I had forgotten to change the /etc/apt/sources.list file.

Initially I had:
deb http://debian.mirrors.ovh.net/debian/ wheezy main
deb-src http://debian.mirrors.ovh.net/debian/ wheezy main

Which needs to be copy-pasted at the end of your sources.list file and changed to:
deb http://debian.mirrors.ovh.net/debian/ testing main
deb-src http://debian.mirrors.ovh.net/debian/ testing main

Also note that these are the valid URLs for my Linux server hosted by OVH. In your case it may not work. But this is not an issue, just adapt the solution with the URLs you already have in your sources.list file.

Ceylo
Want to play movies in your SFML application? Check out sfeMovie!

BruceJohnJennerLawso

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
    • My Code on Github
Re: Can't link graphics module of SFML on Linux
« Reply #14 on: March 17, 2014, 09:21:22 pm »
Hello Bruce,

The error was just that I had forgotten to change the /etc/apt/sources.list file.

Initially I had:
deb http://debian.mirrors.ovh.net/debian/ wheezy main
deb-src http://debian.mirrors.ovh.net/debian/ wheezy main

Which needs to be copy-pasted at the end of your sources.list file and changed to:
deb http://debian.mirrors.ovh.net/debian/ testing main
deb-src http://debian.mirrors.ovh.net/debian/ testing main

Also note that these are the valid URLs for my Linux server hosted by OVH. In your case it may not work. But this is not an issue, just adapt the solution with the URLs you already have in your sources.list file.

Ceylo

Ok, tried that, but still no dice.

What does you apt.conf file look like? I had to create mine as a text file, since it didnt actually exist, although there was a folder called apt.conf.d containing some odd files under /etc/apt.

What exactly did you type into the terminal? I'm not sure I follow what dabbertorres meant by adding the double quotes.

More generally, what exactly is the problem? Am I trying to get at a newer version of the package that SFML 2.1 needs?
Quote
The computer is mightier than the pen, the sword, and usually the programmer.

 

anything