[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1017865: faketime: FTBFS on hurd-i386 with glibc 2.34



Package: faketime
Version: 0.9.10-2.1
Severity: important
Tags: patch upstream

Hello,

With glibc 2.34, faketime now fails to build from source, because it
fails passing -lpthread to the linker:

cc -o libfaketime.so.1 -Wl,-soname,libfaketime.so.1 -Wl,-z,relro -Wl,-z,now  -lpthread -Wl,--version-script=libfaketime.map -shared libfaketime.o -ldl -lm -lrt

since -lpthread is passed before libfaketime.o, libpthread is not
actually getting pulled in. It happens that things used to be working
before glibc 2.34 because librt.so depends on libpthread, and thus -lrt
would pull libpthread. But in version 2.34, librt.so doesn't do so any
more, so the lucky-pull is no more.

The attached patch fixes this by passing -lpthread along the other -l,
as it should anyway.

Samuel

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-security'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'proposed-updates'), (500, 'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, arm64

Kernel: Linux 5.19.0 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages faketime depends on:
ii  libc6        2.34-3
ii  libfaketime  0.9.10-2.1

faketime recommends no packages.

faketime suggests no packages.

-- no debconf information

-- 
Samuel
---
Pour une évaluation indépendante, transparente et rigoureuse !
Je soutiens la Commission d'Évaluation de l'Inria.
Index: faketime-0.9.10/src/Makefile
===================================================================
--- faketime-0.9.10.orig/src/Makefile
+++ faketime-0.9.10/src/Makefile
@@ -117,13 +117,13 @@ endif
 
 LIB_LDFLAGS += -shared
 
-LDFLAGS += $(FAKETIME_LINK_FLAGS) -lpthread
+LDFLAGS += $(FAKETIME_LINK_FLAGS)
 ifneq ($(PLATFORM),SunOS)
 LDFLAGS += -Wl,--version-script=libfaketime.map
 endif
 
-LDADD += -ldl -lm -lrt
-BIN_LDFLAGS += -lrt
+LDADD += -ldl -lm -lrt -lpthread
+BIN_LDFLAGS += -lrt -lpthread
 
 SRC = libfaketime.c
 LIBS_OBJ = libfaketime.o libfaketimeMT.o

Reply to: