Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dev-libs/boost failed to compile (solved)
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
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Fri May 10, 2024 10:50 am    Post subject: dev-libs/boost failed to compile (solved) Reply with quote

I ran my update @world and while everything seemed to go well, I found this:

Code:
gcc.compile.c++ bin.v2/libs/json/build/gcc-4.2/gentoorelease/pch-off/threading-multi/visibility-hidden/src.o

    "clang++"   -fvisibility-inlines-hidden  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -march=native -fstack-protector-strong -D_FORTIFY_SOURCE=2 -std=c++17 -fPIC -m64 -pthread -finline-functions -Wno-inline -Wall -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_COBALT_USE_STD_PMR=1 -DBOOST_CONTAINER_DYN_LINK=1 -DBOOST_JSON_DYN_LINK=1 -DBOOST_JSON_SOURCE -DNDEBUG   -I"."  -c -o "bin.v2/libs/json/build/gcc-4.2/gentoorelease/pch-off/threading-multi/visibility-hidden/src.o" "libs/json/src/src.cpp"

gcc.compile.c++ bin.v2/libs/graph/build/gcc-4.2/gentoorelease/pch-off/threading-multi/visibility-hidden/read_graphviz_new.o

    "clang++"   -fvisibility-inlines-hidden  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -march=native -fstack-protector-strong -D_FORTIFY_SOURCE=2 -std=c++17 -fPIC -m64 -pthread -finline-functions -Wno-inline -Wall -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_COBALT_USE_STD_PMR=1 -DBOOST_GRAPH_DYN_LINK=1 -DNDEBUG   -I"." -I"libs/graph/src"  -c -o "bin.v2/libs/graph/build/gcc-4.2/gentoorelease/pch-off/threading-multi/visibility-hidden/read_graphviz_new.o" "libs/graph/src/read_graphviz_new.cpp"

