Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931093 - sci-libs/rocBLAS-5.7.1-r2: error: option 'cf-protection=return' and 'cf-protection=branch' cannot be specified on this target
Summary: sci-libs/rocBLAS-5.7.1-r2: error: option 'cf-protection=return' and 'cf-prote...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-02 11:05 UTC by Neko-san
Modified: 2024-05-21 06:55 UTC (History)
6 users (show)

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


Attachments
Build Log (emerge_rocBLAS_build.log,6.23 KB, text/x-log)
2024-05-02 11:05 UTC, Neko-san
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neko-san 2024-05-02 11:05:16 UTC
I'm assuming this might be related to the "hardened" clang-common flag and its default behavior, but emerging rocBLAS fails because of -fcf-protection

Reproducible: Always

Steps to Reproduce:
1. emerge rocBLAS
Actual Results:  
Emerge to succeed regardless of -fcf-protection hardening

Expected Results:  
Emerge fails because alternative compiler is enforced that doesn't like -fcf-protection hardening

Portage 3.0.61 (python 3.11.9-final-0, default/linux/amd64/23.0/split-usr/llvm, gcc-13, glibc-2.38-r13, 6.9.0-rc6-tkg-eevdf-gentoo-llvm-zen2 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.9.0-rc6-tkg-eevdf-gentoo-llvm-zen2-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.38
KiB Mem:    32774352 total,   3598684 free
KiB Swap:   24970232 total,  19925528 free
Timestamp of repository gentoo: Thu, 02 May 2024 03:34:19 +0000
Head commit of repository gentoo: b2c226fca133b9e894e13201d8ed54f63d9e942d

Timestamp of repository guru: Tue, 30 Apr 2024 21:33:25 +0000
Head commit of repository guru: b3084d23130b887d95fe2dcd04ef9efa32ba1f52

Timestamp of repository kde: Sun, 28 Apr 2024 12:18:26 +0000
Head commit of repository kde: 6da5cc509055c9914c13d0242d0131b67589d7c6

Timestamp of repository steam-overlay: Fri, 19 Apr 2024 23:18:33 +0000
Head commit of repository steam-overlay: 69fc49999f96346c4cc4692a9a781b757a11c22a

Head commit of repository waffle-builds: d5f0d4b23666082bd84560353a401e919bda2d41

Head commit of repository bobwya: a8496a14aee3c337b0e547b97b546b08607242a8

Head commit of repository farmboy0: 36209b41100319fb9a18a9fb17e1557c035ea449

Head commit of repository librewolf: 9e354f7da7912ee22b87d047754067ec026e7604

Head commit of repository oxen-overlay: caa06ee33866f344b827f2bf7105839272cd7b3e

Head commit of repository src_prepare-overlay: 05776e3e7ea219583015f3748ceb04a112f3c62e

Head commit of repository tatsh-overlay: f2aa5d67d2192eaa044a5043d7ddfda724c0f44f

Head commit of repository tezeta: 693c3c49c3eb0d35c4cc9bde77b59374285d1c1b

Head commit of repository thegreatmcpain: 4eb51538f824598827055146c408367d6a09b141

Head commit of repository x0rzavi: e560dddb58c5baebc899623129a9db37f9a8da4b

Timestamp of repository xwing: Wed, 01 May 2024 17:05:29 +0000
Head commit of repository xwing: 56aa7ef287f0e817e842724d88cdbc691b79879a

sh lksh
ld GNU ld (Gentoo 2.41 p5) 2.41.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.1_p16-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.3::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.0-r1::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r2::gentoo
dev-lang/python:           3.11.9::gentoo, 3.12.3::gentoo
dev-lang/rust:             1.77.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/binutils:        2.41-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           17.0.6::gentoo
sys-devel/gcc:             13.2.1_p20240210::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             17.0.6::gentoo
sys-devel/llvm:            17.0.6::gentoo
sys-kernel/linux-headers:  6.8-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r13::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.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

waffle-builds
    location: /var/db/repos/waffle-builds
    sync-type: git
    sync-uri: https://github.com/FlyingWaffleDev/waffle-builds
    masters: gentoo
    volatile: False

bobwya
    location: /var/db/repos/bobwya
    sync-type: git
    sync-uri: https://github.com/bobwya/bobwya
    masters: gentoo
    priority: 50
    volatile: False

farmboy0
    location: /var/db/repos/farmboy0
    sync-type: git
    sync-uri: https://github.com/farmboy0/portage-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

librewolf
    location: /var/db/repos/librewolf
    sync-type: git
    sync-uri: https://codeberg.org/librewolf/gentoo.git
    masters: gentoo
    priority: 50
    volatile: False

oxen-overlay
    location: /var/db/repos/oxen-overlay
    sync-type: git
    sync-uri: https://github.com/XutaxKamay/oxen-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

src_prepare-overlay
    location: /var/db/repos/src_prepare-overlay
    sync-type: git
    sync-uri: https://gitlab.com/src_prepare/src_prepare-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

tatsh-overlay
    location: /var/db/repos/tatsh-overlay
    sync-type: git
    sync-uri: https://github.com/Tatsh/tatsh-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

tezeta
    location: /var/db/repos/tezeta
    sync-type: git
    sync-uri: https://github.com/tezeta/tezeta-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

thegreatmcpain
    location: /var/db/repos/thegreatmcpain
    sync-type: git
    sync-uri: https://gitlab.com/TheGreatMcPain/thegreatmcpain-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

x0rzavi
    location: /var/db/repos/x0rzavi
    sync-type: git
    sync-uri: https://github.com/x0rzavi/x0rzavi-overlay.git
    masters: gentoo
    priority: 50
    volatile: False

xwing
    location: /var/db/repos/xwing
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/xwing.git
    masters: gentoo
    priority: 50
    volatile: False

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="llvm-as"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-march=znver2 -pipe -minline-all-stringops -ftree-vectorize -O3 -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3"
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"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-march=znver2 -pipe -minline-all-stringops -ftree-vectorize -O3 -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3"
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=znver2 -pipe -minline-all-stringops -ftree-vectorize -O3 -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3"
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 multilib-strict network-sandbox news nostrip 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=znver2 -pipe -minline-all-stringops -ftree-vectorize -O3 -fno-plt -ftrivial-auto-var-init=pattern -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fstack-protector-strong -fcf-protection -fPIC -ggdb3"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="en_US.utf8"
LD="ld.lld"
LDFLAGS="-Wl,-O3,--sort-common,--as-needed,-z,relro,-z,now"
LEX="flex"
MAKEOPTS="-j7"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="gzip"
PORTAGE_COMPRESS_FLAGS="-9 -R -p4"
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"
RANLIB="llvm-ranlib"
READELF="llvm-readelf"
RUSTFLAGS="-C opt-level=3 -C target-cpu=native -C codegen-units=1"
SHELL="/bin/bash"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="7z X a52 aac acl acpi activities alsa amd64 autotype bash-completion bluetooth branding browser browser-integration bzip2 cairo cdda cdr cet clang cli colord crash-handler crypt cups dbus declarative default-compiler-rt default-libcxx default-lld desktop-portal dhclient discover dri dts dvd dvdr echo-cancel elogind encode exif ffmpeg firewall flac flatpak fluidsynth fortran gbm gdbm gif gles2 gles3 gpm gstreamer gtk gui hardened iconv icu ipv6 iwd jack jack-client jpeg kde kf6compat kwallet lcms legacy-systray libcxx libnotify libtirpc llvm-libunwind lm-sensors mad mgba mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openh264 openmp openssl opus pam pango pcre pdf pic pie pipewire pipewire-alsa plasma png policykit ppds pulseaudio qml qt5 raw readline resolvconf retroachievements rtc screencast sddm sdl seccomp sechash semantic-desktop share smart sound sound-server spell split-usr ssl startup-notification svg system-crontab system-man test-rust threads tiff timidity truetype udev udisks unicode upnp upower usb v4l vaapi vdpau vorbis vulkan wallpapers wav wayland widgets wired wxwidgets x264 xattr xcb xcsecurity xft xml xorg xscreensaver xv xvid zeroconf zlib" ABI_X86="64" ADA_TARGET="gcc_12" AMDGPU_TARGETS="gfx1101 gfx908 gfx90a" 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 rdrand 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" 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" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby31" SANE_BACKENDS="hp" VIDEO_CARDS="fbdev vesa dummy v4l lavapipe amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
YACC="byacc"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, SIZE, YFLAGS
Comment 1 Neko-san 2024-05-02 11:05:37 UTC
Created attachment 892138 [details]
Build Log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-02 11:06:36 UTC
What version of clang-common?
Comment 3 Ionen Wolkens gentoo-dev 2024-05-02 11:26:12 UTC
Assuming clang-common is right, do wonder if there's some other factor affecting this. negril never filed a bug afaik, but had failing libclc using clang-common-18.1.4-r3 + checked that /etc/clang had -Xarch_host manually.

Not that I've tried to reproduce.
Comment 4 Ionen Wolkens gentoo-dev 2024-05-02 11:27:40 UTC
(In reply to Ionen Wolkens from comment #3)
> clang-common-18.1.4-r3
Then again, maybe -r4 helped (and -r5 for 17) with that.
Comment 5 Neko-san 2024-05-02 11:31:25 UTC
My version of clang-common is 17.0.6-r5
Comment 6 Sv. Lockal 2024-05-20 23:24:22 UTC
Not sure, it I'm reading the initial message correctly (format slightly differs from `emerge --info`), but it looks like instead of relying on GCC patches and clang-common, `-fstack-clash-protection -fstack-protector-strong -fcf-protection` were added directly in /etc/portage/make.conf.

This is described at:
https://wiki.gentoo.org/wiki/Hardened/FAQ#Do_I_need_to_pass_any_flags_to_LDFLAGS.2FCFLAGS_in_order_to_turn_on_hardened_building.3F

In theory, portage can somehow sanitize flags (e. g. "if compiler is clang and CXXFLAGS contains flag -xxx, replace it with flag -Xarch_host -xxx"), but it is probably not needed, given that it is described in FAQ.

Clang 19 will cancel out cf-protection flags for GPU on Clang: https://github.com/llvm/llvm-project/issues/86450
Comment 7 Sv. Lockal 2024-05-20 23:29:19 UTC
* fix for my previous message: "Clang has _an open bug_ to cancel out cf-protection flags for GPU targets"
Comment 8 Neko-san 2024-05-21 06:55:20 UTC
@Sv. Lockal - To clarify, even if I remove those flags fro make.conf, it makes no difference; I already tested that (albiet afterwards) because USE=hardned is enabled.