libtool: link: (cd .libs/libFLAC-static.lax/libFLAC-asm.a && x86_64-pc-linux-gnux32-ar x "/var/tmp/portage/media-libs/flac-1.3.1-r1/work/flac-1.3.1-abi_x86_x32.x32/src/libFLAC/ia32/.libs/libFLAC-asm.a") libtool: link: x86_64-pc-linux-gnux32-ar cru .libs/libFLAC-static.a .libs/bitmath.o .libs/bitreader.o .libs/bitwriter.o .libs/cpu.o .libs/crc.o .libs/fixed.o .libs/fixed_intrin_sse2.o .libs/fixed_intrin_ssse3.o .libs/float.o .libs/format.o .libs/lpc.o .libs/lpc_intrin_sse.o .libs/lpc_intrin_sse2.o .libs/lpc_intrin_sse41.o .libs/lpc_intrin_avx2.o .libs/md5.o .libs/memory.o .libs/metadata_iterators.o .libs/metadata_object.o .libs/stream_decoder.o .libs/stream_encoder.o .libs/stream_encoder_intrin_sse2.o .libs/stream_encoder_intrin_ssse3.o .libs/stream_encoder_intrin_avx2.o .libs/stream_encoder_framing.o .libs/window.o .libs/ogg_decoder_aspect.o .libs/ogg_encoder_aspect.o .libs/ogg_helper.o .libs/ogg_mapping.o .libs/libFLAC-static.lax/libFLAC-asm.a/cpu_asm.o .libs/libFLAC-static.lax/libFLAC-asm.a/fixed_asm.o .libs/libFLAC-static.lax/libFLAC-asm.a/lpc_asm.o libtool: link: x86_64-pc-linux-gnux32-ranlib .libs/libFLAC-static.a /usr/lib/gcc/x86_64-pc-linux-gnux32/4.8.3/../../../../x86_64-pc-linux-gnux32/bin/ld: i386 architecture of input file `ia32/.libs/libFLAC-asm.a(cpu_asm.o)' is incompatible with i386:x64-32 output /usr/lib/gcc/x86_64-pc-linux-gnux32/4.8.3/../../../../x86_64-pc-linux-gnux32/bin/ld: i386 architecture of input file `ia32/.libs/libFLAC-asm.a(fixed_asm.o)' is incompatible with i386:x64-32 output /usr/lib/gcc/x86_64-pc-linux-gnux32/4.8.3/../../../../x86_64-pc-linux-gnux32/bin/ld: i386 architecture of input file `ia32/.libs/libFLAC-asm.a(lpc_asm.o)' is incompatible with i386:x64-32 output libtool: link: rm -fr .libs/libFLAC-static.lax collect2: error: ld returned 1 exit status Makefile:621: recipe for target 'libFLAC.la' failed make[4]: *** [libFLAC.la] Error 1 make[4]: *** Waiting for unfinished jobs.... libtool: link: ( cd ".libs" && rm -f "libFLAC-static.la" && ln -s "../libFLAC-static.la" "libFLAC-static.la" ) make[4]: Leaving directory '/var/tmp/portage/media-libs/flac-1.3.1-r1/work/flac-1.3.1-abi_x86_x32.x32/src/libFLAC' Makefile:739: recipe for target 'all-recursive' failed make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory '/var/tmp/portage/media-libs/flac-1.3.1-r1/work/flac-1.3.1-abi_x86_x32.x32/src/libFLAC' Makefile:415: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory '/var/tmp/portage/media-libs/flac-1.3.1-r1/work/flac-1.3.1-abi_x86_x32.x32/src' Makefile:472: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/media-libs/flac-1.3.1-r1/work/flac-1.3.1-abi_x86_x32.x32' Makefile:403: recipe for target 'all' failed make: *** [all] Error 2 * ERROR: media-libs/flac-1.3.1-r1::gentoo failed (compile phase): * emake failed ... I notice that libFLAC's Makefile does contain `ld='... -m i386'` - but this may be related to the use of a multilib ebuild. flac-1.3.0 builds correctly, even for this ABI. emerge -pqv '=media-libs/flac-1.3.1-r1::gentoo': [ebuild U ] media-libs/flac-1.3.1-r1 [1.3.0] USE="cxx ogg sse (-altivec) -debug -static-libs (-3dnow%)" ABI_X86="(x32) (-32) -64" 'emerge --info' to follow...
1) Please attach the entire build log to this bug report. 2) Please post your `emerge --info' output in a comment.
Created attachment 393312 [details] emerge --info '=media-libs/flac-1.3.1-r1::gentoo' emerge --info '=media-libs/flac-1.3.1-r1::gentoo' (too long to add as a comment)
Created attachment 393314 [details] flac-1.3.1-r1:20150106-110753.log.gz Build log
Fixed it. The following patch fixes a bad assumption in configure.ac: https://raw.githubusercontent.com/srcshelton/gentoo-ebuilds/master/media-libs/flac/files/flac-1.3.1-x32.patch ... and an updated ebuild applies it: https://raw.githubusercontent.com/srcshelton/gentoo-ebuilds/master/media-libs/flac/flac-1.3.1-r1.ebuild
Reported upstream: https://sourceforge.net/p/flac/bugs/427/
I'm having the same problem when trying to build my x32 system. Please merge the patch soon. Is there a reason for this to still be marked as "unconfirmed"?
Created attachment 418830 [details, diff] Detection of x32 build by predefined macros instead of compiler name The patch Stuart made did not work for me, as the host is not linux-gnux32 rather than linux-gnu. The patch enclosed uses macros described in http://sites.google.com/site/x32abi/documents/abi.pdf to recognize x32 build instead of target host alias.
(In reply to Lukáš Ručka from comment #7) > The patch Stuart made did not work for me, as the host is not linux-gnux32 > rather than linux-gnu. Searching for "chost gnux32" suggests that the correct CHOST value should be 'x86_64-pc-linux-gnux32' - is this incorrect or no longer the case?
Created attachment 418948 [details] emerge --info =flac-1.3.1-r1::gentoo Fresh install, amd64 minimal cd with x32 stage3, after rebuilding the compiler & kernel.
Created attachment 418950 [details] Log from failed build configuration, without my patch.
False alarm (last two attachments), I've missed patching again in the fresh install. After Stuart's last comment, I reexplored the failing build from yet another perspective and noticed that I had my original configuration partialy restored by git, including broken gcc and CHOST setting. As a result, the broken configuration emerged in the failure of the original patched build, couple of hundred packages later. Please ignore the last two attachments, as I've forgotten to patch the flac in freshinstall with the original patch. I can confirm the original patch works and the error was on my side.