SFML community forums

Help => General => Topic started by: Nexus on October 07, 2011, 05:02:28 pm

Title: Compile SFML for 32 bits
Post by: Nexus on October 07, 2011, 05:02:28 pm
I try to compile SFML 2 for 32 Bits on a 64 Bit Ubuntu. I have added the flag -m32 to CMAKE_CXX_FLAGS.

When I tried to build SFML, I first got errors concerning an incompatible standard library, which could be fixed through a symbolic link:
Code: [Select]
sudo ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so
Now a similar problem occured with the GLEW library:
Quote
Linking CXX shared library ../../../lib/libsfml-graphics.so
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libGLEW.so when searching for -lGLEW
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../libGLEW.a when searching for -lGLEW
/usr/bin/ld: skipping incompatible //usr/lib/libGLEW.so when searching for -lGLEW
/usr/bin/ld: skipping incompatible //usr/lib/libGLEW.a when searching for -lGLEW
/usr/bin/ld: cannot find -lGLEW
collect2: ld returned 1 exit status

I guess I need a 32 bit version, or make the path known. But I don't know how to. I currently have the packages libglew1.5 and libglew1.5-dev installed.

Do you know more about this issue and possible solutions?
Title: Compile SFML for 32 bits
Post by: Laurent on October 07, 2011, 06:14:31 pm
You need to have the whole chain (mostly libraries, maybe some tools) in 32 bits version.

An alternative solution is to use a virtual machine with a 32 bits Linux on it.
Title: Compile SFML for 32 bits
Post by: Nexus on October 07, 2011, 06:25:00 pm
Okay, thank you. I still wonder whether my GLEW library is compiled for 64 bit and if so, how I can get a 32 bit version. I didn't see one in the packet manager, nor did I find any binaries for Ubuntu on the internet. But maybe I have just overlooked something.

And recompile every library manually... Hm, not the thing I currently feel like ;)
Title: Compile SFML for 32 bits
Post by: gr3atmov3 on October 15, 2011, 10:36:25 pm
Nexus, I have the same problem. I did exactly the same you did, i cant solve that problem.
I downloaded the 32 bit from SFML download page, but i cant manage to get eclipse working with those, instead of the onces for 64 downloaded from synaptic.

Have you solved it?

Thx,
Title: Compile SFML for 32 bits
Post by: Nexus on October 15, 2011, 10:49:56 pm
Quote from: "gr3atmov3"
Have you solved it?
No, unfortunately not.

I have only found this thread (http://www.sfml-dev.org/forum/viewtopic.php?t=5531), maybe we should ask OniLink10 how he compiled SFML for 32 bits.
Title: Compile SFML for 32 bits
Post by: OniLinkPlus on October 15, 2011, 11:12:49 pm
I'm running Arch Linux and have the multilib repos active. For all of the libs used by SFML, I just installed the lib32 variant.
Title: Compile SFML for 32 bits
Post by: Nexus on October 25, 2011, 05:52:02 pm
After some searches on the internet, I have succeeded to compile SFML for 32 bits. I used the getlibs software, it makes the installation of 32 bit libraries really easy!
Title: Compile SFML for 32 bits
Post by: Svenstaro on October 26, 2011, 03:24:25 am
Why don't you just use this: https://aur.archlinux.org/packages.php?ID=49557 ?
Title: Compile SFML for 32 bits
Post by: Silvah on October 26, 2011, 02:53:59 pm
Quote from: "Svenstaro"
Why don't you just use this: https://aur.archlinux.org/packages.php?ID=49557 ?
I bet that's because AUR stands for Arch User Repository and he's using Ubuntu :P
Title: Compile SFML for 32 bits
Post by: Svenstaro on October 26, 2011, 03:34:04 pm
Ohh just saw that. Oh well.