...failed updating 4 targets...
 * ERROR: dev-libs/boost-1.84.0-r3::gentoo failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 3292:  Called multilib-minimal_src_compile
 *   environment, line 2054:  Called multilib_foreach_abi 'multilib-minimal_abi_src_compile'
 *   environment, line 2321:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2026:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2024:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile'
 *   environment, line  499:  Called multilib-minimal_abi_src_compile
 *   environment, line 2048:  Called multilib_src_compile
 *   environment, line 2541:  Called die
 * The specific snippet of code:
 *       ejam --prefix="${EPREFIX}"/usr "${OPTIONS[@]}" || die;
 *
 * If you need support, post the output of `emerge --info '=dev-libs/boost-1.84.0-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/boost-1.84.0-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/boost-1.84.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/boost-1.84.0-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/boost-1.84.0-r3/work/boost_1_84_0-abi_x86_64.amd64'
 * S: '/var/tmp/portage/dev-libs/boost-1.84.0-r3/work/boost_1_84_0'

>>> Failed to emerge dev-libs/boost-1.84.0-r3, Log file:

>>>  '/var/tmp/portage/dev-libs/boost-1.84.0-r3/temp/build.log'


emerge --info looks like this:
Code:
emerge --info '=dev-libs/boost-1.84.0-r3::gentoo'
Portage 3.0.63 (python 3.11.9-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-13, glibc-2.38-r13, 6.6.13-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.6.13-gentoo-x86_64-AMD_EPYC_7401P_24-Core_Processor-with-glibc2.38
KiB Mem:    65836292 total,  53396784 free
KiB Swap:    2097148 total,   2097148 free
Timestamp of repository gentoo: Thu, 09 May 2024 10:30:00 +0000
Head commit of repository gentoo: 5d9ebf7a49f3a75d2889a6d36bcc7340515d84d6
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-build/autoconf:        2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.27.9::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.3.2::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r3::gentoo
dev-lang/python:           3.11.9::gentoo, 3.12.3::gentoo
dev-lang/rust:             1.74.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.53::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.40-r5::gentoo, 2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo
sys-devel/gcc:             12.3.1_p20230526::gentoo, 13.2.1_p20240210::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.38-r13::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:

crossdev
    location: /var/db/repos/portage-crossdev
    masters: gentoo
    priority: 10
    volatile: False

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
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/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
DISTDIR="/var/cache/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="-march=native -O2 -pipe -fomit-frame-pointer"
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="-march=native -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j24"
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 acl acpi activities alsa amd64 audiofile bindist branding bzip2 cairo cdb cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind encode exif ffmpeg fftw flac fortran gdbm gif gimp gpm gtk gui gzip iconv icu imagemagick ipv6 jack jpeg kde kwallet ladspa lame lash lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls ogg opengl openmp pam pango pcre pdf plasma png policykit posix ppds qml qt5 raw readline samba scanner screencast sdl seccomp sound spell split-usr ssl startup-notification subversion svg test-rust threads tiff truetype udev udisks unicode upower usb vorbis vulkan webp widgets wxwidgets x264 xattr xcb xft xine xml xv xvid zip zlib" ABI_X86="64" 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="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" 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" INPUT_DEVICES="libinput virtualbox" 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="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" SANE_BACKENDS="epson" VIDEO_CARDS="nouveau virtualbox" 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, LINGUAS, 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


And likewise:
Code:
emerge -pqv =dev-libs/boost-1.84.0-r3::gentoo
[ebuild  r  U ] dev-libs/boost-1.84.0-r3 [1.82.0-r1] USE="bzip2 context* icu nls stacktrace%* zlib -debug -doc -lzma -mpi -numpy -python -tools -zstd" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python3_11 -python3_10 -python3_12%"
[ebuild  rR   ] sys-fs/cryfs-0.10.3-r1  USE="-debug -test"
[ebuild  r  U ] dev-util/mdds-2.1.1 [2.0.3] USE="openmp -doc -test"
[ebuild  r  U ] app-text/libetonyek-0.1.10-r2 [0.1.10-r1] USE="-doc -static-libs -test"
[ebuild     U ] dev-libs/libixion-0.19.0 [0.17.0-r1] USE="-debug -python" PYTHON_SINGLE_TARGET="python3_11 -python3_10 -python3_12%"
[ebuild     U ] dev-libs/liborcus-0.19.2 [0.17.2-r1] USE="spreadsheet-model -python -test -tools" PYTHON_SINGLE_TARGET="python3_11 -python3_10 -python3_12%"
[ebuild  N    ] dev-python/filelock-3.13.4  USE="-test" PYTHON_TARGETS="python3_11 (-pypy3) -python3_10 -python3_12"
[ebuild  NS   ] dev-cpp/libcmis-0.6.2 [0.5.2-r2] USE="-man -test -tools"
[uninstall    ] dev-cpp/libcmis-0.5.2-r2  USE="-man -test -tools"
[blocks b     ] dev-cpp/libcmis:0.5 ("dev-cpp/libcmis:0.5" is soft blocking dev-cpp/libcmis-0.6.2)
[ebuild  r  U ] media-gfx/inkscape-1.3.2-r2 [1.2.2-r4] USE="X cdr exif imagemagick jpeg openmp readline spell -dia -graphicsmagick -inkjar -postscript -sourceview% -svg2 -test -visio -wpg (-jemalloc%)" PYTHON_SINGLE_TARGET="python3_11 -python3_10 -python3_12%"
[ebuild  r  U ] app-office/libreoffice-bin-7.6.4.1 [7.5.6.2-r1] USE="kde -gnome -java" CPU_FLAGS_X86="sse2" PYTHON_SINGLE_TARGET="python3_11"
[ebuild  rR   ] net-ftp/filezilla-3.66.4  USE="dbus nls -test" CPU_FLAGS_X86="sse2"

The following packages are causing rebuilds:

  (dev-util/mdds-2.1.1:1/2.1::gentoo, ebuild scheduled for merge) causes rebuilds for:
    (app-text/libetonyek-0.1.10-r2:0/0::gentoo, ebuild scheduled for merge)
  (dev-libs/boost-1.84.0-r3:0/1.84.0::gentoo, ebuild scheduled for merge) causes rebuilds for:
    (dev-util/mdds-2.1.1:1/2.1::gentoo, ebuild scheduled for merge)
    (dev-libs/libixion-0.19.0:0/0.18::gentoo, ebuild scheduled for merge)
    (media-gfx/inkscape-1.3.2-r2:0/0::gentoo, ebuild scheduled for merge)
    (sys-fs/cryfs-0.10.3-r1:0/0::gentoo, ebuild scheduled for merge)
    (net-ftp/filezilla-3.66.4:0/0::gentoo, ebuild scheduled for merge)
    (dev-cpp/libcmis-0.6.2:0/0.6::gentoo, ebuild scheduled for merge)
    (app-office/libreoffice-bin-7.6.4.1:0/0::gentoo, ebuild scheduled for merge)
    (dev-libs/liborcus-0.19.2:0/0.18::gentoo, ebuild scheduled for merge)


_________________
Expert in non-working solutions


Last edited by Spanik on Wed May 15, 2024 5:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30990
Location: here

PostPosted: Fri May 10, 2024 5:02 pm    Post subject: Reply with quote

Can you post full build.log?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Fri May 10, 2024 8:04 pm    Post subject: Reply with quote

Here you are: https://quirinus.one/gentoo/build.log
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1698

PostPosted: Fri May 10, 2024 10:06 pm    Post subject: Reply with quote

Spanik wrote:
Here you are: https://quirinus.one/gentoo/build.log

A few questions:

  • Why is "[1] gcc-4.2" coming up during configure? On mine it says: "[1] gcc-13.2". Is there some really ancient reference somewhere?
  • Why is clang++ showing up? Is there some specific reason to override this?
I ask this because of the first error: clang++: error: invalid linker name in argument '-fuse-ld=lld'

In short, this configuration fed into boost is not valid.
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Sat May 11, 2024 7:54 am    Post subject: Reply with quote

grknight wrote:
Spanik wrote:
Here you are: https://quirinus.one/gentoo/build.log

A few questions:

  • Why is "[1] gcc-4.2" coming up during configure? On mine it says: "[1] gcc-13.2". Is there some really ancient reference somewhere?
  • Why is clang++ showing up? Is there some specific reason to override this?
I ask this because of the first error: clang++: error: invalid linker name in argument '-fuse-ld=lld'

In short, this configuration fed into boost is not valid.


I have no idea for the gcc version. My version of gcc is:

Code:
~ # gcc --version
gcc (Gentoo 13.2.1_p20240210 p14) 13.2.1 20240210
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


However I do have /etc/portage/package.env/boost
Code:
dev-libs/boost compiler-clang

This because my cpu (AMD Epyc) is of a generation that has a hardware issue that only shows up with gcc and not with clang. Same for Libreoffice but there I switched to the .bin package.

EDIT: I found the original thread back: https://forums.gentoo.org/viewtopic-t-1160482-highlight-boost+clang.html
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21768

PostPosted: Sat May 11, 2024 3:08 pm    Post subject: Reply with quote

Forcing clang might explain that odd gcc-4.2:
Code:
$ gcc --version
gcc (Gentoo Hardened 13.2.1_p20240210 p14) 13.2.1 20240210
$ cat a.c
GNUC = __GNUC__
GNUC_MINOR = __GNUC_MINOR__
GNUC_PATCHLEVEL = __GNUC_PATCHLEVEL__
$ gcc -E -o - - < a.c
GNUC = 13
GNUC_MINOR = 2
GNUC_PATCHLEVEL = 1
$ clang -E -o - - < a.c
GNUC = 4
GNUC_MINOR = 2
GNUC_PATCHLEVEL = 1
$
(Irrelevant output lines omitted.)

For bizarre historical reasons, clang identifies as GNU GCC 4.2.1 in its macros, even when using a clang released long after GCC 4.2.1 was declared end-of-life. If the build system is capturing the values of those macros and using them in paths, that would explain the output shown.
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Sat May 11, 2024 7:42 pm    Post subject: Reply with quote

Ok. But why does it comes up now? I have been compiling this for some time with the setting of "compiler-clang". And more importantly, how can I get past it?
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Sun May 12, 2024 12:44 pm    Post subject: Reply with quote

Hello! Nobody out there for an idea? I'm now blocked into my update and having a lot of blocks because of this. I tried updating boost alone but that doesn't work at all.

Is there any way to get out of this hole? Going back to a previous version that does compile?
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21768

PostPosted: Sun May 12, 2024 2:53 pm    Post subject: Reply with quote

grknight asked above about the odd -fuse-ld=lld. Why is that present? Does removing it help?
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Sun May 12, 2024 3:13 pm    Post subject: Reply with quote

Hu wrote:
grknight asked above about the odd -fuse-ld=lld. Why is that present? Does removing it help?


I'm sorry but I have no idea where to look for that. The only time I come across "fuse" is in the kernel config: "File system in user space support" which I have enabled. Is it this one?
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21768

PostPosted: Sun May 12, 2024 3:26 pm    Post subject: Reply with quote

No, this is a concatenation of -f and use-ld=lld. That it fused into the string fuse is an unfortunate coincidence, and has no connection to the kernel's FUSE. I suggest you start by examining whatever configuration you used to force the use of clang instead of gcc.
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Sun May 12, 2024 8:12 pm    Post subject: Reply with quote

As far as configuration, I didn't do anything that wasn't advised by this forum.

So after that boost (and libreoffice) concked out when emerging I came to the forum as I mentioned above and changed this:

/etc/portage/package.use/boost:
Code:
dev-libs/boost compiler-clang


and /etc/portage/env/compiler-clang:
Code:
# Normal settings here
COMMON_FLAGS="-O2 -march=native"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"

CC="clang"
CXX="clang++"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"

LDFLAGS="${LDFLAGS} -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed"

# Hardening which isn't (yet?) done by default for Clang, unlike GCC.
_HARDENING_FLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2"
CFLAGS="${CFLAGS} ${_HARDENING_FLAGS}"
CXXFLAGS="${CXXFLAGS} ${_HARDENING_FLAGS}"
LDFLAGS="${LDFLAGS} -Wl,-z,relro,-z,now"


I swapped libreoffice to libreoffice.bin. And that is all I did. After that I hadn't have an issue until a couple of days ago. I never did anything else than "emerge -uvUD @world" and it worked. If there was I kernel update I just accepted the new options if it was advised as "Yes".

Ok, re-reading this I just saw where that option is. Sorry, I just copied this from what I got served here. That is a bit the issue. You guys know soo much that we (the simple users) take this as the gospel and just copy it without thinking or (worse) knowing what we do. So I really have no idea what this does.

Would you please take a moment to share? I'll remove it tomorrow and run it. Too tired now.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21768

PostPosted: Sun May 12, 2024 9:31 pm    Post subject: Reply with quote

Per info gcc:
Code:
‘-fuse-ld=lld’
     Use the LLVM ‘lld’ linker instead of the default linker.
Based on inspection of strace output, it looks like clang can emit that error message whenever the specified value cannot be found as a runnable linker. Therefore, I suspect that ld.lld is not a runnable program on $PATH when clang runs here.
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Tue May 14, 2024 4:24 pm    Post subject: Reply with quote

A day later as yesterday was an unpleasant day at the office and I was to tired to do anything but eat and go to bed.

I removed the -fuse-ld=lld from the /etc/portage/env/compiler-clang and this makes no difference. I crashes again:
Code:
    "clang++"   -fvisibility-inlines-hidden  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -O2 -march=native -fstack-protector-strong -D_FORTIFY_SOURCE=2 -std=c++17 -fPIC -m64 -pthread -finline-functions -Wno-inline -Wall -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_COBALT_USE_STD_PMR=1 -DBOOST_GRAPH_DYN_LINK=1 -DNDEBUG   -I"." -I"libs/graph/src"  -c -o "bin.v2/libs/graph/build/gcc-4.2/gentoorelease/pch-off/threading-multi/visibility-hidden/read_graphviz_new.o" "libs/graph/src/read_graphviz_new.cpp"

...failed updating 2 targets...
 * ERROR: dev-libs/boost-1.84.0-r3::gentoo failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 3292:  Called multilib-minimal_src_compile
 *   environment, line 2054:  Called multilib_foreach_abi 'multilib-minimal_abi_src_compile'
 *   environment, line 2321:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2026:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2024:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile'
 *   environment, line  499:  Called multilib-minimal_abi_src_compile
 *   environment, line 2048:  Called multilib_src_compile
 *   environment, line 2541:  Called die
 * The specific snippet of code:
 *       ejam --prefix="${EPREFIX}"/usr "${OPTIONS[@]}" || die;
 *
 * If you need support, post the output of `emerge --info '=dev-libs/boost-1.84.0-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/boost-1.84.0-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/boost-1.84.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/boost-1.84.0-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/boost-1.84.0-r3/work/boost_1_84_0-abi_x86_64.amd64'
 * S: '/var/tmp/portage/dev-libs/boost-1.84.0-r3/work/boost_1_84_0'

