Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510890 - =media-libs/x265-1.8 ABI=x32 - source/common/x86/asm-primitives.cpp:1:0: error: CPU you selected does not support x86-64 instruction set
Summary: =media-libs/x265-1.8 ABI=x32 - source/common/x86/asm-primitives.cpp:1:0: erro...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: x32
  Show dependency tree
 
Reported: 2014-05-20 21:51 UTC by Bertrand Jacquin
Modified: 2015-10-25 16:52 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,122.50 KB, text/plain)
2014-05-20 21:52 UTC, Bertrand Jacquin
Details
emerge --info (info.log,16.10 KB, text/plain)
2014-05-20 21:52 UTC, Bertrand Jacquin
Details
media-libs/x265/x265-1.2.ebuild (x265-1.2.ebuild-ENABLE_ASSEMBLY.diff,644 bytes, patch)
2014-07-28 18:22 UTC, Bertrand Jacquin
Details | Diff
build.log (build.log,112.97 KB, text/x-log)
2014-07-28 18:22 UTC, Bertrand Jacquin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2014-05-20 21:51:01 UTC
Building media-libs/x265-1.0 for ABI=x32 give the following error :

[ 21%] Building CXX object common/CMakeFiles/common.dir/x86/asm-primitives.cpp.o
cd /var/tmp/portage/media-libs/x265-1.0/work/multicoreware-x265-cea97c4d7945/source-x32/common && /usr/bin/x86_64-pc-linux-gnux32-g++  -DHIGH_BIT_DEPTH=1 -DLOG_CU_STATISTICS=0 -DX265_ARCH_X86=1  -DNDEBUG -march=native -O2 -pipe -fomit-frame-pointer -fPIC
-I/var/tmp/portage/media-libs/x265-1.0/work/multicoreware-x265-cea97c4d7945/source/. -I/var/tmp/portage/media-libs/x265-1.0/work/multicoreware-x265-cea97c4d7945/source/Lib -I/var/tmp/portage/media-libs/x265-1.0/work/multicoreware-x265-cea97c4d7945/source/common -I/var/tmp/portage/media-libs/x265-1.0/work/multicoreware-x265-cea97c4d7945/source/encoder -I/var/tmp/portage/media-libs/x265-1.0/work/multicoreware-x265-cea97c4d7945/source-x32    -Wall -Wextra -Wshadow -ffast-math -mstackrealign -march=i686 -o CMakeFiles/common.dir/x86/asm-primitives.cpp.o -c /var/tmp/portage/media-libs/x265-1.0/work/multicoreware-x265-cea97c4d7945/source/common/x86/asm-primitives.cpp
/var/tmp/portage/media-libs/x265-1.0/work/multicoreware-x265-cea97c4d7945/source/common/x86/asm-primitives.cpp:1:0: error: CPU you selected does not support x86-64 instruction set
 /*****************************************************************************
 ^
common/CMakeFiles/common.dir/build.make:267: recipe for target 'common/CMakeFiles/common.dir/x86/asm-primitives.cpp.o' failed
make[2]: *** [common/CMakeFiles/common.dir/x86/asm-primitives.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/media-libs/x265-1.0/work/multicoreware-x265-cea97c4d7945/source-x32'
CMakeFiles/Makefile2:266: recipe for target 'common/CMakeFiles/common.dir/all' failed
make[1]: *** [common/CMakeFiles/common.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-libs/x265-1.0/work/multicoreware-x265-cea97c4d7945/source-x32'
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: media-libs/x265-1.0::gentoo failed (compile phase):
 *   emake failed

Full log attached and emerge --info

Reproducible: Always
Comment 1 Bertrand Jacquin 2014-05-20 21:52:05 UTC
Created attachment 377310 [details]
build.log
Comment 2 Bertrand Jacquin 2014-05-20 21:52:15 UTC
Created attachment 377312 [details]
emerge --info
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2014-07-27 13:13:09 UTC
I wonder if -DENABLE_ASSEMBLY=OFF to mycmakeargs should be passed for x32 builds, can you test?
Comment 4 Bertrand Jacquin 2014-07-28 18:22:04 UTC
Created attachment 381734 [details, diff]
media-libs/x265/x265-1.2.ebuild

(In reply to Samuli Suominen from comment #3)
> I wonder if -DENABLE_ASSEMBLY=OFF to mycmakeargs should be passed for x32
> builds, can you test?

I made a little patch on current ebuild for this as attached and result is quiet the same :/

[  1%] Building CXX object encoder/CMakeFiles/encoder.dir/__/Lib/TLibEncoder/SyntaxElementWriter.cpp.o
cd /var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source-abi_x86_x32.x32/encoder && /usr/bin/x86_64-pc-linux-gnux32-g++  -DHAVE_INT_TYPES_H=1 -DHIGH_BIT_DEPTH=1 -DX265_ARCH_X86=1 -D__STDC_LIMIT_MACROS=1  -DNDEBUG -march=native -O2 -pipe -fomit-frame-pointer -fPIC  -I/var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source/. -I/var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source/Lib -I/var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source/common -I/var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source/encoder -I/var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source-abi_x86_x32.x32    -Wall -Wextra -Wshadow -march=i686 -ffast-math -mstackrealign -fno-exceptions -Wno-sign-compare -o CMakeFiles/encoder.dir/__/Lib/TLibEncoder/SyntaxElementWriter.cpp.o -c /var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source/Lib/TLibEncoder/SyntaxElementWriter.cpp
/var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source/Lib/TLibEncoder/SyntaxElementWriter.cpp:1:0: error: CPU you selected does not support x86-64 instruction set
 /* The copyright in this software is being made available under the BSD
 ^
encoder/CMakeFiles/encoder.dir/build.make:57: recipe for target 'encoder/CMakeFiles/encoder.dir/__/Lib/TLibEncoder/SyntaxElementWriter.cpp.o' failed
make[2]: *** [encoder/CMakeFiles/encoder.dir/__/Lib/TLibEncoder/SyntaxElementWriter.cpp.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source-abi_x86_x32.x32'
CMakeFiles/Makefile2:247: recipe for target 'encoder/CMakeFiles/encoder.dir/all' failed
make[1]: *** [encoder/CMakeFiles/encoder.dir/all] Error 2
make[1]: Leaving directory '/var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source-abi_x86_x32.x32'
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: media-libs/x265-1.2::as29 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=media-libs/x265-1.2::as29'`,
 * the complete build log and the output of `emerge -pqv '=media-libs/x265-1.2::as29'`.
 * The complete build log is located at '/var/log/portage/media-libs:x265-1.2:20140728-181852.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/media-libs/x265-1.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-libs/x265-1.2/temp/environment'.
 * Working directory: '/var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source-abi_x86_x32.x32'
 * S: '/var/tmp/portage/media-libs/x265-1.2/work/multicoreware-x265-d6257335c537/source'

You will next found attached the complete build log refreshed
Comment 5 Bertrand Jacquin 2014-07-28 18:22:37 UTC
Created attachment 381736 [details]
build.log
Comment 6 Bertrand Jacquin 2014-07-28 18:27:58 UTC
Issue come from source/CMakeLists.txt :

  if(GCC)
      add_definitions(-Wall -Wextra -Wshadow)
      add_definitions(-D__STDC_LIMIT_MACROS=1)
      if(X64 AND NOT WIN32)
          add_definitions(-fPIC)
      endif(X64 AND NOT WIN32)
      if(X86 AND NOT X64)
          add_definitions(-march=i686)
      endif()

First, -march is forced for non X64, then no option for x32 arch.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-10-10 07:46:06 UTC
https://github.com/gentoo/gentoo/pull/173

Please let us know if it's good to go.
Comment 8 Bertrand Jacquin 2015-10-11 14:36:58 UTC
Upstream report: https://bitbucket.org/multicoreware/x265/issues/198/assembly-code-fails-on-x32
Comment 9 Bertrand Jacquin 2015-10-25 16:52:02 UTC
https://github.com/gentoo/gentoo/pull/173 has been merged, resolving