Bug 35607 - xmame 0.77.1 fails to compile with USE="icc"
Bug#: 35607 Product:  Gentoo Linux Version: unspecified Platform: x86
OS/Version: Linux Status: RESOLVED Severity: minor Priority: P2
Resolution: FIXED Assigned To: games@gentoo.org Reported By: gentoo@nephros.org
Component: Games
URL: 
Summary: xmame 0.77.1 fails to compile with USE="icc"
Keywords:  
Status Whiteboard: 
Opened: 2003-12-11 08:17 0000
Description:   Opened: 2003-12-11 08:17 0000
When trying to compile xmame with icc-7.1.006, it throws the following error:

Compiling src/unix/video-drivers/x11_window.c ...
/usr/include/bits/ipctypes.h(33): error: "__ipc_pid_t" has already been declared in the current scope
  typedef int __ipc_pid_t;
              ^
compilation aborted for video-drivers/x11_window.c (code 2)


Reproducible: Always
Steps to Reproduce:
1. USE="icc" emerge xmame
2. watch it fail
3. USE="-icc" emerge xmame
4. compiles fine




etcat -u glibc

U I [ Found these USE variables in : sys-libs/glibc-2.3.2-r9 ]
 - - nls   : unknown
 + + pic   : If you want prelink support built into glibc
 - - build : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for 
creating build images and the first half of bootstrapping.
 + + nptl  : If you want the Native POSIX Threading Library built into glibc.

versions used:
icc-7.1.006
linux-headers-2.4.21-r1

CFLAGS="-w -march=athlon-mp -O3 -pipe -fomit-frame-pointer -ffast-math 
-mfpmath=sse,387 -m3dnow -frename-registers"

------- Comment #1 From Svein Erik Brostigen 2003-12-17 07:22:19 0000 -------
Upgrade icc to version 8 and xmame will compile succesfully after making the
following changes to the Makefile:

make.diff:
--- Makefile.org        2003-12-17 10:01:34.566956786 -0500
+++ Makefile    2003-12-17 10:02:04.087798412 -0500
@@ -266,7 +266,7 @@
 ifeq ($(CC),icc)

   # Optimizations for the Intel compiler.
-  CFLAGS    = -O3 -rcd -Xa -ipo -ipo_obj
+  CFLAGS    = -O3 -rcd -ipo -ipo_obj -w

 else
 ifeq ($(CC),sun-forte)

And the following change to one header file:

header.diff:
--- src/unix/osinline.h.org     2003-12-17 10:12:15.652914937 -0500
+++ src/unix/osinline.h 2003-12-17 10:12:34.010705964 -0500
@@ -20,6 +20,7 @@
 #define osd_mark_vector_dirty(x,y)
 #endif

+#undef X86_ASM
 #ifdef X86_ASM
 #define vec_mult _vec_mult
 INLINE int _vec_mult(int x, int y)

Write these changes to 2 different files and do the following steps:

1. ebuild /usr/portage/games-emulation/xmame/xmame-0.77.1.ebuild unpack
2. cd /var/tmp/portage/xmame-0.77.1/work/xmame-0.77.1
3. patch -p0 < make.diff
4. patch -p0 < header.diff
5. ebuild /usr/portage/games-emulation/xmame/xmame-0.77.1.ebuild compile
6. ebuild /usr/portage/games-emulation/xmame/xmame-0.77.1.ebuild install qmerge

------- Comment #2 From Svein Erik Brostigen 2003-12-17 07:26:17 0000 -------
Created an attachment (id=22348) [details]
DIff for Makefile

------- Comment #3 From Svein Erik Brostigen 2003-12-17 07:27:12 0000 -------
Created an attachment (id=22349) [details]
Diff fro src/unix/osinline.h

------- Comment #4 From SpanKY 2003-12-31 07:42:17 0000 -------
i dont personally use icc (cause i cant seem to get the sob to work at all) so
i added your fixes on blind faith

thanks ;)