powerpc linux Illegal instruction
Issue #421
new
Hi,
Debian unstable powerpc multilib build :
A simple x265 --help crash. here is the backtrace.
You can find Debian unstable package here : https://www.deb-multimedia.org/pool/main/x/x265-dmo/
Starting program: /usr/bin/x265 --help
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/powerpc-linux-gnu/libthread_db.so.1".
Program received signal SIGILL, Illegal instruction.
x265_param_default (param=param@entry=0x445400) at ./source/common/param.cpp:187
warning: Source file is more recent than executable.
187 param->dynamicRd = 0;
(gdb) bt
#0 x265_param_default (param=param@entry=0x445400) at ./source/common/param.cpp:187
#1 0xf7d20a48 in x265_param_default_preset (param=0x445400, preset=0x0, tune=0x0) at ./source/common/param.cpp:316
#2 0x0040c1c0 in CLIOptions::parse (this=0xfffed068, argc=2, argv=0xfffef594) at ./source/x265.cpp:230
#3 0x00406b80 in main (argc=2, argv=0xfffef594) at ./source/x265.cpp:582
Command line build for 12bit
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run "-GUnix Makefiles" -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON -DENABLE_PIC=ON -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF ../../../source
10bit :
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run "-GUnix Makefiles" -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DENABLE_PIC=ON -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF ../../../source
8bit
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run "-GUnix Makefiles" -DEXTRA_LIB=x265_main10.a\;x265_main12.a -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON -DLIB_INSTALL_DIR=lib/powerpc-linux-gnu -DENABLE_PIC=ON -DENABLE_ASSEMBLY=OFF -DENABLE_ALTIVEC=OFF ../../../source
Comments (2)
-
-
Thanks, that solved the illegal instruction
I was thinking that cmake was able to detect the right CPU and enable CPU_POWER8 if needed.
- Log in to comment
You need to specify
-DCPU_POWER8=OFF
, or VSX instructions will be "always on".Not sure how best to make that a runtime detection (like AVX512 appears to be now), but that's what needs to be done. (VSX is never available on PPC32, afaik; it is only available on POWER8 and POWER9 CPUs running in 64-bit mode.)