Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 574984

Summary: media-libs/flac-1.3.1-r1 fails to build on x32 system
Product: Gentoo Linux Reporter: Jasen Borisov <tajjada>
Component: [OLD] LibraryAssignee: Gentoo Sound Team <sound>
Status: RESOLVED FIXED    
Severity: normal CC: pastas4, vapier
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
URL: https://git.xiph.org/?p=flac.git;a=commitdiff;h=7566d3d4c11c16801e1c98093c4db33589451c17
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 393673    
Attachments: emerge --info output
build.log

Description Jasen Borisov 2016-02-17 17:25:21 UTC
Created attachment 425742 [details]
emerge --info output

flac fails to build on x32 system.

The log contains linker errors that seem to be indicating that it attempts to link a x32 binary with (internal) flac static libraries that were built as regular 32-bit x86.

I presume that this may be caused by the fact that I have ABI_X86="x32 64 32" set, to build libraries for all 3 x86 ABIs with multilib.
Comment 1 Jasen Borisov 2016-02-17 17:26:14 UTC
Created attachment 425744 [details]
build.log
Comment 2 Dainius Masiliƫnas 2016-07-29 20:07:16 UTC
I could not reproduce this, it built fine for me. Maybe there was an update to nasm that solved this issue, or such.
Comment 3 SpanKY gentoo-dev 2016-08-10 06:19:59 UTC
the problem is that it's detecting x32 as ia32 (x86), and nasm was found.  the other multilib settings don't really matter.

basically this part of configure.ac:
case "$host_cpu" in
    x86_64)
        if test $ac_cv_sizeof_voidp = 4 ; then
            # This must be a 32 bit user space running on 64 bit kernel so treat
            # this as ia32.
            cpu_ia32=true
            AC_DEFINE(FLAC__CPU_IA32)
            AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])

this has been fixed upstream though:
https://git.xiph.org/?p=flac.git;a=commitdiff;h=7566d3d4c11c16801e1c98093c4db33589451c17

which is now in our tree:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c67d1548f656171b8586d2a54559508a360aee89