Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 870043 - net-fs/samba-4.16.4 installs broken binaries when compiled with clang-15
Summary: net-fs/samba-4.16.4 installs broken binaries when compiled with clang-15
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
: 870634 (view as bug list)
Depends on:
Blocks: systemwide-clang clang-16-porting
  Show dependency tree
 
Reported: 2022-09-14 02:07 UTC by cyrillic
Modified: 2022-11-22 23:45 UTC (History)
2 users (show)

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


Attachments
samba build log (build.log.xz,225.04 KB, application/x-xz)
2022-09-14 02:14 UTC, cyrillic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cyrillic 2022-09-14 02:07:46 UTC
net-fs/samba-4.16.4 installs broken binaries when compiled with clang-15.
I tried several other versions of samba, and they all do the same thing.
There is no issue when compiling with gcc-12 or clang-14.

Reproducible: Always

Actual Results:  
samba installs, but packages depending on samba fail to compile.


# emerge --info
Portage 3.0.36 (python 3.11.0-candidate-2, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-12.2.0, glibc-2.36-r1, 6.0.0-rc5 x86_64)
=================================================================
System uname: Linux-6.0.0-rc5-x86_64-AMD_Ryzen_Threadripper_2970WX_24-Core_Processor-with-glibc2.36
KiB Mem:    65837756 total,  60381872 free
KiB Swap:          0 total,         0 free
Head commit of repository qt: 943f1f45e69cee8a1c159244f91d822042f35b2d

Head commit of repository gentoo: cba3e865aef60dc06fc919cc7040bf7c82caadd1

sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.39 p4) 2.39.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-lang/perl:             5.36.0::gentoo
dev-lang/python:           3.10.7::gentoo, 3.11.0_rc2::gentoo
dev-lang/rust:             1.63.0::newstuff
dev-util/cmake:            3.24.2::gentoo
dev-util/meson:            0.63.2-r1::gentoo
sys-apps/baselayout:       2.8-r2::gentoo
sys-apps/openrc:           0.45.2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          251.4::gentoo
sys-devel/autoconf:        2.13-r2::gentoo, 2.71-r2::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           15.0.0::gentoo
sys-devel/gcc:             12.2.0::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             15.0.0::gentoo
sys-devel/llvm:            15.0.0::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.19::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r1::gentoo
Repositories:

newstuff
    location: /mnt/repos/newstuff
    masters: gentoo
    priority: -1030
    eclass-overrides: fixes

qt
    location: /mnt/repos/qt
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/qt.git
    masters: gentoo
    priority: -1020
    eclass-overrides: fixes

gnomelive
    location: /mnt/repos/gnomelive
    masters: gentoo
    priority: -1010
    eclass-overrides: fixes

gentoo
    location: /mnt/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/gentoo.git
    priority: -1000
    eclass-overrides: fixes

crossdev
    location: /mnt/repos/crossdev
    masters: gentoo
    eclass-overrides: fixes

fixes
    location: /mnt/repos/fixes
    masters: gentoo
    priority: 10
    eclass-overrides: fixes

