Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921730 - sys-devel/distcc-3.4-r2 - fails to build with clang-17 on ppc: configure: error: Cannot find libiberty (conftest failure - ld.lld: error: undefined hidden symbol: __stack_chk_fail_local)
Summary: sys-devel/distcc-3.4-r2 - fails to build with clang-17 on ppc: configure: err...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2024-01-11 00:12 UTC by ernsteiswuerfel
Modified: 2024-01-21 13:59 UTC (History)
1 user (show)

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


Attachments
build.log (distcc-3.4-r2-20240110-234621.log,6.93 KB, text/plain)
2024-01-11 00:12 UTC, ernsteiswuerfel
Details
config.log (config.log,43.53 KB, text/plain)
2024-01-11 00:12 UTC, ernsteiswuerfel
Details
emerge --info (file_921730.txt,6.45 KB, text/plain)
2024-01-11 00:13 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2024-01-11 00:12:10 UTC
Created attachment 881881 [details]
build.log

[...]
checking for popt.h... yes
checking whether to use included libpopt... no
checking for poptGetContext in -lpopt... (cached) yes
checking for expandargv in -liberty... no
configure: error: Cannot find libiberty

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-devel/distcc-3.4-r2/work/distcc-3.4/config.log
 * ERROR: sys-devel/distcc-3.4-r2::gentoo failed (configure phase):
 *   econf failed


At first sight this looks like bug #697712 but config fails for a different reason here:

[...]
configure:6357: checking for expandargv in -liberty
configure:6386: clang -o conftest -O2 -mcpu=7450 -mtune=7450 -pipe -MD -W -Wall -Wimplicit -Wsh
adow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmiss
ing-prototypes -Wnested-externs -Wmissing-declarations -Wuninitialized  -DPY_SSIZE_T_CLEAN -DMI
NILZO_HAVE_CONFIG_H -DHAVE_CONFIG_H -D_GNU_SOURCE -Wl,-O1 -Wl,--as-needed conftest.c -liberty
-lpopt -lpopt  >&5
ld.lld: error: undefined hidden symbol: __stack_chk_fail_local
>>> referenced by argv.o:(expandargv) in archive /usr/lib/gcc/powerpc-gentoo-linux-musl/11/../.
./../../lib32/libiberty.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:6386: $? = 1

Also it does not seem to be a general clang-17 problem as distcc builds fine with clang on my amd64 musl box. And other packages build fine with clang-17 on this ppc partition.

As per Gentoo Clang Wiki the environment for building with clang was via following package.env setting:
CC="clang"
CPP="clang-cpp" # necessary for xorg-server and possibly other packages
CXX="clang++"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"

COMMON_FLAGS="-O2 -mcpu=7450 -mtune=7450 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
Comment 1 ernsteiswuerfel archtester 2024-01-11 00:12:28 UTC
Created attachment 881882 [details]
config.log
Comment 2 ernsteiswuerfel archtester 2024-01-11 00:13:10 UTC
Created attachment 881883 [details]
emerge --info