You are not logged in.

#1 2012-12-20 09:45:13

Potomac
Member
Registered: 2011-12-25
Posts: 343

[solved] unable to compile mame with gcc 4.7.2

I tried to compile mame :

http://mamedev.org/downloader.php?file= … e0147s.zip

but it doesn't work, it fails with gcc 4.7.2 :

Compiling src/emu/cpu/tms32051/tms32051.c...
Generating TMS57002 source file...
obj/sdl/build/tmsmake src/emu/cpu/tms57002/tmsinstr.lst obj/sdl/emu/cpu/tms57002/tms57002.inc
Compiling src/emu/cpu/tms57002/tms57002.c...
{entrée standard}: Messages de l'assembleur:
{entrée standard}:3066: Avertissement: fin du fichier n'est pas à la fin de la ligne; nouvelle ligne insérée
{entrée standard}: Erreur: ouverture CFI à la fin du fichier; directive .cfi_endproc manquante
gcc: erreur interne du compilateur: Processus arrêté (program cc1plus)
Veuillez soumettre un rapport complet d'anomalies,
avec le source pré-traité si nécessaire.
Consultez <https://bugs.archlinux.org/> pour plus de détail.
make: *** [obj/sdl/emu/cpu/tms57002/tms57002.o] Erreur 4

I want to know how the official packager ( Sergej Pupykin ) succeeded to compile mame ? ( sdlmame package ) :

https://www.archlinux.org/packages/comm … 6/sdlmame/

Do I need an older version of gcc ?

Last edited by Potomac (2012-12-21 20:07:28)

Offline

#2 2012-12-20 10:21:14

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 5,125

Re: [solved] unable to compile mame with gcc 4.7.2

The PKGBUILD tells you just how the package is built:
https://projects.archlinux.org/svntogit … es/sdlmame

Offline

#3 2012-12-20 10:47:33

Potomac
Member
Registered: 2011-12-25
Posts: 343

Re: [solved] unable to compile mame with gcc 4.7.2

but the PKGBUILD file doesn't tell me which version of GCC he used,

I will try with the make command he used :

make NOWERROR=1 OPTIMIZE=2

Offline

#4 2012-12-20 12:02:22

Potomac
Member
Registered: 2011-12-25
Posts: 343

Re: [solved] unable to compile mame with gcc 4.7.2

well I still have the same error

Offline

#5 2012-12-21 13:26:50

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 4,399

Re: [solved] unable to compile mame with gcc 4.7.2

sdlmame 0.147.u4-1
Last Updated:     2012-12-20 12:41 UTC

Best check again, normally arch packages are always build against the latest versions.


Booting with apg Openrc, NOT systemd.
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#6 2012-12-21 14:33:49

Potomac
Member
Registered: 2011-12-25
Posts: 343

Re: [solved] unable to compile mame with gcc 4.7.2

I found a solution by installing an older version of gcc ( 4.4.5 ) and I can compile now mame,

it's a known problem about gcc and mame, the source code is not compatible with gcc 4.7.2 ( and even with some older releases ) :

http://forums.gentoo.org/viewtopic-t-84 … 0473b82412

check the first comment here ( padremayi ), same error :

https://aur.archlinux.org/packages/sdlm … setlang=fr

the solution is to use gcc 4.4.5 version,

you need also to patch one file in gcc 4.4.5 :

--- gcc/config/i386/linux-unwind.h	2009-04-10 01:23:07.000000000 +0200
+++ gcc/config/i386/linux-unwind.h	2012-12-21 03:10:27.000000000 +0100
@@ -133,9 +133,9 @@
     {
       struct rt_sigframe {
 	int sig;
-	struct siginfo *pinfo;
+	siginfo_t *pinfo;
 	void *puc;
-	struct siginfo info;
+	siginfo_t info;
 	struct ucontext uc;
       } *rt_ = context->cfa;
       /* The void * cast is necessary to avoid an aliasing warning.

edit : the solution was to increase ram memory in virtualbox, with gcc 4.7.2 and 1.5 Gb ram I can compile mame without errors, but with 1 Gb ram the error occurs

maybe it's a bug in gcc 4.7.2 ( because with gcc 4.4.5 I don't need to increase ram )

Last edited by Potomac (2012-12-25 12:09:52)

Offline

Board footer

Powered by FluxBB