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

Author Topic: [SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat  (Read 4339 times)

0 Members and 1 Guest are viewing this topic.

Wafthrudnir

  • Newbie
  • *
  • Posts: 26
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« on: December 30, 2010, 11:19:21 pm »
Hi everyone,
I'm new here, but a silent fan of SFML...best library ever :> But now I have a silly problem  :oops:

I normally used SFML with Wintendo, but this time I wanted to use Linux. Anyway...

I tried to compile the libs via make.

Code: [Select]

make


seems to work

Code: [Select]

sudo make install


seems to work too, see here:
Code: [Select]

nakkvarr@midgard:~/Downloads/SFML-1.6$ sudo make install
[sudo] password for nakkvarr:
make[1]: Betrete Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML'
make[2]: Betrete Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/System'
make[2]: Verlasse Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/System'
make[2]: Betrete Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/Window'
make[2]: Verlasse Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/Window'
make[2]: Betrete Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/Network'
make[2]: Verlasse Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/Network'
make[2]: Betrete Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/Graphics'
make[2]: Verlasse Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/Graphics'
make[2]: Betrete Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/Audio'
make[2]: Verlasse Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/Audio'
make[1]: Verlasse Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML'

(Betrete/Verlasse Verzeichnis means: entering/leaving directory) ;D

Anyway...can't find any libs in /usr/lib

And when i try to execute
Code: [Select]

sudo make install STATIC=yes


make fails hard:
Code: [Select]

nakkvarr@midgard:~/Downloads/SFML-1.6$ sudo make install STATIC=yes
[sudo] password for nakkvarr:
make[1]: Betrete Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML'
make[2]: Betrete Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/System'
cp: Aufruf von stat für „../../../lib/libsfml-system-s.a“ nicht möglich: Datei oder Verzeichnis nicht gefunden
make[2]: *** [install] Fehler 1
make[2]: Verlasse Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML/System'
make[1]: *** [install] Fehler 2
make[1]: Verlasse Verzeichnis '/home/nakkvarr/Downloads/SFML-1.6/src/SFML'
make: *** [install] Fehler 2


Can't find the file „../../../lib/libsfml-system-s.a“ ?! :/

What's the problem? I downloaded SFML 1.6 and installed all dependencies via the Ubuntu repo...

I don't like shared libs so I wanted to build the static lib for sfml (like the ones in the windows pre build from this site) ...

Hope anyone can help me :>

Regards,

Wafthrudnir
Black Metal + Coding = Win!

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #1 on: December 31, 2010, 10:42:24 pm »
Wintendo... lawl XD

You can't find it, because normally it is under /usr/local/lib. Just add it to the PATH environment variable (google it), and you can use SFML.

Wafthrudnir

  • Newbie
  • *
  • Posts: 26
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #2 on: December 31, 2010, 10:52:22 pm »
Hi,

thank you, you're right, there they are
Code: [Select]

nakkvarr@midgard:/usr/local/lib$ ls
libsfml-audio.so         libsfml-network.so      libsfml-window.so
libsfml-audio.so.1.6     libsfml-network.so.1.6  libsfml-window.so.1.6
libsfml-graphics.so      libsfml-system.so       python2.6
libsfml-graphics.so.1.6  libsfml-system.so.1.6


Thanks a lot. :D
Next question: Why does the static build not work? :/
DEBUGBUILD=yes works fine (except the .so files have no -d in their name, do i have to rename them by hand?).

Regards,

Wafthrudnir
Black Metal + Coding = Win!

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #3 on: January 01, 2011, 11:41:55 pm »
If there is no -d in the library names, than it didn't compile. I guess you just took the release builds of the library, and made the compiler think they are debug, but it couldn't find the debug symbols. Check this out. If it's not the case, then I suggest delete everything and start it over. More often helps than not ;)

Wafthrudnir

  • Newbie
  • *
  • Posts: 26
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #4 on: January 02, 2011, 12:58:30 am »
Hi thanks,

but somehow it just won't work, I execute:

Code: [Select]
make STATIC=yes

and I get this in the lib folder:
Code: [Select]

nakkvarr@midgard:~/Downloads/SFML-1.6/lib$ ls
libsfml-audio-s.a        libsfml-network-s.a     libsfml-window-s.a
libsfml-audio.so.1.6     libsfml-network.so.1.6  libsfml-window.so.1.6
libsfml-graphics-s.a     libsfml-system-s.a
libsfml-graphics.so.1.6  libsfml-system.so.1.6


seems to work...
when I try this:
Code: [Select]
make DEBUGBUILD=yes
sudo make install

does not work or do I miss something?! oO

What I need are the static and static-debug builds...but

Code: [Select]
make DEBUGBUILD=yes STATIC=yes
is not working either...

Do I miss something?!

EDIT:
Ok I think it's an error in the makefile. I changed the makefile:
Code: [Select]

DEBUGFLAGS = -g -DDEBUG
BUILDFLAGS = -fPIC
LINKFLAGS  = -shared

Make creates the files, but is not renaming them with the -d suffix. :/ like:
libsfml-network-s.a
and not
libsfml-network-s-d.a

EDIT2:
Ok i checked it, the makefile is not setting the -d suffix...
the filename stays the same, with or without DEBUGBUILD=yes, but the filesize changes:
no debug: ~141kb
with debug: >1MB
Debug info added :lol:  


btw.:
I think the tutorial should be updated:
1. usr/local/lib is the path where the .so files are placed
2. and after a successful build the user should check if this path is in the ld.so.cache.

Code: [Select]

cat /etc/ld.so.conf
#eventually the user has to call the included file with cat if there's one
# if the dir is not there ->
vi ld.so.conf
# add the file
#and finally
ldconfig

Now check if sfml is there:
Code: [Select]

ldconfig -p | grep sfml


otherwise the samples may not run...btw lepitoptera.org is a cool song :D
Black Metal + Coding = Win!

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #5 on: January 02, 2011, 03:42:48 am »
Well, I suggest use SFML2.0, which uses CMake as a build system. There is even a tutorial about using it with sfml.

Quote
btw lepitoptera.org is a cool song :D

o.O? Googled it, nuffin'...

Quote
the filename stays the same, with or without DEBUGBUILD=yes, but the filesize changes:

It's a sign. Don't bother programming, go out, and get a normal life. I mean it. I'm a programmer. Believe me. :D :lol:

Wafthrudnir

  • Newbie
  • *
  • Posts: 26
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #6 on: January 02, 2011, 03:52:03 am »
Quote

Well, I suggest use SFML2.0, which uses CMake as a build system. There is even a tutorial about using it with sfml.


Yeah I think I will give it a try, later ;D I can't decide between 1.6 or 2.0 ...


lepitoptera.org is the song used in the SFML sound sample :D You can find it in the samples/bin/datas/sound folder. Oh an there's a mistake in writing...the correct filename is:
lepidoptera.ogg ...sorry :roll:

Quote

It's a sign. Don't bother programming, go out, and get a normal life. I mean it. I'm a programmer. Believe me. Very Happy Laughing


My normal life is too normal :P And annoyingly my job forces me to develop software <.< (atm Java stuff).

I think the missing -d suffix is too confusing  :roll:
Black Metal + Coding = Win!

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #7 on: January 02, 2011, 04:01:11 am »
Oh, that lepidoptera... I know that :D
Can't decide between SFML1.6 and 2.0? Then I make it easy: use 2.0 ;) I use it, and never had any trouble with it (I'm using it for 1-2 years or so).

