Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 574984 - media-libs/flac-1.3.1-r1 fails to build on x32 system
Summary: media-libs/flac-1.3.1-r1 fails to build on x32 system
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL: https://git.xiph.org/?p=flac.git;a=co...
Whiteboard:
Keywords:
Depends on:
Blocks: x32
  Show dependency tree
 
Reported: 2016-02-17 17:25 UTC by Jasen Borisov
Modified: 2016-08-10 06:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (flac.info.xz,6.24 KB, application/x-xz)
2016-02-17 17:25 UTC, Jasen Borisov
Details
build.log (build.log.xz,10.91 KB, application/x-xz)
2016-02-17 17:26 UTC, Jasen Borisov
Details

Note You need to log in before you can comment on or make changes to this bug.
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