media-libs/libass-0.11.2 (with multilib) fail to build on x32 ABI : [ebuild U ] media-libs/libass-0.11.2:0/5 [0.10.2:0/5] USE="enca fontconfig harfbuzz -static-libs" ABI_X86="(x32%*) -32% -64%" 0 kB (..) libtool: compile: yasm -DARCH_X86_64=1 -m amd64 -f elf -DHAVE_ALIGNED_STACK=1 /var/tmp/portage/media-libs/libass-0.11.2/work/libass-0.11.2/libass/x86/blend_bitmaps.asm -o x86/.libs/blend_bitmaps.o /bin/sh ../libtool --mode=compile yasm -DARCH_X86_64=1 -m amd64 -f elf -DHAVE_ALIGNED_STACK=1 -o x86/cpuid.lo /var/tmp/portage/media-libs/libass-0.11.2/work/libass-0.11.2/libass/x86/cpuid.asm -prefer-non-pic libtool: compile: yasm -DARCH_X86_64=1 -m amd64 -f elf -DHAVE_ALIGNED_STACK=1 /var/tmp/portage/media-libs/libass-0.11.2/work/libass-0.11.2/libass/x86/cpuid.asm -o x86/.libs/cpuid.o /bin/sh ../libtool --mode=compile yasm -DARCH_X86_64=1 -m amd64 -f elf -DHAVE_ALIGNED_STACK=1 -o x86/be_blur.lo /var/tmp/portage/media-libs/libass-0.11.2/work/libass-0.11.2/libass/x86/be_blur.asm -prefer-non-pic libtool: compile: yasm -DARCH_X86_64=1 -m amd64 -f elf -DHAVE_ALIGNED_STACK=1 /var/tmp/portage/media-libs/libass-0.11.2/work/libass-0.11.2/libass/x86/be_blur.asm -o x86/.libs/be_blur.o /bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnux32-gcc -std=gnu99 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith -Wredundant-decls -march=native -O2 -pipe -fomit-frame-pointer -I/usr/include/freetype2 -I/usr/include/fribidi -I/usr/include/glib-2.0 -I/usr/libx32/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/harfbuzz -no-undefined -version-info 5:0:0 -export-symbols /var/tmp/portage/media-libs/libass-0.11.2/work/libass-0.11.2/libass/libass.sym -Wl,-O1 -Wl,--as-needed -o libass.la -rpath /usr/libx32 ass.lo ass_cache.lo ass_font.lo ass_fontconfig.lo ass_render.lo ass_utils.lo ass_bitmap.lo ass_library.lo ass_drawing.lo ass_parse.lo ass_render_api.lo ass_shaper.lo ass_strtod.lo x86/blend_bitmaps.lo x86/cpuid.lo x86/be_blur.lo -lm -lfreetype -lfribidi -lglib-2.0 -lfontconfig -lfreetype -lharfbuzz -lenca -lm libtool: link: echo "{ global:" > .libs/libass.ver libtool: link: cat /var/tmp/portage/media-libs/libass-0.11.2/work/libass-0.11.2/libass/libass.sym | sed -e "s/\(.*\)/\1;/" >> .libs/libass.ver libtool: link: echo "local: *; };" >> .libs/libass.ver libtool: link: x86_64-pc-linux-gnux32-gcc -shared -fPIC -DPIC .libs/ass.o .libs/ass_cache.o .libs/ass_font.o .libs/ass_fontconfig.o .libs/ass_render.o .libs/ass_utils.o .libs/ass_bitmap.o .libs/ass_library.o .libs/ass_drawing.o .libs/ass_parse.o .libs/ass_render_api.o .libs/ass_shaper.o .libs/ass_strtod.o x86/.libs/blend_bitmaps.o x86/.libs/cpuid.o x86/.libs/be_blur.o -lfribidi -lglib-2.0 -lfontconfig -lfreetype -lharfbuzz -lenca -lm -march=native -O2 -Wl,-O1 -Wl,--as-needed -Wl,-soname -Wl,libass.so.5 -Wl,-version-script -Wl,.libs/libass.ver -o .libs/libass.so.5.0.0 /usr/lib/gcc/x86_64-pc-linux-gnux32/4.8.2/../../../../x86_64-pc-linux-gnux32/bin/ld: i386:x86-64 architecture of input file `x86/.libs/blend_bitmaps.o' is incompatible with i386:x64-32 output /usr/lib/gcc/x86_64-pc-linux-gnux32/4.8.2/../../../../x86_64-pc-linux-gnux32/bin/ld: i386:x86-64 architecture of input file `x86/.libs/cpuid.o' is incompatible with i386:x64-32 output /usr/lib/gcc/x86_64-pc-linux-gnux32/4.8.2/../../../../x86_64-pc-linux-gnux32/bin/ld: i386:x86-64 architecture of input file `x86/.libs/be_blur.o' is incompatible with i386:x64-32 output collect2: error: ld returned 1 exit status Makefile:461: recipe for target 'libass.la' failed make[2]: *** [libass.la] Error 1 make[2]: Leaving directory '/var/tmp/portage/media-libs/libass-0.11.2/work/libass-0.11.2-x32/libass' Makefile:467: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/media-libs/libass-0.11.2/work/libass-0.11.2-x32' Makefile:375: recipe for target 'all' failed make: *** [all] Error 2 * ERROR: media-libs/libass-0.11.2::gentoo failed (compile phase): * emake failed In fact, ASM code is build using yasm with -m amd64 ASFLAGS (define in configure.ac). build.log and emerge --info attached Reproducible: Always
Created attachment 376278 [details] build.log
Created attachment 376280 [details] emerge --info
Created attachment 376288 [details, diff] libass-0.11.2.ebuild-x32.diff Here is a patch for ebuild to not rely on automatic ASM support, but by defining it in src_configure if ABI support it. There is no way in src_configure to get ABI use flag (ABI=x32 => abi_x86_x32) so there is bit of duplicated code to handle that
Created attachment 378418 [details, diff] libass-0.11.2.ebuild-x32.diff v2 including recent changes in multilib eclasses (MULTILIB_ABI_FLAG)
Hello, Did your patch fix this problem? And therefore, will it be add in Portage's main tree? By the way, just a question not related to this bug, are you in ~arch on your x32 system? It is a lot of work to add atoms in packages.use, to got ABI_X86 support. Thanks.
(In reply to Thibaud "thican" CANALE from comment #5) > Did your patch fix this problem? And therefore, will it be add in Portage's > main tree? In my current x32 host, this fix the issue yes. > By the way, just a question not related to this bug, are you in ~arch on > your x32 system? It is a lot of work to add atoms in packages.use, to got > ABI_X86 support. I'm using ACCEPT_KEYWORDS=~amd64, so it's less work ;)
PR at: https://github.com/gentoo/gentoo/pull/171 Please let us know if it's ok to merge.
FWIW, it was simple to fix the build on x32: https://github.com/libass/libass/pull/200 https://github.com/libass/libass/pull/200.patch This patch should apply cleanly to all versions in the portage tree.
https://github.com/gentoo/gentoo/pull/171 has been merged, resolving