Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure without libjpeg-turbo installed with -DGDAL_USE_JPEG=OFF #5741

Closed
thesamesam opened this issue May 17, 2022 · 0 comments
Closed
Assignees

Comments

@thesamesam
Copy link
Contributor

Expected behavior and actual behavior.

When libjpeg-turbo (or any libjpeg, presumably) is not installed, the build fails:

-- Disabled components:

 * MYSQL component has been detected, but is disabled with GDAL_USE_MYSQL=no
 * ZSTD component has been detected, but is disabled with GDAL_USE_ZSTD=no
 * SQLITE3 component has been detected, but is disabled with GDAL_USE_SQLITE3=no
 * WEBP component has been detected, but is disabled with GDAL_USE_WEBP=no
 * POSTGRESQL component has been detected, but is disabled with GDAL_USE_POSTGRESQL=no
 * LIBLZMA component has been detected, but is disabled with GDAL_USE_LIBLZMA=no
 * LZ4 component has been detected, but is disabled with GDAL_USE_LZ4=OFF
 * OPENJPEG component has been detected, but is disabled with GDAL_USE_OPENJPEG=no


-- Internal libraries enabled:

 * SHAPELIB internal library enabled


-- <<< Gentoo configuration >>>
Build type      RelWithDebInfo
Install path    /usr
Compiler flags:
C               -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches     -ggdb3 -Werror=format-security -Werror=implicit-function-declaration -fvisibility=hidden
C++             -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -D_GLIBCXX_ASSERTIONS -ggdb3 -Werror=format-security -fvisibility=hidden
Linker flags:
Executable      -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0
Module          -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--no-undefined
Shared          -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--no-undefined

-- Configuring done
CMake Error at gdal.cmake:478 (target_link_libraries):
  Target "GDAL" links to:

    JPEG::JPEG

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Call Stack (most recent call first):
  CMakeLists.txt:218 (include)


-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
 * ERROR: sci-libs/gdal-3.5.0-r2::gentoo failed (configure phase):
 *   cmake failed

Originally reported downstream in Gentoo here. Full log: build.log.

Steps to reproduce the problem.

  1. Have a system without libjpeg installed.
  2. Attempt to build gdal using the CMake build system with -DGDAL_USE_JPEG=OFF

Operating system

Gentoo

GDAL version and provenance

3.5.0

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue May 17, 2022
Force on jpeg & png for now. It's not ideal but reported both upstream
and I lack the gdal internals knowledge to deduce whether the various
plugins which depend on each of them are functional (enough?) without
each of them.

They're both pretty small dependencies and hard to avoid in general,
although I accept it's an inconvenience, some of this stuff was fairly
expected & unavoidable with the big port to CMake.

Bug: OSGeo/gdal#5741
Bug: OSGeo/gdal#5742
Bug: https://bugs.gentoo.org/844751
Signed-off-by: Sam James <sam@gentoo.org>
@rouault rouault self-assigned this May 17, 2022
rouault added a commit to rouault/gdal that referenced this issue May 17, 2022
rouault added a commit to rouault/gdal that referenced this issue May 17, 2022
rouault added a commit that referenced this issue May 19, 2022
CMake: fix build without PNG and JPEG (fixes #5741, fixes #5742)
github-actions bot pushed a commit that referenced this issue May 19, 2022
CMake: fix build without PNG and JPEG (fixes #5741, fixes #5742)
rouault added a commit that referenced this issue May 19, 2022
[Backport release/3.5] CMake: fix build without PNG and JPEG (fixes #5741, fixes #5742)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants