View previous topic :: View next topic |
Author |
Message |
Kosmas Apprentice
Joined: 14 Sep 2006 Posts: 280 Location: Greece
|
Posted: Sun Sep 29, 2024 10:41 am Post subject: Cmake rebuild fails with undefined reference to [Solved] |
|
|
Hello,
After the latest sync cmake needed to recompile, but it fails with
Code: | /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: libCMakeLib.a(cmFileAPI.cxx.o): warning: relocation against `_ZTVN4Json10CharReaderE' in read-only section `.text.unlikely'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: libCMakeLib.a(cmake.cxx.o): in function `std::default_delete<cmFileAPI>::operator()(cmFileAPI*) const [clone .part.0]':
cmake.cxx:(.text+0x7644): undefined reference to `vtable for Json::CharReader'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: libCMakeLib.a(cmake.cxx.o): in function `Json::CharReader::~CharReader()':
cmake.cxx:(.text._ZN4Json10CharReaderD0Ev[_ZN4Json10CharReaderD5Ev]+0x7): undefined reference to `vtable for Json::CharReader'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: libCMakeLib.a(cmake.cxx.o): in function `Json::CharReader::~CharReader()':
cmake.cxx:(.text._ZN4Json10CharReaderD2Ev[_ZN4Json10CharReaderD5Ev]+0x7): undefined reference to `vtable for Json::CharReader'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: libCMakeLib.a(cmStringCommand.cxx.o): in function `(anonymous namespace)::ReadJson(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
cmStringCommand.cxx:(.text+0x85d3): undefined reference to `vtable for Json::CharReader'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: libCMakeLib.a(cmStringCommand.cxx.o): in function `(anonymous namespace)::ReadJson(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) [clone .cold]':
cmStringCommand.cxx:(.text.unlikely+0x13f8): undefined reference to `vtable for Json::CharReader'
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: libCMakeLib.a(cmFileAPI.cxx.o):cmFileAPI.cxx:(.text+0x9ea0): more undefined references to `vtable for Json::CharReader' follow
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
|
I tried recompiling all dependancies:
Code: | * dependency graph for dev-build/cmake-3.30.2
`-- dev-build/cmake-3.30.2 amd64
`-- app-arch/libarchive-3.7.6 (>=app-arch/libarchive-3.3.3) amd64
`-- app-crypt/rhash-1.4.4-r1 (app-crypt/rhash) amd64
`-- dev-libs/expat-2.6.3 (>=dev-libs/expat-2.0.1) amd64
`-- dev-libs/jsoncpp-1.9.6 (>=dev-libs/jsoncpp-1.9.2-r2) amd64
`-- dev-libs/libuv-1.48.0 (>=dev-libs/libuv-1.10.0) amd64
`-- net-misc/curl-8.8.0-r1 (>=net-misc/curl-7.21.5) amd64 [ssl]
`-- sys-libs/zlib-1.3.1-r1 (sys-libs/zlib) amd64
`-- virtual/pkgconfig-3 (virtual/pkgconfig) amd64
`-- dev-cpp/cppdap-0_pre20230605-r1 (dev-cpp/cppdap) amd64
`-- dev-qt/qtcore-5.15.14 (dev-qt/qtcore) amd64
`-- dev-qt/qtgui-5.15.14 (dev-qt/qtgui) amd64
`-- dev-qt/qtwidgets-5.15.14 (dev-qt/qtwidgets) amd64
`-- dev-qt/qtbase-6.7.2-r5 (dev-qt/qtbase) amd64 [gui widgets]
`-- sys-libs/ncurses-6.4_p20240414 (sys-libs/ncurses) amd64
`-- sec-keys/openpgp-keys-bradking-20240902 (>=sec-keys/openpgp-keys-bradking-20230817) amd64
`-- dev-python/requests-2.32.3 (dev-python/requests) amd64
`-- dev-python/sphinx-8.0.2 (dev-python/sphinx) amd64
`-- dev-build/make-4.4.1-r1 (dev-build/make) amd64
`-- app-crypt/gnupg-2.4.5-r1 (app-crypt/gnupg) amd64
`-- app-portage/gemato-20.6 (>=app-portage/gemato-20) amd64
[ dev-build/cmake-3.30.2 stats: packages (21), max depth (1) ]
|
I tried to unmerge and re-emerge, but still I get the same errror.
I understand that there is a dependancy somewhere, which somehow breaks the build, but I can not find it (I even re-emerged glibc).
Any help is appreciated.
Flags:
Code: | [ebuild R ] dev-build/cmake-3.30.2 USE="ncurses qt6 -dap -doc -gui -test -verify-sig" |
Info:
Code: | Portage 3.0.65 (python 3.12.6-final-0, default/linux/amd64/23.0/desktop/plasma/systemd, gcc-13, glibc-2.39-r6, 6.11.0-gentoo-x86_64 x86_64)
=================================================================
System Settings
=================================================================
System uname: Linux-6.11.0-gentoo-x86_64-x86_64-AMD_Ryzen_9_5950X_16-Core_Processor-with-glibc2.39
KiB Mem: 65728968 total, 49816332 free
KiB Swap: 0 total, 0 free
Timestamp of repository gentoo: Sun, 29 Sep 2024 05:45:00 +0000
Head commit of repository gentoo: 03581a1aa1c9a60d48460ae61ab0a3503424839e
Timestamp of repository brave-overlay: Wed, 30 Aug 2023 14:16:44 +0000
Head commit of repository brave-overlay: 6633c093c271deda5b29101a4ed5a611810268e1
Timestamp of repository serioussam: Sun, 08 Sep 2024 18:37:13 +0000
Head commit of repository serioussam: 915d660bcbb15d081f4bebc6012af8b1975a59b4
Timestamp of repository src_prepare-overlay: Sat, 28 Sep 2024 23:20:55 +0000
Head commit of repository src_prepare-overlay: dc54e9d745495716b048aebbbe4fafc778abdd8f
Timestamp of repository steam-overlay: Sat, 28 Sep 2024 20:51:00 +0000
Head commit of repository steam-overlay: fa47b2515a72363b4946c4e774e49fa5319cd4b4
Timestamp of repository x11: Sun, 08 Sep 2024 18:36:47 +0000
Head commit of repository x11: 3de32e500e15bd3dc3880247c49b212657ffbf50
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.30.2::gentoo
dev-build/libtool: 2.4.7-r4::gentoo
dev-build/make: 4.4.1-r1::gentoo
dev-build/meson: 1.5.1::gentoo
dev-java/java-config: 2.3.4::gentoo
dev-lang/perl: 5.40.0::gentoo
dev-lang/python: 3.10.15_p1::gentoo, 3.11.10_p1::gentoo, 3.12.6_p2::gentoo
dev-lang/rust: 1.80.1::gentoo
sys-apps/baselayout: 2.15::gentoo
sys-apps/sandbox: 2.39::gentoo
sys-apps/systemd: 255.11::gentoo
sys-devel/binutils: 2.42-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang: 18.1.8::gentoo
sys-devel/gcc: 13.3.1_p20240614::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-devel/lld: 18.1.8::gentoo
sys-devel/llvm: 15.0.7-r3::gentoo, 18.1.8-r1::gentoo
sys-kernel/linux-headers: 6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.39-r6::gentoo
Repositories:
gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
priority: -1000
volatile: False
sync-rsync-verify-max-age: 24
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-jobs: 1
sync-rsync-extra-opts:
brave-overlay
location: /var/db/repos/brave-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/brave-overlay.git
masters: gentoo
volatile: False
serioussam
location: /var/db/repos/serioussam
sync-type: git
sync-uri: https://github.com/gentoo-mirror/serioussam.git
masters: gentoo
volatile: False
src_prepare-overlay
location: /var/db/repos/src_prepare-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/src_prepare-overlay.git
masters: gentoo
volatile: False
steam-overlay
location: /var/db/repos/steam-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
masters: gentoo
volatile: False
x11
location: /var/db/repos/x11
sync-type: git
sync-uri: https://github.com/gentoo-mirror/x11.git
masters: gentoo
volatile: False
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=native -mtune=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
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 -pipe -fomit-frame-pointer -march=native -mtune=native"
DISTDIR="/mnt/4TB/Software/Linux/gentoo/distfiles"
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 -fomit-frame-pointer -march=native -mtune=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance 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 -fomit-frame-pointer -march=native -mtune=native"
GENTOO_MIRRORS="ftp://ftp.ntua.gr/pub/linux/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/"
LANG="el_GR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="el_GR en_GB el en"
MAKEOPTS="-j1"
PKGDIR="/mnt/4TB/Software/Linux/gentoo/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="/tmp"
SHELL="/bin/bash"
USE="24bpp 256-color 7z 7zip 8bit X X509 a52 aac aad aalib absolute-position acl acpi activefilter activities addc additional addns addressbook admin adns ads afp airdrop-ng airgraph-ng all-sfx alsa alsa-plugin amd64 amdgpu amf animgif ap appstream aptx archive arp arping asm aspell atm audit avif azure backup barcode bash-completion bdf bdplus berkdb bios32 bios64 bittorrent blender bluetooth bluez bluray bogofilter branding browser-integration buildpkg bzip2 cacert cairo calendar cdda cddb cdr cdrom cet cheats chm chromium clamav cleartype cleartype-hinting cloudformation cloudwatch color-management colord colordiff compositor conntrack convert corefonts cron crypt css ctype cue cups curl d3d9 dbus declarative deflate designer dht-node discid discover display-manager djvu dkim dmabuf dmi dmidecode dmx dolphin dos dri drm dts dv dvb dvbcsa dvbpsi dvd dvda dvdnav dvdr dvi eap-sim eap-tls edit editor editorconfig egl eglfs eks elasticsearch emoji enc265 encode eps epub equalizer eselect evdev ewf exif extra-cardsets extra-print-profiles extra-tools extraengine extras fam fasteap fat fbdev fdformat filebrowser filetransfer fils finger fips fits flac floppy fontconfig fonts foomatic fortune fping fpx freetds freetype ftp fuse galera gallium gd gdbm gegl gentoo-vm geoip geoip2 geolocation gif gimp git gles gles1 gles2 gles3 glusterfs google googledrive gpm gpu gr-audio graph graphviz grc grub gsm gstreamer gtk gui gvnc gzip hddtemp hdri heif hex history holidays iconv icu id3tag ide idn ieee1394 image-backend imap imlib importers importwizard innodb-lz4 innodb-lzo innodb-snappy ios ipmi iproute2 ipv6 iscsi iscsi-direct iso iso32 iso64 javafx javascript jdbc jemalloc jfs john journald joystick jpeg jpeg2k jpegxl json kaccounts kde kdesu keyboard kf6compat kmod kms ktls kvazaar kwallet lame lastfm lcdfilter lcms ldap libass libcaca libdrm libdvdnav libdvdread libinput libkms libnotify libtirpc libvirt libvirtd lightning linuxfb lirc live lm-sensors lm_sensors logrotate logviewer lrz lto lvm lxc lz4 lzip lzma lzo mad magnetgenerator maildir mariadb mbo mbox metric mikmod minizip mjpeg mms mng mod modemmanager modern-kernel modpack modplug moodbar motif motif22-compatibility mount-ntfs mouse mousepad mozilla mp3 mp4 mpeg mpg123 mplayer ms mtp multilib nat ncurses ndmp network networkmanager nfconntrack nfs nfsv4 nfsv41 nftables nls nmap-update npm nscd nsplugin ntfs ntfsprogs ntlm ntp nvme obex ocr odbc offensive office ogg okular opencl openconnect openexr opengl openipmi openldap openmp openssl opus osmesa oss otf otr ovf oxygen-theme p2p pam pango parted pcap pcre pdf pdfimport pgp pim pipewire plasma png policykit postproc ppapi ppds ppp pptx printsupport pulseaudio pvr python qemu qml qt5 qt6 radio rar rav1e raw rdp readline regedit resolvconf rfc3779 rfkill rtc s3 samba scanner screencast sctp sddm sdl sdl2 sdlgfx seccomp secure-messaging semantic-desktop sensord sensors sftp share sieve sip skins slang slattach smart smi smp snippets snmp sodium sound spamassassin speech spell spice sql sqlite srt ssh sshdump ssl ssssd stars startup-notification subtitles svg system-av1 systemd t1lib taglib tahoma tcp tdb teamd telephony telnet test-rust tfshark tftp tftpd thin thunderbolt tiff tkip toolame tools tpm tracepath transcode tremor truetype tshark ttf twolame type1 uchardet udev udf udisks uefi unicode update-drivedb update_drivedb upnp upnp-av upower usb usbip usbredir user-session usertools uuid v4l vaapi vc vcd vdpau vdr viewer virt-network virtfs vlc vnc vorbis vpx vulkan wallpapers wav wavpack wayland wayland-compositor webcam webchannel webdav webengine webgl webp websockets webstart wep wext wg-quick widevine widgets wifi wimax winbind winpopup wireguard wmf wps wxwidgets x11extras x264 x265 x509 x86-64 xa xattr xcb xcomposite xdg xfs xft xinerama xkb xls xlsx xmalloc xml xmlrpc xmp xmpp xnest xorg xps xrandr xsecurity xslt xtables xterm xv xvfb xvid xvmc xwayland yaml yassl yearly ytnef zenmap zink zip zlib zstd" ABI_X86="64 32" ADA_TARGET="gcc_12" 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="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3 vpclmulqdq" 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" GRUB_PLATFORMS="efi-64 pc coreboot efi-32 multiboot" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev joystick libinput" KERNEL="linux" L10N="el_GR en_GB en-GB el en" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LIBREOFFICE_EXTENSIONS="nlpsolver scripting-javascript" LLVM_TARGETS="AMDGPU WebAssembly" 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="i386 x86_64 aarch64 alpha arm ppc ppc64 mips mips64" QEMU_USER_TARGETS="i386 x86_64 aarch64 alpha arm ppc ppc64 mips mips64" RUBY_TARGETS="ruby31 ruby32" VIDEO_CARDS="amdgpu radeon radeonsi r300 r600 virgl vesa fbdev lavapipe" 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, EMERGE_DEFAULT_OPTS, 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
=================================================================
Package Settings
=================================================================
dev-build/cmake-3.30.2::gentoo was built with the following:
USE="ncurses qt6 -dap -doc -gui -test -verify-sig" ABI_X86="(64)"
CFLAGS="-w -O2 -pipe -fomit-frame-pointer -march=native -mtune=native -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=512"
CXXFLAGS="-w -O2 -pipe -fomit-frame-pointer -march=native -mtune=native -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=512"
|
Last edited by Kosmas on Mon Sep 30, 2024 5:47 am; edited 1 time in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31270 Location: here
|
Posted: Mon Sep 30, 2024 5:32 am Post subject: |
|
|
Try to rebuild dev-libs/jsoncpp package. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
Kosmas Apprentice
Joined: 14 Sep 2006 Posts: 280 Location: Greece
|
Posted: Mon Sep 30, 2024 5:44 am Post subject: |
|
|
fedeliallalinea wrote: | Try to rebuild dev-libs/jsoncpp package. |
I tried that and also tried unmasking. Did not work. |
|
Back to top |
|
|
Kosmas Apprentice
Joined: 14 Sep 2006 Posts: 280 Location: Greece
|
Posted: Mon Sep 30, 2024 5:47 am Post subject: |
|
|
I finally found a way to rebuild without errors!
It seems that it had something to do with the COMMON_FLAGS/CFLAGS/CXXFLAGS.
I had "-w -O2 -pipe -fomit-frame-pointer -march=native -mtune=native -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=512" which probably creates some kind of problem!
I removed all the flags with COMMON_FLAGS="" CFLAGS="" etc and rebuild cmake successfully.
I do not know which flag exactly creates the problem. Sometime later when I am free, I will possibly try the different combinations and find out which flag exactly creates the problem.
(It seems that the -O2 creates the problem!) |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1972
|
Posted: Tue Oct 01, 2024 3:28 am Post subject: |
|
|
-w often confuses configure tests. |
|
Back to top |
|
|
Kosmas Apprentice
Joined: 14 Sep 2006 Posts: 280 Location: Greece
|
Posted: Tue Oct 01, 2024 5:21 am Post subject: |
|
|
I also tried without the -w and the problem was the same.
I guess it has something to do with -O2 optimizations on my system, as I emerged the same package on a laptop with -O2 enabled and it finished successfully. |
|
Back to top |
|
|
|
|
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
|
|