Installed sets: @clang, @gnome, @qt6, @system
ACCEPT_KEYWORDS="* amd64 ~*"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/terminfo"
CXXFLAGS="-march=nocona -mtune=native -O2 -pipe"
DISTDIR="/mnt/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY 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"
FCFLAGS="-O2 -pipe"
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 parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j24"
PKGDIR="/var/tmp/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="X a52 aac acl alsa amd64 bluetooth bluray boost brotli bzip2 cairo caps cdr colord cpudetection css cups curl custom-cflags cxx dbus dnssec drm dts dvd eds egl encode exif expat fbcon ffmpeg flac flickr fontconfig fortran gdbm geolocation gif glamor gles2 glib gnome gnome-keyring gnutls gpm graphite gssapi gstreamer gtk gtk3 harfbuzz heif ibus icu idn imagemagick introspection ipv6 jpeg jpeg2k jpegxl kmod kms lcms libass libglvnd libinput libnotify lz4 lzma mp3 mpi nautilus ncurses networkmanager nls nptl numa ocamlopt ogg opencl opencv openexr opengl openmp openssl opus orc pam pango pcre pdf pipewire png policykit postproc postscript pulseaudio python qml readline samba speex spell split-usr ssl ssp svg systemd tcl telepathy theora threads tiff tk tools tracker truetype udev unicode upnp-av usb utils v4l vaapi vala vorbis vpx vulkan wayland webp x264 x265 xcb xkb xml xmp xv xvmc zlib zstd" ABI_X86="64" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3" CURL_SSL="openssl" ELIBC="glibc" INPUT_DEVICES="libinput wacom" KERNEL="linux" L10N="en" LLVM_TARGETS="AMDGPU BPF X86" LUA_SINGLE_TARGET="lua5-4" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_10 python3_11" RUBY_TARGETS="ruby31" USERLAND="GNU" VIDEO_CARDS="amdgpu intel nouveau radeon radeonsi"
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, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 cyrillic 2022-09-14 02:14:09 UTC
Created attachment 805039 [details]
samba build log

It looks like all the binaries are installed, but the linking is broken.

# lddtree /usr/lib64/samba/liblibsmb-samba4.so
/usr/lib64/samba/liblibsmb-samba4.so (interpreter => None)
    libndr.so.2 => /usr/lib64/libndr.so.2
        libgenrand-samba4.so => None
    libasn1util-samba4.so => None
    libsamba-security-samba4.so => None
    libgse-samba4.so => None
    libkrb5samba-samba4.so => None
    libcli-smb-common-samba4.so => None
    libCHARSET3-samba4.so => None
    libsamba-util.so.0 => /usr/lib64/libsamba-util.so.0
        libsocket-blocking-samba4.so => None
        libtime-basic-samba4.so => None
        libsys-rw-samba4.so => None
        libsystemd.so.0 => /lib64/libsystemd.so.0
            libcap.so.2 => /lib64/libcap.so.2
            libgcrypt.so.20 => /usr/lib64/libgcrypt.so.20
                libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0
            liblzma.so.5 => /lib64/liblzma.so.5
            libzstd.so.1 => /lib64/libzstd.so.1
            liblz4.so.1 => /usr/lib64/liblz4.so.1
            ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
        libicui18n.so.71 => /usr/lib64/libicui18n.so.71
            libm.so.6 => /lib64/libm.so.6
            libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/libstdc++.so.6
            libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/12.2.0/libgcc_s.so.1
        libicuuc.so.71 => /usr/lib64/libicuuc.so.71
            libicudata.so.71 => /usr/lib64/libicudata.so.71
        libunwind-x86_64.so.8 => /usr/lib64/libunwind-x86_64.so.8
            libz.so.1 => /lib64/libz.so.1
        libunwind.so.8 => /usr/lib64/libunwind.so.8
    libgensec-samba4.so => None
    libreplace-samba4.so => None
    libcliauth-samba4.so => None
    libsamba-errors.so.1 => /usr/lib64/libsamba-errors.so.1
    libcom-err-samba4.so => None
    libsmbconf.so.0 => /usr/lib64/libsmbconf.so.0
        libutil-reg-samba4.so => None
        libmessages-util-samba4.so => None
        libdbwrap-samba4.so => None
        libserver-id-db-samba4.so => None
        libtalloc-report-printf-samba4.so => None
        libiov-buf-samba4.so => None
        libmessages-dgm-samba4.so => None
        libinterfaces-samba4.so => None
        libsamba-sockets-samba4.so => None
        libsmbd-shim-samba4.so => None
        libsamba-cluster-support-samba4.so => None
        libutil-tdb-samba4.so => None
        libtdb-wrap-samba4.so => None
        libutil-setid-samba4.so => None
        libserver-role-samba4.so => None
        libldap.so.2 => /usr/lib64/libldap.so.2
            libsasl2.so.3 => /usr/lib64/libsasl2.so.3
        libtdb.so.1 => /usr/lib64/libtdb.so.1
        liblber.so.2 => /usr/lib64/liblber.so.2
    libtevent-util.so.0 => /usr/lib64/libtevent-util.so.0
    libsmb-transport-samba4.so => None
    libsamba3-util-samba4.so => None
    libsamba-debug-samba4.so => None
    libsamba-credentials.so.1 => /usr/lib64/libsamba-credentials.so.1
        libauthkrb5-samba4.so => None
        libldbsamba-samba4.so => None
        libsamdb-common-samba4.so => None
        libgssapi-samba4.so => None
        libkrb5-samba4.so => None
        libldb.so.2 => /usr/lib64/libldb.so.2
            libreplace-ldb.so => /usr/lib64/ldb/libreplace-ldb.so
    libsamba-hostconfig.so.0 => /usr/lib64/libsamba-hostconfig.so.0
    libbsd.so.0 => /usr/lib64/libbsd.so.0
        libmd.so.0 => /usr/lib64/libmd.so.0
    libtalloc.so.2 => /usr/lib64/libtalloc.so.2
    libgnutls.so.30 => /usr/lib64/libgnutls.so.30
        libbrotlienc.so.1 => /usr/lib64/libbrotlienc.so.1
            libbrotlicommon.so.1 => /usr/lib64/libbrotlicommon.so.1
        libbrotlidec.so.1 => /usr/lib64/libbrotlidec.so.1
        libidn2.so.0 => /usr/lib64/libidn2.so.0
        libunistring.so.2 => /usr/lib64/libunistring.so.2
        libtasn1.so.6 => /usr/lib64/libtasn1.so.6
        libnettle.so.8 => /usr/lib64/libnettle.so.8
        libhogweed.so.6 => /usr/lib64/libhogweed.so.6
        libgmp.so.10 => /usr/lib64/libgmp.so.10
    libtevent.so.0 => /usr/lib64/libtevent.so.0
        libreplace-tevent.so => /usr/lib64/tevent/libreplace-tevent.so
    libc.so.6 => /lib64/libc.so.6