what missing -d suffix are you talking about? The one you just solved, or another? :D

Wafthrudnir

  • Newbie
  • *
  • Posts: 26
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #8 on: January 02, 2011, 04:04:35 am »
Quote

Can't decide between SFML1.6 and 2.0? Then I make it easy: use 2.0 Wink I use it, and never had any trouble with it (I'm using it for 1-2 years or so).

Ok I will give it a try ;D (and again...MAKE T_T  :roll: ) :P

Quote

what missing -d suffix are you talking about? The one you just solved, or another? Very Happy

Yes the one I solved ;D I mean, you are buildig the debug libs, and have no -d suffix like you have with the Wintendo builds oO This is a crazy world :P

And before I forget, thanks for your help :)
Black Metal + Coding = Win!

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #9 on: January 02, 2011, 04:12:35 am »
Quote
(and again...MAKE T_T Rolling Eyes

Is it capitalized? http://en.wikipedia.org/wiki/Make_%28software%29

well... you're welcome :)

Wafthrudnir

  • Newbie
  • *
  • Posts: 26
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #10 on: January 02, 2011, 04:14:24 am »
Quote

Is it capitalized? http://en.wikipedia.org/wiki/Make_%28software%29

w00t? I was just screaming ;D
Black Metal + Coding = Win!

nulloid

  • Full Member
  • ***
  • Posts: 134
    • View Profile
[SOLVED] Make SFML + Ubuntu 10.10 | Maverick Meerkat
« Reply #11 on: January 02, 2011, 05:51:24 am »
Oh, get it :D