FLAC fails to build on x86_64 systems using the x32 ABI as the build system attempts to link 32bit and 64bit objects. This is due to a bad assumption in the configure.ac of FLAC-1.3.1, which (not unreasonably) assumes that 32bit pointers on a 64bit CPU indicates 32bit userspace, and builds as if the host CPU was also 32bit.
The patch at https://raw.githubusercontent.com/srcshelton/gentoo-ebuilds/master/media-libs/flac/files/flac-1.3.1-x32.patch allows FLAC to build on x32 systems, and shouldn't adversely affect any other platform or ABI.
Fixed in:
Thanks!
Diff:
Edit: False alarm, the problem was on my side - I had my compiler configuration broken.
Unfortunately the patch by Sturart does not work for me, as the build environment does not provide gnux32 target. I re-wrote the architecture detection using guidelines for Debian (https://wiki.debian.org/X32Port), succesfully tested on current gentoo with default/x32 profile.
Last edit: Lukáš Ručka 2015-12-10