Summary: | multimedia/ffmpeg: Illegal instruction on i586 | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | jose1711 |
Component: | Individual Port(s) | Assignee: | freebsd-multimedia (Nobody) <multimedia> |
Status: | Closed Overcome By Events | ||
Severity: | Affects Some People | CC: | riggs, tatsuki_makino |
Priority: | --- | Keywords: | regression |
Version: | Latest | Flags: | bugzilla:
maintainer-feedback?
(multimedia) |
Hardware: | i386 | ||
OS: | Any | ||
Bug Depends on: | |||
Bug Blocks: | 210505 |
Description
jose1711
2019-11-21 20:35:21 UTC
I have an environment that can do the same thing.
12.1-STABLE r354763M i386
> ffmpeg
Illegal instruction (core dumped)
Exit 132
I don't know how to use lldb :)
(lldb) bt
* thread #1, name = 'ffmpeg', stop reason = signal SIGILL
* frame #0: 0x22465bb1 libopencv_core.so.3.4`cvRegisterType + 609
frame #1: 0x22472daa libopencv_core.so.3.4`___lldb_unnamed_symbol1029$$libopencv_core.so.3.4 + 154
frame #2: 0x2043d445 ld-elf.so.1
frame #3: 0x2043c436 ld-elf.so.1
@tatsuki Can you please share details about your processor? I wonder if it's something exotic as it is in my case. Thanks! (In reply to jose1711 from comment #2) I forgot to write it :) sysctl -n hw.model returns "Intel Pentium III" in my environment. To be precise, IntelĀ® PentiumĀ® III Processor 1GHz (133MHz FSB) and i810E chipset. So, this is not just a special SoC, but a problem for the entire i386. Likely a regression from options refactor in graphics/opencv which makes i386 use -msse -msse2 -mfpmath=sse on all files. For runtime detection to work only functions (or files) that use SSE2 instructions should be built with -msse2, letting the caller check CPU features and decide whether to use optimized functions. If the caller is built with -msse2 you get a crash on pre-SSE2 hardware. Unfortunately, upstream checks SSE2 support at compile time. https://github.com/opencv/opencv/search?q=checkHardwareSupport https://github.com/opencv/opencv/blob/3.4.1/cmake/OpenCVCompilerOptimizations.cmake#L71 While the following may help # OpenCV minimum SIMD without runtime detection CMAKE_ARGS+= ${CMAKE_ARGS_${ARCH}} CMAKE_ARGS_amd64=-DCPU_BASELINE_DISABLE:STRING=SSE3 CMAKE_ARGS_i386=-DCPU_BASELINE_DISABLE:STRING=SSE it breaks building SIMD-optimized code FAILED: modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx.cpp.o /usr/bin/c++ -DCVAPI_EXPORTS -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DCV_CPU_COMPILE_AVX=1 -DCV_CPU_COMPILE_POPCNT=1 -DCV_CPU_COMPILE_SSE2=1 -DCV_CPU_COMPILE_SSE3=1 -DCV_CPU_COMPILE_SSE4_1=1 -DCV_CPU_COMPILE_SSE4_2=1 -DCV_CPU_COMPILE_SSE=1 -DCV_CPU_COMPILE_SSSE3=1 -DCV_CPU_DISPATCH_MODE=AVX -I/wrkdirs/usr/ports/graphics/opencv-core/work/opencv-3.4.1/modules/core/include -I/wrkdirs/usr/ports/graphics/opencv-core/work/opencv-3.4.1/modules/core/src -Imodules/core -isystem . -isystem /usr/local/include/eigen3 -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -std=c++11 -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-implicit-fallthrough -fdiagnostics-show-option -pthread -Qunused-arguments -fomit-frame-pointer -ffunction-sections -fdata-sections -mfpmath=387 -fvisibility=hidden -fvisibility-inlines-hidden -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -std=c++11 -DNDEBUG -fPIC -std=c++11 -msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -MD -MT modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx.cpp.o -MF modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx.cpp.o.d -o modules/core/CMakeFiles/opencv_core.dir/mathfuncs_core.avx.cpp.o -c modules/core/mathfuncs_core.avx.cpp error: the '387' unit is not supported with this instruction set Please reopen if this is still an issue. |