zyedidia / SFML.jl

A binding of the game and multimedia library SFML for Julia
Other
93 stars 22 forks source link

Other glibc version then 2.14? #27

Closed jw3126 closed 8 years ago

jw3126 commented 8 years ago

I am trying to install SFML.jl on a linux machine and read the install instructions. They insist on glibc 2.14, however I don't want to downgrade it (I use 2.23). Is there a chance to get SFML.jl to work anyway?

zyedidia commented 8 years ago

What kind of error are you getting? Because I'm managing to run the package on a system with glibc 2.21. The problem is it's always a bit finicky and I'm not sure how strict of a requirement glibc 2.14 is. I would think having a more recent version shouldn't be a problem.

jw3126 commented 8 years ago

Thanks for the fast response! If I Pkg.add SFML.jl it builds without complaining. However when I try to run an example I get the following error:

INFO: Recompiling stale cache file /home/jan/.julia/lib/v0.4/SFML.ji for module SFML.
Could not resolve dependencies:
    libGLEW.so.1.10 => not found
Something has gone wrong with the SFML installation.
ErrorException("could not load library \"libsfml-graphics\"\nlibGLEW.so.1.10: cannot open shared object file: No such file or directory")
ERROR: LoadError: LoadError: UndefVarError: libcsfml_window not defined
 in get_desktop_mode at /home/jan/.julia/v0.4/SFML/src/julia/Graphics/videoMode.jl:16
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
 in process_options at ./client.jl:280
 in _start at ./client.jl:378
while loading /home/jan/.julia/v0.4/SpaceShooter/src/constants.jl, in expression starting on line 2
while loading /home/jan/.julia/v0.4/SpaceShooter/src/main.jl, in expression starting on line 14
zyedidia commented 8 years ago

It seems like you don't have GLEW installed and that's causing the problem. Have you run sudo apt-get install libsfml-dev? (assuming you are running debian)

jw3126 commented 8 years ago

Yeah I am running ubuntu16.04 and I did install sudo apt-get install libsfml-dev.

jw3126 commented 8 years ago

My libsfml-dev version is 2.3.2+dfsg-1.

zyedidia commented 8 years ago

Ok try running sudo apt-get install libglew1.10 and see if that fixes things.

jw3126 commented 8 years ago

It works now, though I had to install libglew1.10 manually, since apt-get complains that its obsolete. Thanks very much!

jw3126 commented 8 years ago

Or maybe there is still a problem, space shooter crashes after a few seconds

ERROR: LoadError: BoundsError: attempt to access 1-element Array{Animation,1}:
 Animation(SFML.Sprite(Ptr{Void} @0x000000000623e450,SFML.Texture(Ptr{Void} @0x0000000002e97b20)),23,SFML.Clock(Ptr{Void} @0x0000000006185a10),0.05,23,"expl_01_",SFML.Vector2f(1080.0026f0,438.63428f0))
  at index [3]
 in main at /home/jan/.julia/v0.4/SpaceShooter/src/main.jl:153
 in include at ./boot.jl:261
 in include_from_node1 at ./loading.jl:320
 in process_options at ./client.jl:280
 in _start at ./client.jl:378
while loading /home/jan/.julia/v0.4/SpaceShooter/src/main.jl, in expression starting on line 170
AL lib: (WW) FreeDevice: (0x20a2ab0) Deleting 8 Buffer(s)

I will try some more examples.

zyedidia commented 8 years ago

I don't think that's an issue with sfml.jl but rather with spaceshooter.jl. See zyedidia/SpaceShooter.jl#1.

jw3126 commented 8 years ago

Okay, the examples included in SFML.jl work!