I have a little bit exotic problem: When I try to compile warzone2100 for Windows (target mingw32) the buildprocess stops in the linking stage, when ld segfaults. I was able to narrow the cause to this code snippet: #include <AL/al.h> int main() { alGenBuffers(1, 0); } Compiling that with mingw32-gcc -o test test.c -I./devpkg/include -L./devpkg/lib -lopenal32 will cause in ld segfaulting. The devpkg can be obtained from http://download.gna.org/warzone/development/warzone-devpkg-mingw32-20070816.7z The -lopenal32 it links against is the OpenAL32.lib from Creative's OpenAL 1.1 SDK. (http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=45) Changing the gcc (4.1.2 or 4.2.0) or ld (2.17 or 2.17.50.0.17) versions doesn't help. The problem may or may not be Gentoo related. I would be glad if you can redirect me to the proper place in case it is not Gentoo specific. Reproducible: Always Steps to Reproduce: mingw32-gcc (GCC) 4.2.0 (Gentoo 4.2.0 p1.4) GNU ld (Linux/GNU Binutils) 2.17.50.0.17.20070615 Portage 2.1.3.5 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r3 x86_64) ================================================================= System uname: 2.6.22-gentoo-r3 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ Gentoo Base System release 1.12.10 Timestamp of tree: Wed, 15 Aug 2007 15:50:01 +0000 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r6 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17-r1 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.22-r2 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -fomit-frame-pointer -ftree-vectorize -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-march=athlon64 -O2 -fomit-frame-pointer -ftree-vectorize -pipe -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.mneisen.org/gentoo" LANG="en_US.UTF-8" LINGUAS="de" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 apache2 avahi bash-completion berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dri dvb dvd dvdr dvdread emboss encode evo fam firefox foomaticdb fortran gdbm gif gimp gpm gtk hal iconv ipod ipv6 isdnlog jpeg kde kdeenablefinal kdehiddenvisibility kerberos ldap lm_sensors mad midi mikmod mmx mmxext mp3 mp4 mpeg mplayer mudflap mysql ncurses nls nptl nptlonly nsplugin ogg openal openexr opengl openmp pam pch pcre pdf perl php png ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sasl sdl session speex spell spl sse sse2 ssl subversion svg tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts unicode usb vcd visualization vorbis x264 xcb xcomposite xml xorg xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
PS: The problem did not occur on my x86 system, so I assume that the issue is related to the system now being x86_64.
I now took the OpenAL32.dll from the Creative SDK and created a .a static archive from it: winedump spec -C -I ".wine/drive_c/Program\ Files/OpenAL\ 1.1\ SDK/include/" .wine/drive_c/windows/system32/OpenAL32.dll winebuild -w --def -o libopenal32.def --export OpenAL32.spec mingw32-dlltool -k -d libopenal32.def -l libopenal32.a This linker archive works, so I assume that the problem is caused by the .lib format on x86_64 systems.
Same issue with cross-mingw32/binutils-2.17.50.0.18.
Could you try with newer versions of binutils? We are all the way up to 2.19.1 now :)