NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/60394: LD_PRELOAD for compat ld.elf_so-XXX
>Number: 60394
>Category: bin
>Synopsis: LD_PRELOAD for compat ld.elf_so-XXX
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 02 18:35:00 +0000 2026
>Originator: Taylor R Campbell
>Release: current, 11, 10, 9, ...
>Organization:
The NetKver Foundation
>Environment:
>Description:
Tried building gcc15 with libkver.so to force a particular
uname (so I can use the same machine to build packages for 9,
10, and 11), and it failed with:
configure:3748: checking whether we are cross compiling
configure:3756: /tmp/pkgbuild/lang/gcc15/work/build/./gcc/xgcc -B/tmp/pkgbuild/lang/gcc15/work/build/./gcc/ -B/pkg/2026Q2/gcc15/x86_64--netbsd/bin/ -B/pkg/2026Q2/gcc15/x86_64--netbsd/lib/../lib/i386 -B/pkg/2026Q2/gcc15/x86_64--netbsd/lib/ -isystem /pkg/2026Q2/gcc15/x86_64--netbsd/include -isystem /pkg/2026Q2/gcc15/x86_64--netbsd/sys-include -fno-checking -m32 -o conftest -g -O2 -I/usr/include -Wl,-R/pkg/2026Q2/lib -Wl,-zrelro conftest.c >&5
configure:3760: $? = 0
configure:3767: ./conftest
/pbulk/pkg/lib/libkver.so: invalid ELF class 2; expected 1
configure:3771: $? = 1
configure:3778: error: in `/tmp/pkgbuild/lang/gcc15/work/build/x86_64--netbsd/32/libgcc':
configure:3782: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Trouble is that libkver.so is an amd64 elf file, and that can't
be preloaded with LD_PRELOAD when running a -m32 executable.
>How-To-Repeat:
try to use libkver.so with a compat32 executable
>Fix:
Add LD_PRELOAD_<ABI> or something?
(Convince the world to look at /etc/release instead of uname to
find the OS version?)
Home |
Main Index |
Thread Index |
Old Index