Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704932 - dev-util/cmake-3.14.6 : ld: /usr/lib/libexpat.so: error adding symbols: file in wrong format
Summary: dev-util/cmake-3.14.6 : ld: /usr/lib/libexpat.so: error adding symbols: file ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-07 14:57 UTC by Mario Kicherer
Modified: 2020-07-22 15:25 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,521.20 KB, text/plain)
2020-01-07 15:02 UTC, Mario Kicherer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Kicherer 2020-01-07 14:57:53 UTC
Since quite some time (I think even before the switch from 17.0 to 17.1 profile) some cmake-based packages failed to build as cmake tried to link 32bit libraries to an AMD64 binary. Those packages were not important and I ignored them as I failed to find the root issue. Now, I tried to rebuild cmake and it also fails due to the same mistake.

I think I followed the migration guide from 17.0. and 17.1 precisely.



Reproducible: Always




Portage 2.3.79 (python 3.6.9-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.2.0, glibc-2.29-r7, 5.2.20-gentoo x86_64)
=================================================================
System uname: Linux-5.2.20-gentoo-x86_64-Intel-R-_Core-TM-_i7-8700K_CPU_@_3.70GHz-with-debian-jessie
KiB Mem:    16271076 total,   5088880 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 07 Jan 2020 08:00:01 +0000
Head commit of repository gentoo: b1c60b967252a9c4904b8b925cfc4c8577cc204b
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.5.7::gentoo, 3.6.9::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            8.3.0-r1::gentoo, 9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo
Repositories:

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

local
    location: /usr/local/portage
    masters: gentoo

crossdev
    location: /usr/local/crossdev
    masters: gentoo
    priority: 10

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN 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 sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en de de_DE"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/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="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 amdgpu apparmor avahi berkdb bluetooth branding bzip2 cairo canusb cdda clang cli crossdev crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg flac fortran fuse gdbm gif git gles gpm iconv icu idn ipv6 jpeg kde kipi kwallet lcms ldap libinput libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pulseaudio python qml qt5 raw readline samba sdl seccomp slp spell split-usr ssl startup-notification subversion svg systemd tcpd tiff truetype udev udisks unicode upower usb v4l vorbis wayland webdav widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid zeroconf 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="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="mmx mmxext sse sse2" 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="efi-64 pc qemu" INPUT_DEVICES="evdev keyboard mouse libinput" KERNEL="linux" L10N="en de de_DE en_US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF NVPTX ARM" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6" QEMU_SOFTMMU_TARGETS="arm aarch64 x86_64" QEMU_USER_TARGETS="arm aarch64" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="nouveau amdgpu radeonsi radeon" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mario Kicherer 2020-01-07 15:02:36 UTC
Created attachment 602752 [details]
build.log
Comment 2 Mario Kicherer 2020-01-07 15:04:01 UTC
$ file /usr/lib/libexpat.so.1.6.10
/usr/lib/libexpat.so.1.6.10: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

$ equery f expat
 * Searching for expat ...
 * Contents of dev-libs/expat-2.2.8:
