Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919445 - dev-python/pypy3_10-7.3.13_p3 - [clang] ld.lld: error: .../crti.o is incompatible with elf32-i386
Summary: dev-python/pypy3_10-7.3.13_p3 - [clang] ld.lld: error: .../crti.o is incompat...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-08 09:53 UTC by Toralf Förster
Modified: 2024-04-14 15:14 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,18.17 KB, text/plain)
2023-12-08 09:53 UTC, Toralf Förster
Details
dev-python:pypy3_10-7.3.13_p3:20231208-092231.log (dev-python:pypy3_10-7.3.13_p3:20231208-092231.log,14.93 KB, text/plain)
2023-12-08 09:53 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,124.98 KB, text/plain)
2023-12-08 09:54 UTC, Toralf Förster
Details
environment (environment,104.76 KB, text/plain)
2023-12-08 09:54 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.14 KB, application/x-xz)
2023-12-08 09:54 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,22.60 KB, application/x-xz)
2023-12-08 09:54 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,4.57 KB, application/x-xz)
2023-12-08 09:54 UTC, Toralf Förster
Details
qlist-info.txt (qlist-info.txt,195.03 KB, text/plain)
2023-12-08 09:54 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-12-08 09:53:56 UTC
too long lines were shrinked:

gcc -pthread -shared -Wl,-Bsymbolic-functions -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int /var/tmp/portage/dev-python/pypy3_10-7.3.13_p3/work/pypy3.10-v7.3.13
/var/tmp/portage/dev-python/pypy3_10-7.3.13_p3/work/pypy3.10-v7.3.13-src/lib_pypy/_testmultiphase_build.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
  import imp
clang -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int -fPIC -fPIC -Wimplicit-function-declaration -I/var/tmp/portage/dev-python/pypy3_10-7.3.13_p3/work/pypy3.10-v7.3.13-src/include/pypy3.10 -c /var/tmp/portage/dev-python/pypy3_10-7.3.13_p3/wo
gcc -pthread -shared -Wl,-Bsymbolic-functions -Wl,-O1 -Wl,--as-needed -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -O2 -pipe -march=native -fno-diagnostics-color -Werror=implicit-function-declaration -Werror=implicit-int /var/tmp/portage/dev-python/pypy3_10-7.3.13_p3/work/pypy3.10-v7.3.13
using ncursesw from /usr
ld.lld: error: /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../lib64/crti.o is incompatible with elf32-i386
ld.lld: error: /usr/lib/llvm/17/bin/../../../../lib/clang/17/lib/linux/clang_rt.crtbegin-x86_64.o is incompatible with elf32-i386
ld.lld: error: ./_curses_cffi.o is incompatible with elf32-i386

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_systemd_clang_merged_usr-20231206-115013

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 17.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/17
17.0.6+libcxx
Python 3.11.7
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.73.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 17.0.8.1_p1 [openjdk-bin-17]
2)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
*)	Eclipse Temurin JDK 8.382_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm
  [2]   openjdk-bin-17 
  [3]   openjdk-bin-21 

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
go version go1.21.4 linux/amd64

  HEAD of ::gentoo
commit f2e66a7a4ef92663fa963592fc266a286b4b8669
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Fri Dec 8 08:16:57 2023 +0000

    2023-12-08 08:16:57 UTC

emerge -qpvO dev-python/pypy3_10
[ebuild  N    ] dev-python/pypy3_10-7.3.13_p3  USE="ensurepip gdbm jit ncurses -sqlite -tk"
Comment 1 Toralf Förster gentoo-dev 2023-12-08 09:53:57 UTC
Created attachment 878217 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-12-08 09:53:59 UTC
Created attachment 878218 [details]
dev-python:pypy3_10-7.3.13_p3:20231208-092231.log
Comment 3 Toralf Förster gentoo-dev 2023-12-08 09:54:00 UTC
Created attachment 878219 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2023-12-08 09:54:01 UTC
Created attachment 878220 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2023-12-08 09:54:02 UTC
Created attachment 878221 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-12-08 09:54:03 UTC
Created attachment 878222 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2023-12-08 09:54:04 UTC
Created attachment 878223 [details]
logs.tar.xz
Comment 8 Toralf Förster gentoo-dev 2023-12-08 09:54:06 UTC
Created attachment 878224 [details]
qlist-info.txt
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-12-08 12:15:32 UTC
Err, why does it try to build a 32-bit file?
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-08 12:21:57 UTC
i'm 99% sure it's injecting -L/usr/lib somewhere, which lld aborts on, unlike bfd (bfd just ignores the bad objects and then continues on the search path)
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-08 12:23:16 UTC
i think lib_pypy/_curses_build.py's find_curses_dir_and_nameis wrong
Comment 12 Agostino Sarubbo gentoo-dev 2024-01-29 09:52:45 UTC
I can reproduce the same issue with clang-lld, this is what I can see:

clang -O2 -march=x86-64 -pipe -pipe -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -fPIC -fPIC -Wimplicit-function-declaration -O0 -g3 -I/var/tmp/portage/dev-python/p
ypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/include/pypy3.10 -c /var/tmp/portage/dev-python/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/_ctypes_test.c -o /var/tmp/portage/dev-pyth
on/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/var/tmp/portage/dev-python/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/_ctypes_test.o                                     

gcc -pthread -shared -Wl,-Bsymbolic-functions -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--defsym=__gentoo_check_ldflags__=0 -fuse-ld=lld -O2 -march=x86-64 -p
ipe -pipe -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 /var/tmp/portage/dev-python/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/var/tmp/portage/dev-python/pyp
y3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/_ctypes_test.o -o /var/tmp/portage/dev-python/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/_ctypes_test.pypy310-pp73-x86_64-linux
-gnu.so                                                                                                                                                                                
/var/tmp/portage/dev-python/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/_testmultiphase_build.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib and 
slated for removal in Python 3.12; see the module's documentation for alternative uses                                                                                                 
  import imp                                                                                                                                                                           

clang -O2 -march=x86-64 -pipe -pipe -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 -fPIC -fPIC -Wimplicit-function-declaration -O0 -g3 -I/var/tmp/portage/dev-python/p
ypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/include/pypy3.10 -c /var/tmp/portage/dev-python/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/_testmultiphase.c -o /var/tmp/portage/dev-p
ython/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/var/tmp/portage/dev-python/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/_testmultiphase.o                               

gcc -pthread -shared -Wl,-Bsymbolic-functions -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,--defsym=__gentoo_check_ldflags__=0 -fuse-ld=lld -O2 -march=x86-64 -p
ipe -pipe -frecord-gcc-switches -fno-diagnostics-color -fmessage-length=0 /var/tmp/portage/dev-python/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/var/tmp/portage/dev-python/pyp
y3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/_testmultiphase.o -o /var/tmp/portage/dev-python/pypy3_10-7.3.15/work/pypy3.10-v7.3.15-src/lib_pypy/_testmultiphase.pypy310-pp73-x86_64
-linux-gnu.so


since I have CC=clang and CXX=clang++ the first strange thing is that gcc is used instead of clang. Can it be the cause of this issue?
Comment 13 Michael Orlitzky gentoo-dev 2024-04-14 15:14:44 UTC
We have a lot of similar reports:

 * Bug 929935
 * Bug 929257
 * Bug 930010
 * Bug 919346
 * Bug 919507
 * Bug 919716
 * Bug 919718
 * Bug 919724
 * Bug 929090

The first two are failing during a stock autoconf test. Something deeper (i.e. not related to any of these packages) is likely to blame, though it's interesting that ago is able to reproduce this.