Salut à tous !
Je viens faire appel à votre science afin de comprendre un peu mieux certains mystères de la compilation…
Je suis un nostalgique des jeux Sega Megadrive, et surtout Sonic. Je suis donc de ce fait amoureux de l’émulateur Gens. Seulement voilà, je n’arrive pas à le compiler sur ma Debian x64 et ça ne ressemble pas à un problème de dépendances.
En voulant compiler, j’obtiens le log cité à la fin de ce sujet. J’ai essayé avec l’option -m32 de gcc (sans savoir réellement où la spécifier…) mais toujours la même erreur. Ce qui m’étonne le plus, c’est qu’en compilant sur une machine en 32 bits et en rappatriant le dossier sur ma x64, je peux l’exécuter sans aucun bug.
Il doit donc bien y avoir un moyen de le compiler proprement depuis ma x64, même si c’est pour le compiler en 32 bits, non ?
Merci d’avance de votre aide 
Sources : mythtv.wbond.net/gens_for_linux_ … ngl.tar.gz
[quote]$ ./configure && make
checking build system type… x86_64-unknown-linux-gnu
checking host system type… x86_64-unknown-linux-gnu
checking target system type… x86_64-unknown-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ANSI C… none needed
checking for style of include used by make… GNU
checking dependency style of gcc… gcc3
checking whether gcc and cc understand -c and -o together… yes
checking for strerror in -lcposix… no
checking how to run the C preprocessor… gcc -E
checking for egrep… grep -E
checking for ANSI C header files… yes
checking for pkg-config… /usr/bin/pkg-config
checking for GTK+ - version >= 2.4.0… yes (version 2.12.2)
checking for sdl-config… /usr/bin/sdl-config
checking for SDL - version >= 1.1.3… yes
checking for nasm… /usr/bin/nasm
checking for OpenGL support… yes
checking for clock_gettime in -lrt… yes
checking for getopt in -lc… yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating pixmaps/Makefile
config.status: creating src/Makefile
config.status: creating src/gens/Makefile
config.status: creating src/starscream/Makefile
config.status: creating src/starscream/main68k/Makefile
config.status: creating src/starscream/sub68k/Makefile
config.status: creating config.h
config.status: executing default-1 commands
cd .
&& CONFIG_FILES= CONFIG_HEADERS=config.h
/bin/sh ./config.status
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default-1 commands
make all-recursive
make[1]: entrant dans le répertoire « /home/knux/test/gens-mythgame-opengl »
Making all in src
make[2]: entrant dans le répertoire « /home/knux/test/gens-mythgame-opengl/src »
Making all in starscream
make[3]: entrant dans le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream »
Making all in main68k
make[4]: entrant dans le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream/main68k »
source=‘star.c’ object=‘star.o’ libtool=no
depfile=’.deps/star.Po’ tmpdepfile=’.deps/star.TPo’
depmode=gcc3 /bin/sh …/…/…/depcomp
gcc -DHAVE_CONFIG_H -I. -I. -I…/…/… -g -O2 -c test -f star.c || echo './'star.c
gcc -g -O2 -lGL -o star star.o -lc -lrt
./star main68k.asm -hog -name main68k_
STARSCREAM version M0.26d
Generating “main68k.asm” with the following options:
- CPU type: 68000 (24-bit addresses)
- Identifiers begin with “main68k_”
- Stack calling conventions
- Hog mode: On
Decoding instructions: 0123456789ABCDEF done
Building table: done
routine_counter = 7244
make all-am
make[5]: entrant dans le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream/main68k »
make[5]: Rien à faire pour « all-am ».
make[5]: quittant le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream/main68k »
make[4]: quittant le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream/main68k »
Making all in sub68k
make[4]: entrant dans le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream/sub68k »
source=‘star.c’ object=‘star.o’ libtool=no
depfile=’.deps/star.Po’ tmpdepfile=’.deps/star.TPo’
depmode=gcc3 /bin/sh …/…/…/depcomp
gcc -DHAVE_CONFIG_H -I. -I. -I…/…/… -g -O2 -ctest -f star.c || echo './'star.c
gcc -g -O2 -lGL -o star star.o -lc -lrt
./star sub68k.asm -hog -name sub68k_
STARSCREAM version S0.26d
Generating “sub68k.asm” with the following options: - CPU type: 68000 (24-bit addresses)
- Identifiers begin with “sub68k_”
- Stack calling conventions
- Hog mode: On
Decoding instructions: 0123456789ABCDEF done
Building table: done
routine_counter = 7244
make all-am
make[5]: entrant dans le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream/sub68k »
make[5]: Rien à faire pour « all-am ».
make[5]: quittant le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream/sub68k »
make[4]: quittant le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream/sub68k »
make[4]: entrant dans le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream »
make[4]: Rien à faire pour « all-am ».
make[4]: quittant le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream »
make[3]: quittant le répertoire « /home/knux/test/gens-mythgame-opengl/src/starscream »
Making all in gens
make[3]: entrant dans le répertoire « /home/knux/test/gens-mythgame-opengl/src/gens »
source=‘gens_core/cpu/68k/cpu_68k.c’ object=‘gens_core/cpu/68k/gens-cpu_68k.o’ libtool=no
depfile=’.deps/gens_core/cpu/68k/gens-cpu_68k.Po’ tmpdepfile=’.deps/gens_core/cpu/68k/gens-cpu_68k.TPo’
depmode=gcc3 /bin/sh …/…/depcomp
gcc -DHAVE_CONFIG_H -I. -I. -I…/… -I./gens_core/cpu/68k -I./gens_core/cpu/sh2 -I./gens_core/cpu/z80 -I./gens_core/sound -I./gens_core/mem -I./gens_core/misc -I./gens_core/gfx -I./gens_core/io -I./gens_core/vdp -I./segacd -I./mp3_dec -I./sdllayer -I./util -I./port -I./emulator -I./debug -I./netplay -I./gtkui -I./gtkui/glade -I. -DDATADIR="/usr/local/share/gens" -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DPNG_NO_MMX_CODE -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -g -O2 -c -o gens_core/cpu/68k/gens-cpu_68k.otest -f gens_core/cpu/68k/cpu_68k.c || echo './'gens_core/cpu/68k/cpu_68k.c
gens_core/cpu/68k/cpu_68k.c:27: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:27: error: initializer element is not constant
gens_core/cpu/68k/cpu_68k.c:27: error: (near initialization for ‘M68K_Fetch[1].offset’)
gens_core/cpu/68k/cpu_68k.c:28: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:28: error: initializer element is not constant
gens_core/cpu/68k/cpu_68k.c:28: error: (near initialization for ‘M68K_Fetch[2].offset’)
gens_core/cpu/68k/cpu_68k.c:29: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:29: error: initializer element is not constant
gens_core/cpu/68k/cpu_68k.c:29: error: (near initialization for ‘M68K_Fetch[3].offset’)
gens_core/cpu/68k/cpu_68k.c:30: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:31: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:32: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:63: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:63: error: initializer element is not constant
gens_core/cpu/68k/cpu_68k.c:63: error: (near initialization for ‘S68K_Fetch[0].offset’)
gens_core/cpu/68k/cpu_68k.c:64: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:65: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c: In function ‘M68K_Reset’:
gens_core/cpu/68k/cpu_68k.c:166: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:170: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:176: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:180: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:184: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:194: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:198: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:202: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:216: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:220: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:224: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c: In function ‘M68K_32X_Mode’:
gens_core/cpu/68k/cpu_68k.c:270: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:278: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:282: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:286: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:290: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:294: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:303: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:307: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:311: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:315: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:319: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:323: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:333: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:337: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:341: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:345: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:349: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c: In function ‘M68K_Set_32X_Rom_Bank’:
gens_core/cpu/68k/cpu_68k.c:365: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c: In function ‘M68K_Set_Prg_Ram’:
gens_core/cpu/68k/cpu_68k.c:390: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c: In function ‘MS68K_Set_Word_Ram’:
gens_core/cpu/68k/cpu_68k.c:405: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:413: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:423: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:427: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:433: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:437: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:443: warning: cast from pointer to integer of different size
gens_core/cpu/68k/cpu_68k.c:447: warning: cast from pointer to integer of different size
make[3]: *** [gens_core/cpu/68k/gens-cpu_68k.o] Erreur 1
make[3]: quittant le répertoire « /home/knux/test/gens-mythgame-opengl/src/gens »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /home/knux/test/gens-mythgame-opengl/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/knux/test/gens-mythgame-opengl »
make: *** [all] Erreur 2
[/quote]

