Compiling 32-bit SDL on a 64-bit machine
How do I compile a 32-bit version of SDL so that 32-bit applications will use it? The reason I want to do this is because the version in the Arch repository isn't the newest, and doesn't directly support PulseAudio. I'm hoping that this will fix some issues I'm having.
|
Hello MTK358,
I cannot answer your question, but the documentation for CLFS (Cross-Linux-From-Scratch) is known to be excellent: http://trac.cross-lfs.org/ hope this helps Markus |
Just to be clear, I'm not compiling for another 32-bit machine, I'm compiling them to run in this one (which has multilib installed) so that 32-bit applications running on it will use the library I compiled.
Is the link you posted still relavent for this? |
You may look at AlienBobs multilib-packages for Slackware. They provide to compile packages for 32-bit machines: http://alien.slackbook.org/dokuwiki/...kware:multilib
There may be explanations which point you in the right direction. Markus |
That doesn't explain how to compile 32-bit compatibility packages, but how to use Slackware-specific tools to convert 32-bit Slackware packages into 32-bit compatibility packages for a multilib system.
I guess I could modify the 32-bit Arch packages in a similar way, but Arch works differently: it has /usr/lib and /usr/lib32, not /usr/lib64 and /usr/lib. Also, I see that SDL is split into multiple packages, such as sdl_image, sdl_mixer, etc.. When I compile the SDL package downloaded for the SDL website, does it come with all of these? Will just running "make install" install all of them? |
You could as well install Arch 32bit in a virtual machine and use this for package building.
Markus |
Quote:
Another thing I wanted to ask: Code:
$ env | egrep 'LD|LIB' |
When I look at the Arch-Wiki https://wiki.archlinux.org/index.php...side_Arch64.3F I understand that they have a similar approach as AlienBob's multilib for Slackware. I'm not a programmer, but hopfully you'll find an answer to your question in the link.
Markus |
Quote:
I think I'll report this thread to be moved to the Programming forum. |
MTK358,
While compiling is often part of writing s/w, it can also be part of the installation process. That is the case here. I don't think Programming is the right home for this thread, especially since you are getting answers here. |
Quote:
And I'm not sure as well if it is a programming-question or not. Actually it is more distribution-specific, but the Arch-forum here at LQ has not that much frequency. Maybe an Arch-only forum would be a better place for this question. @MTK358: good luck :) Markus |
Moved to programming @ OPs request.
|
I wrote this PKGBUILD:
Code:
pkgname=lib32-sdl Code:
./src/video/SDL_RLEaccel.c: Assembler messages: And two other questions: How do I find out the dependencies so that I can put them in the PKGBUILD? Will the package created by this PKGBUILD be equivanent to installing just the "sdl" package, or the "sdl" package and all of the "sdl_*" (i.e. sdl_image, sdl_mixer, etc.) packages? |
Hi MTK358,
I'm playing a bit with Arch :) I've installed x86_64 with multilib. I get the same error when using your PKGBUILD, but it compiles properly when using .configure && make in the sources. I suppose you have a mistake in the CFLAGS or LDFLAGS. Markus |
Quote:
Code:
./configure Code:
CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 ./configure Note that if I remove all those variables from the ./configure line (but still leave them on the make line), it compiles successfully, but file says that the resulting libraries are 64-bit. |
All times are GMT -5. The time now is 03:10 PM. |