qemu --static user build fails with fedora rawhide glibc-2.30.9000
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Building qemu latest git 654efcb511d on fedora rawhide fails with this configure line:
./configure \
--static \
--disable-system \
--enable-
--disable-werror \
--disable-tools \
--disable-capstone
make fails with:
/usr/bin/ld: linux-user/
/root/qemu.
collect2: error: ld returned 1 exit status
Seems related to this glibc change: https:/
...
+* The obsolete function stime is no longer available to newly linked
+ binaries and it has been removed from <time.h> header. This function
+ has been deprecated in favor of clock_settime.
+
# rpm -q glibc
glibc-2.
FWIW there's some other messages but I don't think they are fatal:
/usr/bin/ld: /usr/lib/
(.text+0x267): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0xe0): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: (.text+0x11e): warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
Also, --disable-capstone is required to avoid this error, but it is pre-existing, not sure if it's a bug, if so I can file a separate one:
LINK aarch64-
/usr/bin/ld: cannot find -lcapstone
collect2: error: ld returned 1 exit status
Changed in qemu: | |
status: | Fix Committed → Fix Released |
We use stime() to implement the target stime syscall. We should probably switch to using clock_settime( CLOCK_REALTIME, ...) instead, as that's what glibc uses internally now to implement its stime():
https:/ /sourceware. org/git/ ?p=glibc. git;a=blob; f=time/ stime.c; h=6ea3b6dcc1a39 3b57b69ca24fbfe 8023d9095837; hb=12cbde1dae6f a4a9a792b64564c 7e0debf7544cc