Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 953066 - dev-cpp/cpp-httplib-0.20.0[zstd] references non-existent CMake package zstd::libzstd
Summary: dev-cpp/cpp-httplib-0.20.0[zstd] references non-existent CMake package zstd::...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Alexey
URL: https://github.com/yhirose/cpp-httpli...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2025-04-02 21:28 UTC by Andrew Udvare
Modified: 2025-04-04 21:52 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Udvare 2025-04-02 21:28:38 UTC
I have a few packages in my overlay that link to cpp-httplib via CMake but with 0.20.0 this message appears in CMake output:

CMake Error at /usr/lib64/cmake/httplib/httplibTargets.cmake:70 (set_target_properties):
  The link interface of target "httplib::httplib" contains:

    zstd::libzstd

  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):
  /usr/lib64/cmake/httplib/httplibConfig.cmake:91 (include)
  CMakeModules/Findhttplib.cmake:7 (find_package)
  CMakeLists.txt:341 (find_package)

The error is caused by this call:

set_target_properties(httplib::httplib PROPERTIES
  INTERFACE_COMPILE_DEFINITIONS "\$<\$<BOOL:OFF>:CPPHTTPLIB_NO_EXCEPTIONS>;\$<\$<BOOL:>:CPPHTTPLIB_BROTLI_SUPPORT>;\$<\$<BOOL:TRUE>:CPPHTTPLIB_ZLIB_SUPPORT>;\$<\$<BOOL:TRUE>:CPPHTTPLIB_ZSTD_SUPPORT>;\$<\$<BOOL:TRUE>:CPPHTTPLIB_OPENSSL_SUPPORT>;\$<\$<AND:\$<PLATFORM_ID:Darwin>,\$<BOOL:TRUE>,\$<BOOL:ON>>:CPPHTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN>"
  INTERFACE_COMPILE_FEATURES "cxx_std_11"
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "Threads::Threads;\$<\$<PLATFORM_ID:Windows>:ws2_32>;\$<\$<PLATFORM_ID:Windows>:crypt32>;\$<\$<AND:\$<PLATFORM_ID:Darwin>,\$<BOOL:TRUE>,\$<BOOL:ON>>:-framework CoreFoundation -framework Security>;\$<\$<BOOL:>:Brotli::common>;\$<\$<BOOL:>:Brotli::encoder>;\$<\$<BOOL:>:Brotli::decoder>;\$<\$<BOOL:TRUE>:ZLIB::ZLIB>;\$<\$<BOOL:TRUE>:zstd::libzstd>;\$<\$<BOOL:TRUE>:OpenSSL::SSL>;\$<\$<BOOL:TRUE>:OpenSSL::Crypto>"
  INTERFACE_SOURCES "${_IMPORT_PREFIX}/include/httplib.h"
  INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "include"
)

specifically "...$<\$<BOOL:TRUE>:zstd::libzstd>;...".

While I can patch CMakeModules/Findhttplib.cmake it's still a failure to have the ability to set USE=zstd and have it not be usable with CMake from another library.
Comment 1 Andrew Udvare 2025-04-02 21:29:48 UTC
$ emerge --info
Portage 3.0.67 (python 3.12.9-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-14, glibc-2.41-r1, 6.14.0-gentoo-limelight x86_64)
=================================================================
System uname: Linux-6.14.0-gentoo-limelight-x86_64-11th_Gen_Intel-R-_Core-TM-_i9-11900K_@_3.50GHz-with-glibc2.41
KiB Mem:    65709404 total,  45931464 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 02 Apr 2025 14:30:00 +0000
Head commit of repository gentoo: 8e52de30178c7fab6f3d9454785b7c7d9d4b8e15
Head commit of repository brave-overlay: 434f75d710c6ba6c98aba7794ed78895a9da0b08

Head commit of repository guru: e9a616b5d3842e686fdb46abec5eeacc4c8adca6

Timestamp of repository menelkir: Wed, 02 Apr 2025 07:20:52 +0000
Head commit of repository menelkir: b242dc3e4b1a5380fafe52df8a78427d7b518f7c

Timestamp of repository pentoo: Wed, 02 Apr 2025 07:20:41 +0000
Head commit of repository pentoo: c119ab698b4ee607ab769f669fb854389c704af9

Head commit of repository tatsh-overlay: a0975c9e753db7d578d3dd19807e25b9c64123a2

sh bash 5.2_p37
ld GNU ld (Gentoo 2.44 p1) 2.44.0
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo, 1.17-r2::gentoo
dev-build/cmake:           3.31.6-r1::gentoo
dev-build/libtool:         2.5.4::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.7.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.1::gentoo
dev-lang/python:           3.11.11_p2::gentoo, 3.12.9::gentoo, 3.13.2::gentoo, 3.13.2-r100::gentoo
dev-lang/rust-bin:         1.82.0-r103::gentoo, 1.83.0-r2::gentoo, 1.84.0-r2::gentoo, 1.85.0-r1::gentoo, 1.85.1::gentoo
llvm-core/clang:           19.1.7::gentoo, 20.1.1::gentoo
llvm-core/lld:             19.1.7::gentoo
llvm-core/llvm:            15.0.7-r7::gentoo, 17.0.6-r3::gentoo, 19.1.7::gentoo, 20.1.1::gentoo
sys-apps/baselayout:       2.17::gentoo
sys-apps/sandbox:          2.46::gentoo
sys-apps/systemd:          257.3::gentoo
sys-devel/binutils:        2.44::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/gcc:             14.2.1_p20250301::gentoo
sys-devel/gcc-config:      2.12.1::gentoo
sys-kernel/linux-headers:  6.14::gentoo (virtual/os-headers)
sys-libs/glibc:            2.41-r1::gentoo
Repositories:

