Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@Kumataro

Description

@Kumataro

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 #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.

if(NOT REQUIRE_SIMD)
include(CheckLanguage)
check_language(ASM_NASM)
if(NOT CMAKE_ASM_NASM_COMPILER)
simd_fail("SIMD extensions disabled: could not find NASM compiler")
return()
endif()

macro(simd_fail message)
if(REQUIRE_SIMD)
message(FATAL_ERROR "${message}.")
else()
message(WARNING "${message}. Performance will suffer.")
set(WITH_SIMD 0 PARENT_SCOPE)
endif()
endmacro()

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

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions