i686-pc-linux-gnu-g++ -I../include -I. -I../natfeat -I../uae_cpu -I../gui-sdl -DHAVE_CONFIG_H -DOS_linux -DCPU_i386 -DDIRSEPARATOR=\"\/\" -D_GNU_SOURCE -DFIXED_ADDRESSING -DFMEMORY=0x51000000 -DUNALIGNED_PROFITABLE -DREGPARAM="__attribute__((regparm(3)))" -DX86_ASSEMBLY -DOPTIMIZED_FLAGS -DSAHF_SETO_PROFITABLE -DUSE_JIT=1 -DUSE_JIT_FPU=1 -DFPU_IEEE -DENABLE_EXCLUSIVE_SPCFLAGS -D_REENTRANT -D_THREAD_SAFE -ggdb3 -Wall -W -O3 -O3 -march=athlon-xp -msse -mfpmath=sse -mmmx -m3dnow -fomit-frame-pointer -ffast-math -funroll-loops -pipe -ftracer -funit-at-a-time -fomit-frame-pointer -fno-rtti -fno-exceptions -fno-gcse-sm -I/usr/include/SDL -D_REENTRANT -DARANYM_DATADIR="\"/usr/share/aranym\"" -c ../natfeat/nfcdrom_linux.cpp -o obj/nfcdrom_linux.o In file included from ./sysdeps.h:99, from ../natfeat/nfcdrom_linux.cpp:26: /usr/include/sys/stat.h:44: error: conflicting declaration 'typedef __dev_t dev_t' /usr/include/linux/types.h:25: error: 'dev_t' has a previous declaration as `typedef __kernel_dev_t dev_t' /usr/include/sys/stat.h:44: error: declaration of `typedef __dev_t dev_t' /usr/include/linux/types.h:25: error: conflicts with previous declaration `typedef __kernel_dev_t dev_t' /usr/include/sys/stat.h:44: error: declaration of `typedef __dev_t dev_t' /usr/include/linux/types.h:25: error: conflicts with previous declaration `typedef __kernel_dev_t dev_t' /usr/include/sys/stat.h:63: error: conflicting declaration 'typedef __mode_t mode_t' /usr/include/linux/types.h:31: error: 'mode_t' has a previous declaration as `typedef __kernel_mode_t mode_t' /usr/include/sys/stat.h:63: error: declaration of `typedef __mode_t mode_t' /usr/include/linux/types.h:31: error: conflicts with previous declaration `typedef __kernel_mode_t mode_t' /usr/include/sys/stat.h:63: error: declaration of `typedef __mode_t mode_t' /usr/include/linux/types.h:31: error: conflicts with previous declaration `typedef __kernel_mode_t mode_t' /usr/include/sys/stat.h:68: error: conflicting declaration 'typedef __nlink_t nlink_t' /usr/include/linux/types.h:34: error: 'nlink_t' has a previous declaration as `typedef __kernel_nlink_t nlink_t' /usr/include/sys/stat.h:68: error: declaration of `typedef __nlink_t nlink_t' /usr/include/linux/types.h:34: error: conflicts with previous declaration `typedef __kernel_nlink_t nlink_t' /usr/include/sys/stat.h:68: error: declaration of `typedef __nlink_t nlink_t' /usr/include/linux/types.h:34: error: conflicts with previous declaration `typedef __kernel_nlink_t nlink_t' In file included from /usr/include/sys/types.h:216, from ./sysdeps.h:107, from ../natfeat/nfcdrom_linux.cpp:26: /usr/include/sys/select.h:78: error: conflicting declaration 'typedef struct fd_set fd_set' /usr/include/linux/types.h:22: error: 'fd_set' has a previous declaration as `typedef struct __kernel_fd_set fd_set' /usr/include/sys/select.h:78: error: declaration of `typedef struct fd_set fd_set' /usr/include/linux/types.h:22: error: conflicts with previous declaration `typedef struct __kernel_fd_set fd_set' /usr/include/sys/select.h:78: error: declaration of `typedef struct fd_set fd_set' /usr/include/linux/types.h:22: error: conflicts with previous declaration `typedef struct __kernel_fd_set fd_set' /usr/include/sys/select.h:78: error: declaration of `typedef struct fd_set fd_set' /usr/include/linux/types.h:22: error: conflicts with previous declaration `typedef struct __kernel_fd_set fd_set' make: *** [obj/nfcdrom_linux.o] Error 1 Reproducible: Always Steps to Reproduce: emerge -v aranym Actual Results: compilation failure. Expected Results: correct compilation New aranym version (0.9.0) has same problem. This looks like a conflict between glibc and kernel-headers. athlon portage # emerge info Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.12-gentoo-r1 i686) ================================================================= System uname: 2.6.12-gentoo-r1 i686 AMD Athlon(tm) XP 2500+ Gentoo Base System version 1.6.13 ccache version 2.4 [disabled] dev-lang/python: 2.3.5, 2.4.1-r1 sys-apps/sandbox: 1.2.11 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=athlon-xp -msse -mfpmath=sse -mmmx -m3dnow -fomit-frame-pointer -ffast-math -funroll-loops -pipe -ftracer -funit-at-a-time" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -msse -mfpmath=sse -mmmx -m3dnow -fomit-frame-pointer -ffast-math -funroll-loops -pipe -ftracer -funit-at-a-time" DISTDIR="/mnt/oktet/tmp/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/mnt/oktet/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 7zip X aalib acl adns alsa apache2 apm arts avi bash-completion berkdb bitmap-fonts blas bzip2 cairo cdr crypt cscope css cups curl dga doc dvd dvdr dynagraph eds emacs emboss encode esd evo fam firebird firefox flac font-server foomaticdb fortran gd gdbm gif gimpprint glitz gnome gphoto2 gpm graphviz gstreamer gtk gtk2 guile hal idea imagemagick imlib innodb ipv6 ithreads java javascript jce jpeg junit kcal kde kdeenablefinal ladspa lcms ldap libg++ libgda libwww lzw-tiff mad mcal mikmod mmx mng motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mpeg mysql nas ncurses nls nntp no-old-linux nptl nsplugin offensive ogg oggvorbis opengl pam pcre pdflib perl pic plotutils png postgres povray python qt quicktime readline rrdtool ruby samba scanner sdk sdl slang sndfile speex spell sqlite sse ssl subversion svg tcltk tcpd tetex theora threads tidy tiff truetype truetype-fonts type1-fonts unicode vdesktop vorbis wmf xine xml xml2 xmms xprint xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS
I've been trying to find a fix for it but couldn't so far.
1. Easy way to reproduce bug: --- test.c --- #include <linux/types.h> #include <sys/select.h> -------------- $ gcc -c test.c In file included from t.c:2: /usr/include/sys/select.h:78: error: conflicting types for 'fd_set' /usr/include/linux/types.h:22: error: previous declaration of 'fd_set' was here If you change header include order --- everything will go just ok. 2. In file src/natfeat/nfcdrom_linux.cpp move "#include <linux/cdrom.h>" to LAST include. Bug will be fixed. Sorry, I'm currently in a hurry and have no time for normal patch.
Thank you for the fix Nickolay I have commited it to CVS. Sadly I ran into another problem with 0.9.0, it didn't compile fvdi.prg.bz2 which caused the install to fail, but 0.9.0_beta2 works again.
Created attachment 63891 [details] aranym-0.9.0.ebuild I simply copied fdvi.prg.bz2 from beta2 sources to files directory. Look at attached ebuild.
Created attachment 63892 [details, diff] header manipulation Just for completness.