Cross compiling mixer

Dear all

When cross compiling SDL_mixer with Linux for windows. I got an error when
building the library. I could cross comp?le fine SDL and SDL_image. But mixer
failes. I remember running in the same problem some time ago and got it solved
by setting some environment variable regarding recursive libraries.
Unfortunately, I lost the information with my previous computer and my own
memory is not precise enough. Would anyone be kind enough to help me with that
problem

Thanks

Fred

mv -f “.libs/libSDL_mixer.expT” ".libs/libSDL_mixer.exp"
if test “x/bin/sed 1q .libs/libSDL_mixer.exp” = xEXPORTS; then cp
.libs/libSDL_mixer.exp .libs/SDL_mixer.dll.def; else echo EXPORTS >
.libs/SDL_mixer.dll.def; cat .libs/libSDL_mixer.exp >> .libs/SDL_mixer.dll.def;
fi
i386-mingw32msvc-gcc -shared .libs/SDL_mixer.dll.def .libs/load_aiff.o
.libs/load_voc.o .libs/load_ogg.o .libs/mixer.o .libs/music.o .libs/music_cmd.o
.libs/music_ogg.o .libs/wavestream.o .libs/effect_position.o
.libs/effect_stereoreverse.o .libs/effects_internal.o -Wl,–whole-archive
timidity/.libs/libtimidity.a native_midi/.libs/libnativemidi.a
-Wl,–no-whole-archive -L/usr/X11R6/lib -L/usr/lib -lwinmm
-L/usr/local/cross-tools/i386-mingw32msvc/lib -lmingw32 -lSDLmain
/usr/lib/libSDL.so /usr/lib/libmikmod.so -lpthread -ldl -lm -mwindows -o
.libs/SDL_mixer.dll -Wl,–enable-auto-image-base
-Wl,–out-implib,.libs/libSDL_mixer.dll.a
/usr/lib/libSDL.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [libSDL_mixer.la] Erreur 1
make[1]: Quitte le r?pertoire `/home/SDL/crosscompiler/SDL_mixer-1.2.6’
make: *** [all-recursive] Erreur 1

Dear all

When cross compiling SDL_mixer with Linux for windows. I got an error when
building the library. I could cross comp?le fine SDL and SDL_image. But mixer
failes. I remember running in the same problem some time ago and got it solved
by setting some environment variable regarding recursive libraries.
Unfortunately, I lost the information with my previous computer and my own
memory is not precise enough. Would anyone be kind enough to help me with that
problem

Well the source of the problem is obvious, it hasn’t got
anything to do with recursive libraries:

mv -f “.libs/libSDL_mixer.expT” ".libs/libSDL_mixer.exp"
if test “x/bin/sed 1q .libs/libSDL_mixer.exp” = xEXPORTS; then cp
.libs/libSDL_mixer.exp .libs/SDL_mixer.dll.def; else echo EXPORTS >
.libs/SDL_mixer.dll.def; cat .libs/libSDL_mixer.exp >> .libs/SDL_mixer.dll.def;
fi
i386-mingw32msvc-gcc -shared .libs/SDL_mixer.dll.def .libs/load_aiff.o
.libs/load_voc.o .libs/load_ogg.o .libs/mixer.o .libs/music.o .libs/music_cmd.o
.libs/music_ogg.o .libs/wavestream.o .libs/effect_position.o
.libs/effect_stereoreverse.o .libs/effects_internal.o -Wl,–whole-archive
timidity/.libs/libtimidity.a native_midi/.libs/libnativemidi.a

-Wl,–no-whole-archive -L/usr/X11R6/lib -L/usr/lib -lwinmm

This is rubbish: binding to host instead of target:
wrong -L switches.

-L/usr/local/cross-tools/i386-mingw32msvc/lib -lmingw32 -lSDLmain
/usr/lib/libSDL.so /usr/lib/libmikmod.so -lpthread -ldl -lm -mwindows -o

Same here. /usr/lib/libSDL.so??? The -l switches may be correct
due to -L/usr/local/cross-tools …

.libs/SDL_mixer.dll -Wl,–enable-auto-image-base
-Wl,–out-implib,.libs/libSDL_mixer.dll.a
/usr/lib/libSDL.so: could not read symbols: Invalid operation

Well of course, mingw linker is trying to link your Linux ELF
/usr/lib/libSDL.so … which is the wrong library.

I would have to guess you need to tell ./configure script
you’re cross compiling, including the locations of all
the libraries that are required.On Fri, 2006-03-03 at 15:00 +0000, Fred Perie wrote:


John Skaller
Async PL, Realtime software consultants
Checkout Felix: http://felix.sourceforge.net

Well of course, mingw linker is trying to link your Linux ELF
/usr/lib/libSDL.so … which is the wrong library.

I would have to guess you need to tell ./configure script
you’re cross compiling, including the locations of all
the libraries that are required.

Thanks

Well of course, I noticed the /usr/lib and /usr/local/lib in my Makefile

This Makefile was produced by cross-configure.sh

cross-configure.sh
cross-make.sh

I did proceed the same way with SDL_image and it worked

What should I do to use configure instead? or should I modify Makefile by hand.

Fred

The problem was solved by configuring without libmikmod

cross-configure.sh --enable-music-libmikmod=no