/usr
/usr/bin
/usr/bin/xmlwf
/usr/include
/usr/include/expat.h
/usr/include/expat_config.h
/usr/include/expat_external.h
/usr/lib
/usr/lib/debug
/usr/lib/debug/usr
/usr/lib/debug/usr/bin
/usr/lib/debug/usr/bin/xmlwf.debug
/usr/lib/debug/usr/lib
/usr/lib/debug/usr/lib/libexpat.so.1.6.10.debug
/usr/lib/debug/usr/lib/libexpatw.so.1.6.10.debug
/usr/lib/debug/usr/lib64
/usr/lib/debug/usr/lib64/libexpat.so.1.6.10.debug
/usr/lib/debug/usr/lib64/libexpatw.so.1.6.10.debug
/usr/lib/libexpat.so -> libexpat.so.1.6.10
/usr/lib/libexpat.so.1 -> libexpat.so.1.6.10
/usr/lib/libexpat.so.1.6.10
/usr/lib/libexpatw.so -> libexpatw.so.1.6.10
/usr/lib/libexpatw.so.1 -> libexpatw.so.1.6.10
/usr/lib/libexpatw.so.1.6.10
/usr/lib/pkgconfig
/usr/lib/pkgconfig/expat.pc
/usr/lib/pkgconfig/expatw.pc
/usr/lib64
/usr/lib64/libexpat.so -> libexpat.so.1.6.10
/usr/lib64/libexpat.so.1 -> libexpat.so.1.6.10
/usr/lib64/libexpat.so.1.6.10
/usr/lib64/libexpatw.so -> libexpatw.so.1.6.10
/usr/lib64/libexpatw.so.1 -> libexpatw.so.1.6.10
/usr/lib64/libexpatw.so.1.6.10
/usr/lib64/pkgconfig
/usr/lib64/pkgconfig/expat.pc
/usr/lib64/pkgconfig/expatw.pc
/usr/share
/usr/share/doc
/usr/share/doc/expat-2.2.8
/usr/share/doc/expat-2.2.8/AUTHORS.bz2
/usr/share/doc/expat-2.2.8/README.md.bz2
/usr/share/doc/expat-2.2.8/changelog.bz2
/usr/share/doc/expat-2.2.8/html
/usr/share/doc/expat-2.2.8/html/expat.png
/usr/share/doc/expat-2.2.8/html/reference.html
/usr/share/doc/expat-2.2.8/html/style.css
/usr/share/doc/expat-2.2.8/html/valid-xhtml10.png
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/xmlwf.1.bz2
Comment 3 Mario Kicherer 2020-01-07 15:06:50 UTC
I also re-emerged several packages again like gcc, pkgconfig and tried different cmake versions but it makes no difference.
Comment 4 Mario Kicherer 2020-01-07 21:37:04 UTC
If I execute the cmake command myself from within /var/tmp/portage with an additional -DCMAKE_LIBRARY_PATH=/usr/lib64 it finds the right libraries.

I'm not sure but it looks to me like cmake is using the paths the GCC outputs with "-v" to look for libraries, e.g. here:

LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../:/lib/:/usr/lib/

and it finds the wrong libraries in the last two paths. Maybe it does not like the "../lib64" indirection.
Comment 5 Alexander 2020-01-08 16:06:33 UTC
This is a multilib cmake bug. https://bugs.gentoo.org/644538#c15

It may include files from x64 folders when build x32 part and vice versa.
Comment 6 Andreas Sturmlechner gentoo-dev 2020-01-12 15:44:51 UTC
emerge -1 dev-libs/expat
Comment 7 Mario Kicherer 2020-01-15 17:54:05 UTC
@Alexander: thanks for the info!

@Andreas: I reemerged expat but the cmake problem persists. Do you need any logs?
Comment 8 Mario Kicherer 2020-01-21 08:42:42 UTC
Today, I also got this message:

>>> Installing (2 of 10) media-libs/harfbuzz-2.6.4::gentoo
 * checking 186 files for package collisions
 * Package 'media-libs/harfbuzz-2.6.4' has internal collisions between
 * non-identical files (located in separate directories in the
 * installation image (${D}) corresponding to merged directories in the
 * target filesystem (${ROOT})):
 * 
 *      /usr/lib64/cmake/harfbuzz/harfbuzz-config.cmake
 *              /usr/lib/cmake/harfbuzz/harfbuzz-config.cmake
 *              /usr/lib64/cmake/harfbuzz/harfbuzz-config.cmake
 *                      Differences: size, content
 * 
 * Package 'media-libs/harfbuzz-2.6.4' NOT merged due to internal
 * collisions between non-identical files. If necessary, refer to your
 * elog messages for the whole content of the above message
Comment 9 Mario Kicherer 2020-01-22 08:25:29 UTC
I also tried a --emptytree @system but it also fails during the build of a package which uses cmake.
Comment 10 Andreas Sturmlechner gentoo-dev 2020-07-22 15:25:15 UTC
Unfortunately I can only assume this is caused by a broken profile 17.0 to 17.1 migration.