Comment 2 cyrillic 2022-09-17 00:16:59 UTC
For some reason, when I first ran across this problem, the configure script was saying :

Checking for rpath library support       : not found 

but now when I compile with clang-15, I get this :

Checking for rpath library support       : yes 

and the linking is no longer broken. I am not sure what happened, but it looks like this fixed itself.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-17 00:18:50 UTC
(In reply to cyrillic from comment #2)
> For some reason, when I first ran across this problem, the configure script
> was saying :
> 
> Checking for rpath library support       : not found 
> 
> but now when I compile with clang-15, I get this :
> 
> Checking for rpath library support       : yes 
> 
> and the linking is no longer broken. I am not sure what happened, but it
> looks like this fixed itself.

It's likely because clang 15.0.0-r1 / 15.0.1 backs out some of the disruptive changes temporarily (see bug 870412).
Comment 4 Ionen Wolkens gentoo-dev 2022-09-29 01:28:38 UTC
*** Bug 870634 has been marked as a duplicate of this bug. ***
Comment 5 Larry the Git Cow gentoo-dev 2022-11-22 23:42:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8695c99fe33a6b0fabe942ce630fc5d7c71d8b32

commit 8695c99fe33a6b0fabe942ce630fc5d7c71d8b32
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-11-22 23:17:16 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-22 23:29:56 +0000

    net-fs/samba: fix miscompile w/ clang 16
    
    Closes: https://bugs.gentoo.org/870043
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/samba-4.15.12-configure-clang16.patch    | 117 +++++++++++++++++++++
 ...amba-4.15.12.ebuild => samba-4.15.12-r1.ebuild} |   1 +
 ...{samba-4.16.7.ebuild => samba-4.16.7-r1.ebuild} |   1 +
 3 files changed, 119 insertions(+)