>>> Failed to emerge dev-libs/boost-1.84.0-r3, Log file:

>>>  '/var/tmp/portage/dev-libs/boost-1.84.0-r3/temp/build.log'


Worse, /var/tmp/portage is empty so there isn't even a build/log.

I just hope that clang isn't running into the same hardware issue as gcc because that would mean either another pc or a distro that doesn't require compiling boost.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21768

PostPosted: Tue May 14, 2024 4:44 pm    Post subject: Reply with quote

That output does not contain anything that I think we can use to help you. We would need the full build log, which you say is not produced.
Back to top
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 992
Location: Somewhere in Denmark

PostPosted: Tue May 14, 2024 6:38 pm    Post subject: Reply with quote

It is not 1:1 though first
Code:
...failed updating 4 targets...
second
Code:
...failed updating 2 targets...
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Tue May 14, 2024 6:50 pm    Post subject: Reply with quote

Just tried it again and this time I found this (probably looked in the wrong place the first time, bit of stress of ending up with a non working pc)

https://quirinus.one/gentoo/build_2.log

Looks like it is the linker again.

Tried with "-j1" to make sure, no change same output.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 992
Location: Somewhere in Denmark

PostPosted: Tue May 14, 2024 7:06 pm    Post subject: Reply with quote

Spanik wrote:
Just tried it again and this time I found this (probably looked in the wrong place the first time, bit of stress of ending up with a non working pc)

