Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
CMAKE_PREFIX_PATH broken
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
johnny99
Apprentice
Apprentice


Joined: 24 Oct 2005
Posts: 251
Location: Berkeley, California

PostPosted: Sat Aug 03, 2024 3:14 pm    Post subject: CMAKE_PREFIX_PATH broken Reply with quote

After updating the system, before depclean, cmake is having a problem finding '.cmake' files, like the search path is wrong.

I hacked around some of them by doing this:

Code:

CMAKE_PREFIX_PATH=/usr/lib/llvm/17/lib64/cmake/llvm;/usr/lib64/cmake/spdlog emerge --update --newuse --deep --with-bdeps=y -ta @world


Doxygen gave an error like this, but errors differ in what they report, but it is always about finding '.cmake' files that are on the system.

app-text/doxygen failed


Code:

CMake Error at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package):
  Could not find a package configuration file provided by "fmt" with any of
  the following names:

    fmtConfig.cmake
    fmt-config.cmake

  Add the installation prefix of "fmt" to CMAKE_PREFIX_PATH or set "fmt_DIR"
  to a directory containing one of the above files.  If "fmt" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  /usr/lib64/cmake/spdlog/spdlogConfig.cmake:48 (find_dependency)
  CMakeLists.txt:69 (find_package)


System state:

Code:

emerge --info
Portage 3.0.65 (python 3.12.3-final-0, default/linux/amd64/23.0/split-usr/no-multilib, gcc-13, glibc-2.39-r6, 6.6.38-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-6.6.38-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i7-4770T_CPU_@_2.50GHz-with-glibc2.39
KiB Mem:    16265240 total,   9523512 free
KiB Swap:    3749204 total,   3530068 free
Timestamp of repository gentoo: Fri, 19 Jul 2024 05:15:00 +0000
Head commit of repository gentoo: 29bb4cb1b681c1f0fd49b9b3ec8d24db57798206
sh bash 5.2_p26-r6
ld GNU ld (Gentoo 2.42 p3) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r6::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.28.5::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.1::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r3::gentoo
dev-lang/python:           3.10.14_p1-r1::gentoo, 3.11.9-r1::gentoo, 3.12.3-r1::gentoo
dev-lang/rust-bin:         1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo, 2.39-r5::gentoo, 2.40-r5::gentoo, 2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             11.4.1_p20240501::gentoo, 12.4.0::gentoo, 13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.namerica.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 3

mother-stilen-com
    location: /usr/local/overlays
    masters: gentoo
    priority: 0
    volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core-avx2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb /var/qmail/alias /var/qmail/control /var/spool/munin-async/.ssh /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/apache2-php7.2/ext-active/ /etc/php/apache2-php8.2/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cgi-php8.2/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/php/cli-php8.2/ext-active/ /etc/php/fpm-php8.2/ext-active/ /etc/php/phpdbg-php8.2/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=core-avx2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n"
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 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live 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 sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
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="3dnow X a52 aac acl alsa amd64 apache2 authdaemond bzip2 cet crypt dbus device-mapper dvd elogind encode fam ffmpeg gdbm gnutls hald iconv imagemagick imap ipv6 jpeg lame libtirpc lm_sensors maildir mmx mp3 mpeg mysql ncurses nls ogg opengl openmp oss pam pcre policykit qmail qmail-spp readline sdl seccomp semantic-desktop sockets spamassassin split-usr sse sse2 ssl test-rust tiff truetype unicode valias vhosts vorbis xattr xcomposite xml xvid zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="access authz_host auth auth_basic authn_core authz_core authn_file authz_default authz_groupfile authz_user auth_dbm auth_anon auth_digest alias bluray file-cache echo charset-lite cache disk-cache mem-cache css dvdread ext-filter case_filter case-filter-in filter deflate mime-magic cern-meta expires headers usertrack unique-id proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions unique_id userdir so slotmem_shm authn_core socache_shmcb apache2_modules_authn_core proxy_uwsgi unixd" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5 php5-4 php7-3 php7-4 php8" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby25 ruby26 ruby31 ruby32" VIDEO_CARDS="fbdev vesa vga intel" 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, INSTALL_MASK, 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


I tried rebuilding everything cmake depends on, and checked for any pending config updates in /etc.


Last edited by johnny99 on Mon Aug 05, 2024 4:00 am; edited 1 time in total
Back to top
View user's profile Send private message
johnny99
Apprentice
Apprentice


Joined: 24 Oct 2005
Posts: 251
Location: Berkeley, California

PostPosted: Mon Aug 05, 2024 4:00 am    Post subject: Reply with quote

I can temporarily overcome the CMAKE_PREFIX_PATH issues by fixing the path manually, which tells me the thing that managers CMAKE_PREFIX_PATH is broken.


Code:

CMAKE_PREFIX_PATH=/usr/lib/llvm/17/lib64/cmake/llvm:/usr/lib64/cmake/spdlog:/usr/lib64/cmake/fmt:/usr/lib64/cmake/absl  emerge --update --newuse --deep --with-bdeps=y -ta @world
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1945

PostPosted: Mon Aug 05, 2024 5:41 am    Post subject: Reply with quote

This usually means there's either crap in /usr/local or an environment variable exported which shouldn't be.
Back to top
View user's profile Send private message
popop01
n00b
n00b


Joined: 29 Oct 2024
Posts: 1

PostPosted: Tue Oct 29, 2024 10:42 am    Post subject: Reply with quote

I've gotten exactly the same problem.
I discovered that FIND_LIBRARY_USE_LIB64_PATHS global property from cmake was set to FALSE by default instead of TRUE.
In cmake source code I found the following lines in Modules/Platform/Linux.cmake :
Code:

# Debian has lib32 and lib64 paths only for compatibility so they should not be
# searched.
if(NOT CMAKE_CROSSCOMPILING)
  if (EXISTS "/etc/debian_version")
    set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS FALSE)
    set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
  endif()
  if (EXISTS "/etc/arch-release")
    set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
  endif()
endif()


Indeed after checking my /etc, /etc/arch-release was there (maybe created from a manual install, don't know how it got there) and I deleted it.
After this quick fix, everything got back to normal and emerge compiled successfully all my cmake packages :D

So make sure that you don't have /etc/debian_version or /etc/arch-release that got mistakenly here and delete it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum