Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 867307 - dev-libs/boehm-gc-8.2.2[threads]: fails to build (error: too few arguments to function ‘pthread_setname_np’)
Summary: dev-libs/boehm-gc-8.2.2[threads]: fails to build (error: too few arguments to...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-29 08:29 UTC by Cănărău Constantin
Modified: 2022-08-30 20:28 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,19.55 KB, text/plain)
2022-08-29 08:29 UTC, Cănărău Constantin
Details
config.log (config.log,58.55 KB, text/plain)
2022-08-30 11:20 UTC, Cănărău Constantin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cănărău Constantin 2022-08-29 08:29:50 UTC
Created attachment 801826 [details]
build.log

dev-libs/boehm-gc-8.2.2 with threads flag enabled failed to build with:

In file included from /var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2/extra/gc.c:76:
/var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2/extra/../pthread_support.c: In function ‘set_marker_thread_name’:
/var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2/extra/../pthread_support.c:363:13: error: too few arguments to function ‘pthread_setname_np’
  363 |       (void)pthread_setname_np(name_buf);
      |             ^~~~~~~~~~~~~~~~~~
In file included from /var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2/include/private/../gc_pthread_redirects.h:38,
                 from /var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2/include/private/../gc.h:1791,
                 from /var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2/include/private/gc_priv.h:56,
                 from /var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2/include/private/dbg_mlc.h:28,
                 from /var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2/extra/../backgraph.c:15,
                 from /var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2/extra/gc.c:40:
/usr/include/pthread.h:463:12: note: declared here
  463 | extern int pthread_setname_np (pthread_t __target_thread, const char *__name)
      |            ^~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:1714: extra/gc.lo] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2-abi_x86_64.amd64'
make: *** [Makefile:1933: all-recursive] Error 1

It also fail with plain "-O2 -pipe" C(XX)FLAGS, no lto.

emerge --info
Portage 3.0.35 (python 3.10.6-final-0, default/linux/amd64/17.1/no-multilib/systemd, gcc-12.2.0, glibc-2.36-r1, 5.19.4-gentoo-costel x86_64)
=================================================================
System uname: Linux-5.19.4-gentoo-costel-x86_64-Intel-R-_Core-TM-_i7-6700K_CPU_@_4.00GHz-with-glibc2.36
KiB Mem:    32802280 total,  27199564 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 29 Aug 2022 08:00:01 +0000
Head commit of repository gentoo: 25394b24fb4e45ec367628793120d8a71aabae4c
sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.39 p3) 2.39.0
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0::gentoo
dev-lang/python:           3.10.6_p2::gentoo
dev-lang/rust-bin:         1.63.0::newer
dev-util/cmake:            3.24.1::gentoo
dev-util/meson:            0.63.1::gentoo
sys-apps/baselayout:       2.8-r2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          251.4::gentoo
sys-devel/autoconf:        2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39::gentoo
sys-devel/binutils-config: 5.4.1::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/llvm:            14.0.6-r2::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:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 8
    sync-rsync-vcs-ignore: true
    sync-rsync-extra-opts: --human-readable --delete-before --progress --new-compress

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo newer

pi
    location: /var/db/repos/pi
    masters: gentoo
    priority: 10

added
    location: /var/db/repos/added
    masters: gentoo
    priority: 100

newer
    location: /var/db/repos/newer
    masters: gentoo
    priority: 100

Installed sets: @crossdev, @desktop, @dev, @minimal, @vpn, @xfce
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -ffast-math -pipe -w -g0 -march=skylake -fipa-pta -fno-semantic-interposition -fno-plt -fweb -ftracer -flto=auto -flto-compression-level=9 -fdevirtualize-at-ltrans"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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/php/apache2-php8.1/ext-active/ /etc/php/cgi-php8.1/ext-active/ /etc/php/cli-php8.1/ext-active/ /etc/php/fpm-php8.1/ext-active/ /etc/php/phpdbg-php8.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O3 -ffast-math -pipe -w -g0 -march=skylake -fipa-pta -fno-semantic-interposition -fno-plt -fweb -ftracer -flto=auto -flto-compression-level=9 -fdevirtualize-at-ltrans"
DISTDIR="/mnt/linux/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=3 --load-average=10 --keep-going --with-bdeps=y --complete-graph --quiet-build=n --autounmask-write"
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 candy cgroup collision-protect config-protect-if-modified distlocks fail-clean fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc noinfo parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-filter unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.romnet.org/gentoo/ http://mirrors.xservers.ro/gentoo/ http://distfiles.gentoo.org/"
INSTALL_MASK="/usr/share/locale -/usr/share/locale/ro -/usr/share/locale/en -/usr/share/locale/en_US"
LANG="ro_RO.UTF-8"
LC_ALL="ro_RO.UTF-8"
LDFLAGS="-Wl,-O1,--sort-common,--hash-style=gnu,--enable-new-dtags,--as-needed -flto=auto"
LINGUAS="en ro"
MAKEOPTS="-j8 --load-average=10"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e -T0"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--human-readable --delete-before --progress --new-compress"
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"
RUSTFLAGS="-C debuginfo=0 -C opt-level=3 -C target-cpu=skylake"
SHELL="/bin/bash"
USE="X aac acpi aes alsa amd64 avx avx2 branding bzip2 cairo cli crypt dbus dri dvb f16c fam ffmpeg flac fma3 gdbm gif gpm gtk gtk3 iconv icu ipv6 jpeg jpeg2k libglvnd libtirpc lm-sensors lto lz4 mmx mmxext mp3 ncurses networkmanager nls nptl ogg opengl openmp pam pango pclmul pcre pdf pgo png policykit popcnt portaudio pulseaudio readline sdl seccomp server split-usr sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 systemd threads truetype udev udisks unicode upower usb v4l vaapi vhosts vorbis vulkan webp x264 zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2020" ALSA_CARDS="hda-intel usb-audio" 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en ro" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF X86 AMDGPU AArch64" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset fastcgi geoip2 gunzip gzip limit_conn limit_req memcached realip referer rewrite split_clients ssi sub userid naxsi" NGINX_MODULES_STREAM="access geoip2 limit_conn realip" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon" 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, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, RANLIB, READELF, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-29 23:00:12 UTC
I feel like there's something more to this given I can't reproduce it with the same USE flags.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-29 23:01:57 UTC
#   ifdef HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID /* iOS, OS X */
      (void)pthread_setname_np(name_buf);

Why did it take this path for you in /var/tmp/portage/dev-libs/boehm-gc-8.2.2/work/gc-8.2.2/extra/../pthread_support.c?

My configure gives:
>checking for pthread_setname_np... yes (with tid)

Yours gives:
>checking for pthread_setname_np... yes (w/o tid)

Please share your config.log.
Comment 3 Tino Mueller 2022-08-30 08:33:56 UTC
Have had the same error. Removing "-w" from CFLAGS fixed it.
Comment 4 Cănărău Constantin 2022-08-30 11:20:36 UTC
Created attachment 801970 [details]
config.log
Comment 5 Cănărău Constantin 2022-08-30 11:21:42 UTC
@Sam James
config.log is attached.

@Tino Mueller 
Yes, filtering -w does solve the issue. 

I considered -w just cosmetic, so I didn't remove it form plain flags. 
Thank you all for support.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-30 19:32:23 UTC
(In reply to Cănărău Constantin from comment #5)
> @Sam James
> config.log is attached.
> 
> @Tino Mueller 
> Yes, filtering -w does solve the issue. 
> 
> I considered -w just cosmetic, so I didn't remove it form plain flags. 
> Thank you all for support.

I could add a filter to the ebuild but the problem is, other packages might silently be misconfigured with -w because configure tests often rely on warnings.

What I recommend you do is use -w in a hook that applies it only after src_configure, to not affect configure tests.

I have a cheesy version of this for -Werror=implicit-function-declaration (which also breaks configure often).
Comment 7 Cănărău Constantin 2022-08-30 20:28:43 UTC
-w is there from a time with (much) older portage when I also used -fail-clean FEATURES and size matters.
Right now, this is not the case. I will remove -w from C(*)FLAGS.

Also, do not know if filter in the ebuild is really necessary. I waited few days before to fill the bug, due to my aggressive cflags and nobody complain or filled a bug. But I am not a Gentoo developer.

Thank you for your support.