Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 829764 - media-sound/pulseaudio-15.0-r1 fails to build multilib with clang
Summary: media-sound/pulseaudio-15.0-r1 fails to build multilib with clang
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-21 09:51 UTC by Markus Peloquin
Modified: 2021-12-22 04:12 UTC (History)
5 users (show)

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


Attachments
build.log (clang) (build.log,98.83 KB, text/plain)
2021-12-21 09:53 UTC, Markus Peloquin
Details
meson-log.txt (clang, 32bit) (meson-log.txt,156.71 KB, text/plain)
2021-12-21 09:55 UTC, Markus Peloquin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Peloquin 2021-12-21 09:51:34 UTC
Basically it isn't passing `-m32` to the compiler (I tried clang & gcc, neither pass the option) during the 32-bit build. I think I observed this with mesa but somehow must have worked around it...

Reproducible: Always

Steps to Reproduce:
1. USE=abi_x86_32 emerge -1v pulseaudio



Portage 3.0.28 (python 3.8.12-final-0, default/linux/amd64/17.1, gcc-10.3.0, glibc-2.33-r7, 5.13.9-gentoo x86_64)
=================================================================
System uname: Linux-5.13.9-gentoo-x86_64-AMD_FX-tm-8150_Eight-Core_Processor-with-glibc2.33
KiB Mem:    16334288 total,   3701228 free
KiB Swap:   33554428 total,  32677060 free
Timestamp of repository gentoo: Sun, 19 Dec 2021 01:15:01 +0000
Head commit of repository gentoo: 7b4b1b180951c92ab88030c18c47eb97a146b018
Timestamp of repository steam-overlay: Sat, 18 Dec 2021 22:08:33 +0000
Head commit of repository steam-overlay: 803ed6c29a6afcc637b1bad0ee44a1695f47fc5e

sh bash 5.1_p8
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p8::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.0-r3::gentoo
dev-lang/python:           3.9.9::local, 3.10.1-r1::local
dev-lang/rust:             1.57.0::gentoo
dev-util/cmake:            3.21.4::gentoo
dev-util/meson:            0.60.2-r1::gentoo
sys-apps/baselayout:       2.7-r3::gentoo
sys-apps/openrc:           0.44.9::gentoo
sys-apps/sandbox:          2.25::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.4::gentoo
sys-devel/binutils:        2.35.2::gentoo, 2.37_p1::gentoo
sys-devel/binutils-config: 5.4::gentoo
sys-devel/clang:           12.0.1::gentoo, 13.0.0::gentoo
sys-devel/gcc:             10.3.0-r2::gentoo, 11.2.0::gentoo
sys-devel/gcc-config:      2.4::gentoo
sys-devel/libtool:         2.4.6-r6::gentoo
sys-devel/lld:             13.0.0::gentoo
sys-devel/llvm:            12.0.1::gentoo, 13.0.0::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.10-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.33-r7::gentoo
Repositories:

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

local
    location: /var/db/repos/local
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

Installed sets: @i3blocks
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
AR="llvm-ar"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-march=bdver1 -O3 -pipe -flto=thin"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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"
CXX="clang++"
CXXFLAGS="-march=bdver1 -O3 -pipe -flto=thin"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
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 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 userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=bdver1 -O3 -pipe -flto"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.utf8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O3 -fuse-ld=lld -rtlib=compiler-rt"
MAKEOPTS="-j9"
NM="llvm-nm"
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"
RANLIB="llvm-ranlib"
SHELL="/bin/zsh"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="X acl amd64 bzip2 cli crypt dri fontconfig iconv icu idn ipv6 libedit libglvnd libtirpc lzma maildir mmx multilib ncurses nls nptl openmp pam pcre pic seccomp split-usr sse sse2 ssl udev unicode vim-syntax xattr xcb zlib zsh-completion zstd" ABI_X86="64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx fma4 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev keyboard libinput mouse" KERNEL="linux" L10N="de en fr nb nn no" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9 pypy3" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby27 ruby30" SANE_BACKENDS="escl" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, READELF, RUSTFLAGS, SIZE, YACC, YFLAGS
Comment 1 Markus Peloquin 2021-12-21 09:53:14 UTC
Created attachment 759968 [details]
build.log (clang)
Comment 2 Markus Peloquin 2021-12-21 09:55:19 UTC
Created attachment 759969 [details]
meson-log.txt (clang, 32bit)
Comment 3 Mart Raudsepp gentoo-dev 2021-12-21 09:58:53 UTC
Nothing pulseaudio can do here, it's about what happens in multilib-minimal.eclass, multilib-build.eclass and multilib.eclass.
multilib.eclass multilib_toolchain_setup function sets things up, including CC. If clang needs a -m32 instead of calling a 32bit $CHOST-clang instead, then the $(get_abi_CFLAGS) call within ought to be taking care of that.

Assigning to multilib.eclass maintainers for review
Comment 4 Ionen Wolkens gentoo-dev 2021-12-21 10:09:12 UTC
Mentioned it failed with gcc too, so there's probably something odd going on.

And wouldn't have a i686-...-gcc nor clang normally, it's x86_64-*-gcc -m32

Seems to be passing -m32 just fine with clang for me either way, from meson-log.txt:

C++ compiler for the build machine: clang++ -m32 (clang 13.0.0 "clang version 13.0.0")
C++ linker for the build machine: clang++ -m32 ld.lld 13.0.0

So not sure why it's not here at the moment.
Comment 5 Markus Peloquin 2021-12-21 10:11:22 UTC
Okay so it turns out that Meson.eclass doesn't like that I've set BUILD_CC and BUILD_CXX and I don't know why. If I set them, it uses their values unquestioningly, but with multilib, there's no way to set them to separate values.

So is this expected behavior on multilib systems? Autotools packages don't behave this way.

Thing is though, I've been bit by not setting BUILD_CC before, though I cannot recall which package it was anymore.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-21 10:20:16 UTC
(In reply to Markus Peloquin from comment #5)
> Thing is though, I've been bit by not setting BUILD_CC before, though I
> cannot recall which package it was anymore.

Other questions aside, you shouldn't need to set those variables.
Comment 7 Mike Gilbert gentoo-dev 2021-12-21 16:21:10 UTC
I suppose we could change meson.eclass to only use BUILD_CC when tc-is-cross-compiler is true. Otherwise, we use CC.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-22 04:12:23 UTC
(In reply to Mike Gilbert from comment #7)
> I suppose we could change meson.eclass to only use BUILD_CC when
> tc-is-cross-compiler is true. Otherwise, we use CC.

I guess we can do that, although it feels a bit like it's not the real problem here.

Thanks for the report, marcus, although I think I'm inclined to say this one was mostly INVALID (although there's a change we can - and should - make to meson.eclass), and we need to figure out separately what broke for you in other packages *without* BUILD_CC.

Does that sound reasonable?