https://quirinus.one/gentoo/build_2.log

Looks like it is the linker again.

Tried with "-j1" to make sure, no change same output.


Now it's failing with
Code:
...failed updating 3 targets...
and complaining about
Code:
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: cannot find -lunwind: No such file or directory
Never used clang nor dunno what unwind is - what happens if you remove
Code:
-unwindlib=libunwind
from you LDFLAGS in your env-file? (or maybe have to point it at the right location with full path?
(or maybe it needs to be -lunwind instead of -unwindlib ?)
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Tue May 14, 2024 7:34 pm    Post subject: Reply with quote

freke wrote:
Never used clang nor dunno what unwind is - what happens if you remove
Code:
-unwindlib=libunwind
from you LDFLAGS in your env-file? (or maybe have to point it at the right location with full path?
(or maybe it needs to be -lunwind instead of -unwindlib ?)


If I remove that as well it looks as if it continuous. It has now already compiles 4 packages so I guess it is past boost.

But what is happening? These options are a long time in my /etc/portage and only now I have this. I'm getting more and more dubious about this setup.
- could it be that during one of the previous updates of the kernel some kernel setting got into my config that makes this happen?
- is this due to the code or my hardware?
- would changing over completely to clang help?
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
freke
l33t
l33t


Joined: 23 Jan 2003
Posts: 992
Location: Somewhere in Denmark

PostPosted: Tue May 14, 2024 7:58 pm    Post subject: Reply with quote

Spanik wrote:
freke wrote:
Never used clang nor dunno what unwind is - what happens if you remove
Code:
-unwindlib=libunwind
from you LDFLAGS in your env-file? (or maybe have to point it at the right location with full path?
(or maybe it needs to be -lunwind instead of -unwindlib ?)


If I remove that as well it looks as if it continuous. It has now already compiles 4 packages so I guess it is past boost.

But what is happening? These options are a long time in my /etc/portage and only now I have this. I'm getting more and more dubious about this setup.
- could it be that during one of the previous updates of the kernel some kernel setting got into my config that makes this happen?
- is this due to the code or my hardware?
- would changing over completely to clang help?


I don't knwo really - but I see
Code:
ns ~ # eix -v unwind
* sys-libs/libunwind
     Available versions:  1.7.2(0/8)^t 1.8.1(0/8)^t **9999(0/8)*l^t
     IUSE (all versions): debug debug-frame (+)doc libatomic lzma static-libs test zlib ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32"
     Best versions/slot:  1.8.1(0/8)^t
     Homepage:            https://savannah.nongnu.org/projects/libunwind
     Find open bugs:      https://bugs.gentoo.org/buglist.cgi?quicksearch=sys-libs%2Flibunwind
     Description:         Portable and efficient API to determine the call-chain of a program
     License:             MIT

* sys-libs/llvm-libunwind
     Available versions:  15.0.7^t 16.0.6-r1^t 17.0.6^t ~18.1.4^t ~18.1.5^t **19.0.0_pre20240427^t **19.0.0_pre20240504^t **19.0.0_pre20240509^t **19.0.0.9999*l^t
     IUSE (all versions): +clang (+)debug static-libs test verify-sig ABI_MIPS="n32 n64 o32" ABI_S390="32 64" ABI_X86="32 64 x32"
     Best versions/slot:  17.0.6^t
     Homepage:            https://llvm.org/docs/ExceptionHandling.html
     Find open bugs:      https://bugs.gentoo.org/buglist.cgi?quicksearch=sys-libs%2Fllvm-libunwind
     Description:         C++ runtime stack unwinder from LLVM
     License:             Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )

Found 2 matches
Could it be any of those packages missing/gotten unmerged? - I've never typed unwind in my shells before this topic....
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Wed May 15, 2024 5:19 pm    Post subject: Reply with quote

freke wrote:
Found 2 matches[/code]Could it be any of those packages missing/gotten unmerged? - I've never typed unwind in my shells before this topic....


Not intentional AFAIKS. I don't remember ever doing anything LLVM related. So it remais to be seen how long before another one of those issues comes up.

Solved for the time being but not knowing what was solved or how it was solved means this is a very unstable setup.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1565
Location: South America

PostPosted: Fri May 17, 2024 12:08 am    Post subject: Reply with quote

Spanik wrote:
You guys know soo much that we (the simple users) take this as the gospel and just copy it without thinking or (worse) knowing what we do. So I really have no idea what this does.
Spanik wrote:
I'm getting more and more dubious about this setup.
- could it be that during one of the previous updates of the kernel some kernel setting got into my config that makes this happen?
- is this due to the code or my hardware?
- would changing over completely to clang help?
Spanik wrote:
Solved for the time being but not knowing what was solved or how it was solved means this is a very unstable setup.

OK. Building Boost requires a "C++ translation environment". On your computer, a set of software components, and the operating system they run on, implement said translation environment. When using GCC, all those software components come from two packages, sys-devel/gcc and sys-devel/binutils. The LLVM project splits its counterparts up in more packages. You don't get all of them installed by doing emerge sys-devel/clang with default USE flags. But it doesn't matter, because Clang's C++ front end, clang++, can use components from GCC and GNU Binutils instead.

Gentoo's LLVM profiles set USE flags up so that all the software components that make up the translation environment come from the LLVM project. You are using clang++ for one single package, just so that you can work around a GCC bug on your hardware. So you don't need to switch to an LLVM profile. But the setting of LDFLAGS in your /etc/portage/env file insists on telling Clang to use the LLVM components that you don't have installed. Therefore, your build fails. So just do:

/etc/portage/env/compiler-clang
Code:
CC="clang"
CXX="clang++"
AR="llvm-ar"
AS="clang -c"
CPP="clang-cpp"
RANLIB="llvm-ranlib"

Setting AR and RANLIB might even be unnecessary, but it doesn't hurt.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Spanik
l33t
l33t


Joined: 12 Dec 2003
Posts: 961
Location: Belgium

PostPosted: Sat May 18, 2024 11:47 am    Post subject: Reply with quote

Thank you for that information.

So it could help if I would add libunwind and lld to my setup. Or would that just bring unneeded complication?
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
GDH-gentoo
Veteran
Veteran


Joined: 20 Jul 2019
Posts: 1565
Location: South America

PostPosted: Sat May 18, 2024 2:21 pm    Post subject: Reply with quote

Just for being able to build Boost on that hardware? Not worth it IMO. Clang can use libgcc_s from sys-devel/gcc and ld.bfd from sys-devel/binutils just fine. Gentoo's ebuilds should have set this up automatically for you on a non-LLVM profile when you installed sys-devel/clang.
_________________
NeddySeagoon wrote:
I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:
As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Back to top
View user's profile Send private message
Demo
Tux's lil' helper
Tux's lil' helper


Joined: 25 Nov 2022
Posts: 86

PostPosted: Mon May 20, 2024 5:11 pm    Post subject: Reply with quote

Hello ...

I get the same family of errors too "failed updating # target", with either gcc or llvm. As a benchmark I recompiled 184 r3 and it went well, and fast. Is this a bug in 185?
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