Bug 2066972 - libjpeg-turbo and turbojpeg are packaged separately, but their CMake configuration is combined
Summary: libjpeg-turbo and turbojpeg are packaged separately, but their CMake configur...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: libjpeg-turbo
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nikola Forró
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-22 22:44 UTC by "FeRD" (Frank Dana)
Modified: 2022-12-13 17:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-13 17:05:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description "FeRD" (Frank Dana) 2022-03-22 22:44:11 UTC
Description of problem:

When libjpeg-turbo-devel is installed, a CMake configuration is placed in /usr/lib64/cmake/libjpeg-turbo that contains the target definitions for both libjpeg-turbo::jpeg and libjpeg-turbo::turbojpeg. However, turbojpeg[-devel] is a separate package that may or may not be installed on the system.

Version-Release number of selected component (if applicable):

libjpeg-turbo-2.1.0-3.fc35

How reproducible:
100%

Steps to Reproduce:

1. sudo dnf install libjpeg-turbo-devel

2. sudo dnf remove turbojpeg-devel  # Just to  be sure

3. Create two files:

tjtest.cpp
==========
#include <cassert>
#include <turbojpeg.h>
int main() {
	auto cmp = tjInitCompress();
	assert(cmp != nullptr && "Didn't get handle!");
}	

CMakeLists.txt
==============
cmake_minimum_required(VERSION 3.10)
project(tjtest VERSION 0.1 LANGUAGES CXX)
find_package(libjpeg-turbo REQUIRED)
add_executable(tjtest tjtest.cpp)
target_link_libraries(tjtest PUBLIC libjpeg-turbo::turbojpeg)


4. Attempt to build the tjtest program:

   cmake -B build -S .
   cmake --build build


Actual results:

$ cmake -B build -S .
-- The CXX compiler identification is GNU 11.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /var/tmp/build

$ cmake --build build
[ 50%] Building CXX object CMakeFiles/tjtest.dir/tjtest.cpp.o
/var/tmp/tjtest.cpp:2:10: fatal error: turbojpeg.h: No such file or directory
    2 | #include <turbojpeg.h>
      |          ^~~~~~~~~~~~~
compilation terminated.
gmake[2]: *** [CMakeFiles/tjtest.dir/build.make:76: CMakeFiles/tjtest.dir/tjtest.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/tjtest.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2


Expected results:

CMake fails to find the turbojpeg package dependency due to turbojpeg-devel not being installed, and errors out without configuring the build environment.

(Or, turbojpeg-devel is combined into libjpeg-turbo-devel instead of being a separate package, since it already includes the configuration.)

Comment 1 Ben Cotton 2022-11-29 18:36:18 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 2 Ben Cotton 2022-12-13 17:05:25 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.