opencv / opencv

Open Source Computer Vision Library
https://opencv.org
Apache License 2.0
76.71k stars 55.65k forks source link

3rdparty: libjpeg-turbo: CI has failed if NASM is missing. #25648

Closed Kumataro closed 1 month ago

Kumataro commented 1 month ago

System Information

OpenCV version: 4.x ( 4.10.0-ore ) Operating System / Platform: Ubuntu 24.04 Compiler & compiler version: GCC 12.3.0

Detailed description

Maybe this issue affects the 4.10 release as well, so I've raised it.

After https://github.com/opencv/opencv/pull/25623 , libjpeg-turbo 3.0.3 is available with SIMD technology. For x86-64 or i386 environment, libjpeg-turbo requests NASM(or Yasm). Unfortunally CI envieonment for Win64(and doc) has not been installed NASM. So it seems that CI has been failed.

https://pullrequest.opencv.org/buildbot/builders/precommit_windows64/builds/105632/steps/cmake/logs/stdio

-- libjpeg-turbo: VERSION = 3.0.3, BUILD = opencv-4.10.0-pre-libjpeg-turbo
-- Check size of size_t
-- Check size of size_t - done
-- Check size of unsigned long
-- Check size of unsigned long - done
-- Looking for include file intrin.h
-- Looking for include file intrin.h - found
-- Looking for a ASM_NASM compiler
-- Looking for a ASM_NASM compiler - NOTFOUND
-- Looking for assert.h
CMake Warning at 3rdparty/libjpeg-turbo/src/simd/CMakeLists.txt:5 (message):
  SIMD extensions disabled: could not find NASM compiler.  Performance will
  suffer.
Call Stack (most recent call first):
  3rdparty/libjpeg-turbo/src/simd/CMakeLists.txt:48 (simd_fail)

-- Looking for assert.h - found
-- Looking for fcntl.h

This Warning comes from the CMakefile included in the libjpeg-turbo code.

https://github.com/opencv/opencv/blob/1fa96b161ff2525f446d829db06b6eb59850cdc4/3rdparty/libjpeg-turbo/src/simd/CMakeLists.txt#L44-L50

https://github.com/opencv/opencv/blob/1fa96b161ff2525f446d829db06b6eb59850cdc4/3rdparty/libjpeg-turbo/src/simd/CMakeLists.txt#L1-L8

We do not want to modify third party source code on this repository directly. So Ithink it is hard to make any patch.

Steps to reproduce

sudo apt remove nasm yasm -y # To make same condition as problem.
git clone <OpenCV>
cmake -S opencv -B build -DBUILD_JPEG=ON

Issue submission checklist