Unable to build Gens 2.15.4 in OpenSUSE 11.0 (x86_64)

Hi, All,

I’m trying to build Gens 2.15.4, and I run into the same problem every time I try using make to build it:

make[3]: *** [gens_core/cpu/68k/gens-cpu_68k.o] Error 1
make[3]: Leaving directory `/home/kelly/packages/gens-2.15.4/src/gens'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/kelly/packages/gens-2.15.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kelly/packages/gens-2.15.4'
make: *** [all] Error 2

I have the necessary build environment installed (gcc, g++, make, nasm, GTK+ development libs, etc.) but keep hitting this brick wall…Have I missed anything, or could it simply be that the source will only build in a 32-bit environment? the configure script doesn’t report anything out-of-the-ordinary.

Mine is a dual-core 64-bit machine running OpenSUSE 11.0 x86_64.

Hi
Need to see a few lines before the error at what it was trying to do…

Besides, if you search here for Gens;
Get It

There is a later version available in the Emulators repository;
http://download.opensuse.org/repositories/Emulators/openSUSE_11.0/


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 5 days 12:40, 1 user, load average: 0.52, 0.37, 0.30
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.82

Hi Malcolm,

Thank you for the advice.

I’ve performed the search, as you advised, but there is no x86_64 version available (in fact, this is usually the case; it’s why I try to build Gens from source.)

Anyway, as for the information you requested:

Making all in gens
make[3]: Entering directory `/home/kelly/packages/gens-2.15.4/src/gens'
gcc -DHAVE_CONFIG_H -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./util/gfx -I./util/sound -I./util/file -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 -I/usr/include/gtk-2.0 -I/usr/lib64/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/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -g -O2 -Wall -W -g -O2 -Wall -W -MT gens_core/cpu/68k/gens-cpu_68k.o -MD -MP -MF gens_core/cpu/68k/.deps/gens-cpu_68k.Tpo -c -o gens_core/cpu/68k/gens-cpu_68k.o `test -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:27: warning: missing initializer
gens_core/cpu/68k/cpu_68k.c:27: warning: (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:28: warning: missing initializer
gens_core/cpu/68k/cpu_68k.c:28: warning: (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:29: warning: missing initializer
gens_core/cpu/68k/cpu_68k.c:29: warning: (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:63: warning: missing initializer
gens_core/cpu/68k/cpu_68k.c:63: warning: (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] Error 1
make[3]: Leaving directory `/home/kelly/packages/gens-2.15.4/src/gens'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/kelly/packages/gens-2.15.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kelly/packages/gens-2.15.4'
make: *** [all] Error 2

Quite frankly, I’m stumped…:\

Of course, I just noticed ‘Missing Initializer’ and ‘Initializer element is not constant’ in the error messages above. Could there be that bad a flaw in the source?

Oh, and trying to install the source package from the src/ repo generates a dependency problem:

The following packages were not found on the medium:

gens

OOPS!! Sorry, I clicked the quote button by mistake…

Hi
Download the src rpm from the link and build from that, there are a
couple of patches in there that may help (or not). Also you need to
have SDL-devel, gtk2-devel and nasm installed.


rpmbuild --rebuild gens-2.15.5-1.1.src.rpm

I’m not sure but maybe you just need to install the 32bit version?

Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel 2.6.25.18-0.2-default
up 0:25, 2 users, load average: 0.10, 0.18, 0.24
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.82

Well, the 32-bit package was installed, and appears to work fine.

I’d rather have a native 64-bit version, but that doesn’t appear possible at the moment.

Many thanks for pointing me in that direction and trying to assist with generating a 64-bit package, even if it is (temporarily) futile. I guess there are still many more 32-bit users than 64-bit ones… :expressionless:

Your problem is easily fixable, but at the end there is assembly code that must be modified to make it work in x86-64. That’s more complex… you can ask upstream, but don’t expect a fix soon.