Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 766722 - app-emulation/qemu-5.2.0-r1: with distcc: fails to build ../meson.build:1248:4: ERROR: C shared library 'fdt' not found
Summary: app-emulation/qemu-5.2.0-r1: with distcc: fails to build ../meson.build:1248:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-23 18:38 UTC by Mickaël Bucas
Modified: 2022-04-18 11:24 UTC (History)
5 users (show)

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


Attachments
build.log (build.log,11.27 KB, text/plain)
2021-01-23 18:40 UTC, Mickaël Bucas
Details
meson-log.txt (meson-log.txt,63.19 KB, text/plain)
2021-01-24 10:32 UTC, Mickaël Bucas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mickaël Bucas 2021-01-23 18:38:11 UTC
qemu fails to build with error message ERROR: C shared library 'fdt' not found

It seems like this library is available, but only in 64 bits version

# locate libfdt|grep "^/usr/lib"
/usr/lib64/libfdt-1.6.0.so
/usr/lib64/libfdt.so
/usr/lib64/libfdt.so.1
# locate libfdt|grep "^/usr/include"
/usr/include/libfdt.h
/usr/include/libfdt_env.h


Reproducible: Always

Steps to Reproduce:
emerge =app-emulation/qemu-5.2.0-r1
Actual Results:  
Build failure with error message

Expected Results:  
Successful build

# emerge --info
Portage 3.0.13 (python 3.7.9-final-0, default/linux/amd64/17.1, gcc-9.3.0, glibc-2.32-r5, 5.4.80-gentoo-r1-x86_64 x86_64)
=================================================================
System uname: Linux-5.4.80-gentoo-r1-x86_64-x86_64-AMD_Phenom-tm-_II_X6_1090T_Processor-with-gentoo-2.7
KiB Mem:    16397748 total,   6252324 free
KiB Swap:   16777212 total,  16775164 free
Timestamp of repository gentoo: Sat, 23 Jan 2021 01:45:01 +0000
Head commit of repository gentoo: 5d064660eda940769ff8efefc94961d7dca2ba61
sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
distcc 3.3.3 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r5::gentoo, 3.7.9-r1::gentoo, 3.8.6-r1::gentoo, 3.9.1-r1::gentoo
dev-util/cmake:           3.17.4-r1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2-r1::gentoo
sys-devel/binutils:       2.34-r2::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r5::gentoo
Repositories:

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

mbucas
    location: /data/Code/GitHub/gentoo-overlay
    masters: gentoo

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -fomit-frame-pointer -march=amdfam10 -mtune=amdfam10 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -mmmx -m3dnow -msse -msse2 -msse3 -mno-ssse3 -msse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /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"
CXXFLAGS="-O3 -pipe -fomit-frame-pointer -march=amdfam10 -mtune=amdfam10 --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -mmmx -m3dnow -msse -msse2 -msse3 -mno-ssse3 -msse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite "
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 10 --load-average 16"
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 distcc 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="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="fr"
MAKEOPTS="--jobs 60 --load-average 16"
PKGDIR="/var/cache/portage/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"
USE="X alsa amd64 bash-completion berkdb bzip2 cairo cli crypt dbus dri elogind encode exif ffmpeg flac fontconfig fortran gd gif graphviz gstreamer gtk iconv imlib ipv6 java jpeg kde libglvnd libtirpc lm_sensors mad mng mp3 mpeg multilib mysql ncurses nls nptl nsplugin ogg opengl openmp pam pango pcre perl php png python qt5 quicktime readline samba sdl seccomp spell split-usr sql ssl svg tcpd tiff truetype udev unicode vhosts vorbis xattr xml xpm xv zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_core authn_dbd authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http proxy_html rewrite setenvif slotmem_shm so socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias xml2enc" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" 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="fr" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7 python3_8 python3_9" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mickaël Bucas 2021-01-23 18:40:05 UTC
Created attachment 684246 [details]
build.log
Comment 2 Ionen Wolkens gentoo-dev 2021-01-23 23:17:03 UTC
I can't reproduce, maybe try without distcc? Otherwise will need to see:
/var/tmp/portage/app-emulation/qemu-5.2.0-r1/work/qemu-5.2.0/softmmu-build/meson-logs/meson-log.txt
Comment 3 Mickaël Bucas 2021-01-24 10:32:58 UTC
Created attachment 684315 [details]
meson-log.txt

Log of the same build than previous "build.log"
Comment 4 Mickaël Bucas 2021-01-24 10:50:21 UTC
Disabling distcc makes the build succeed.

It's surprising that previous versions built correctly with distcc. "fdt" isn't a new feature in 5.2.0, it was already enabled in 5.1.0 in USE flags.
Comment 5 Ionen Wolkens gentoo-dev 2021-01-24 11:07:25 UTC
qemu upstream semi-migrated to meson, so that it could impact certain things is actually not surprising.
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2021-01-24 13:09:37 UTC
You'll need to debug where distcc interferes. The simplest would be to compare build logs with and without distcc.

A few pointers could be:

   ../meson.build:1248:4: ERROR: C shared library 'fdt' not found

```
fdt = not_found
fdt_opt = get_option('fdt')
if have_system
  if fdt_opt in ['enabled', 'auto', 'system']
    have_internal = fs.exists(meson.current_source_dir() / 'dtc/libfdt/Makefile.libfdt')
    fdt = cc.find_library('fdt', static: enable_static,
                          required: fdt_opt == 'system' or
                                    fdt_opt == 'enabled' and not have_internal)
```

I think it should just do an -lfdt test, like:

```
$ echo 'int main(){}' | x86_64-pc-linux-gnu-gcc -x c - -o /tmp/fdt-test -lfdt; lddtree /tmp/fdt-test
/tmp/fdt-test (interpreter => /lib64/ld-linux-x86-64.so.2)
    libfdt.so.1 => /usr/lib64/libfdt.so.1
    libc.so.6 => /lib64/libc.so.6
```

You can try to run that manually and wrapped with distcc to see if it works.
Comment 7 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-01-01 07:43:56 UTC
Still reproducible?
Comment 8 Mickaël Bucas 2022-04-18 11:24:41 UTC
The current stable version is app-emulation/qemu-6.2.0

I've enabled distcc for this package, and emerge finished successfully. So it seems that the bug has been resolved between version 5.2 and 6.2.