gentoo
brave-overlay
crossdev
guru
menelkir
pentoo
tatsh-overlay

Installed sets: @admin, @android, @bashcomp, @cdr, @charles, @chrome, @cups, @dbeaver, @emulators, @exfat, @firefox, @fonts, @gimp, @git, @haskell, @i3, @ibus, @kde, @kernel, @libimobiledevice, @libreoffice, @media, @misc, @mlocate, @mupen64plus, @nfs, @pass, @portage-utilities, @python, @qemu, @rar, @retroarch, @sm64, @stepmania, @thunderbird, @tmux, @vim, @virtualbox, @vscode, @wine, @x11, @xirvik-vpn, @yt-dlp
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 2 --load-average 14 --quiet-build=y --usepkg --verbose-conflicts --buildpkg-exclude 'acct-*/* app-arch/rar app-emulation/virtualbox-extpack-oracle app-emulation/virtualbox-modules */*-bin dev-util/intel-ocl-sdk games-util/steam-launcher media-fonts/* media-video/magewell-pro-capture media-video/makemkv net-im/ripcord sys-kernel/linux-firmware sys-kernel/*-sources virtual/* media-video/cxadc *-drivers/* sys-apps/systemd www-client/google-chrome*'"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live clean-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -flto=auto -ggdb -march=native -mtune=native -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://www.gtlib.gatech.edu/pub/gentoo https://mirrors.rit.edu/gentoo/"
INSTALL_MASK="/boot/amd-uc.img /etc/avahi/services/sftp-ssh.service /etc/conf.d /etc/cron.daily /etc/cron.monthly /etc/cron.weekly /etc/dracut.conf /etc/grub.d /etc/init.d /etc/modules-load.d/ddccontrol-i2c-dev.conf /etc/portage/savedconfig/sys-kernel/linux-firmware-* /etc/xdg/menus/applications-merged/lsp-plugins.menu /etc/xdg/autostart/org.kde.plasma-welcome.desktop /etc/user/init.d /usr/lib/modules-load.d/fwupd-msr.conf /usr/lib/modules-load.d/joycond.conf /usr/lib/rc"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en en_GB en_US"
MAKEOPTS="--jobs=14 --load-average=14"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac aacs acl acpi activities aio alsa amd64 aptx avahi bash-completion bluetooth bluray branding bzip2 cairo cdda cddb cdio cdr cet cjk clang colord crypt cuda cups curl dav1d dbus declarative dri dts dvb dvd dvdr egl encode exif faudio ffmpeg flac fluidsynth gamepad gdbm gif gles2 gpm gsm gstreamer gui hardened heif hwaccel ibus iconv icu idn ipv6 jack jemalloc joystick jpeg jpeg2k kde kf6compat kwallet lame lcms ldac libass libcaca libnotify libretro libtirpc lm-sensors lto lv2 lvm lz4 lzma mad man matroska mng mod modplug modules-sign mp3 mp4 mpeg multilib ncurses nls nvenc ogg opencl opengl openmp opus pam pango pcre pdf pgo pic pipewire plasma png policykit ppds pulseaudio qml qt5 qt6 rar readline samba screencast sdl seccomp semantic-desktop snappy sound speex spell ssl startup-notification svg syslog system-av1 system-binutils system-boost system-bootloader system-cmark system-crontab system-ffmpeg system-harfbuzz system-heimdal system-info system-ipxe system-jpeg system-jsoncpp system-lcms system-leveldb system-libcxx system-libevent system-libs system-libvpx system-libyaml system-llvm system-lua system-lz4 system-mathjax system-mesa system-mitkrb5 system-numpy system-png system-python system-qemu system-seabios system-sqlite system-ssl system-tbb system-webp system-wfconfig system-wide system-wlroots system-zlib systemd taglib test-rust theora threads tiff tpm truetype twolame udev udisks unicode upower usb v4l vaapi vcd vdpau vim-syntax vlc vorbis vpx vulkan wavpack wayland webengine webp widgets wmf wxwidgets x264 x265 xattr xcb xft xinerama xml xpm xv xvid xxhash zeroconf zlib zstd" ABI_X86="64" ADA_TARGET="gcc_14" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev libinput joystick wacom" KERNEL="linux" L10N="en en-GB en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" QEMU_SOFTMMU_TARGETS="ppc x86_64" RUBY_TARGETS="ruby32" VIDEO_CARDS="nvidia v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 thomasg 2025-04-04 19:25:16 UTC
I ran into the same issue as well, when trying to fix up the guru-ebuild for net-im/nheko.

For this I added a Findzstd.cmake file to the ebuild, which works, but results in this httplib check failing.

I'm not sure how to properly handle that, I suspect the proper solution would be to have a global Findzstd.cmake file provided by the app-arch/zstd ebuild, which is comparable to how other distros usually handle it.

There is a related bug #872254, which also references the zstd upstream bugreport.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-04 19:26:58 UTC
It really needs to fallback to pkg_check_modules.
Comment 4 Alexey 2025-04-04 19:29:31 UTC
I opened https://github.com/yhirose/cpp-httplib/pull/2126 with that fallback