Your message dated Fri, 19 Oct 2018 07:51:29 +0000
with message-id <[email protected]>
and subject line Bug#911358: fixed in libre 0.5.9-2
has caused the Debian Bug report #911358,
regarding libre hard codes location of C headers
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
911358: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911358
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libre
Version: 0.5.9-1
Tags: patch upstream
Control: block 798955 by -1

libre checks for header existence by searching them in a few filesystem
locations. Debian's /usr/include/<triplet> is not always among those
locations and that makes libre fail to build when built against a
non-glibc or a glibc with multiarch headers (#798955). The attached
multiarch-libc.patch replaces those file existence tests with compile
tests. The compiler knows much better whether headers exists.

Once doing this, you notice that the SYSROOT variable is unused and you
can as well remove it (remove-sysroot.patch). Once removing SYSROOT, you
notice that MACHINE is mostly unused: The only use is setting up
CROSS_COMPILE and OS, but these are supposed to be set by a user for
cross compilation. Removing this code makes win32 behave just like any
other arch and MACHINE can go in the bucket as well
(remove-machine.patch). This simplification is entirely optional of
course.

Please consider applying at least multiarch-libc.patch and close this
bug when doing so.

Helmut
--- libre-0.5.9.orig/mk/re.mk
+++ libre-0.5.9/mk/re.mk
@@ -449,22 +449,19 @@
 # External libraries section
 #
 
-USE_OPENSSL := $(shell [ -f $(SYSROOT)/include/openssl/ssl.h ] || \
-	[ -f $(SYSROOT)/local/include/openssl/ssl.h ] || \
-	[ -f $(SYSROOT_ALT)/include/openssl/ssl.h ] && echo "yes")
+USE_OPENSSL := $(shell echo '\#include <openssl/ssl.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "yes")
 
 ifneq ($(USE_OPENSSL),)
 CFLAGS  += -DUSE_OPENSSL -DUSE_TLS
 LIBS    += -lssl -lcrypto
 USE_TLS := yes
 
-USE_OPENSSL_DTLS := $(shell [ -f $(SYSROOT)/include/openssl/dtls1.h ] || \
-	[ -f $(SYSROOT)/local/include/openssl/dtls1.h ] || \
-	[ -f $(SYSROOT_ALT)/include/openssl/dtls1.h ] && echo "yes")
+USE_OPENSSL_DTLS := $(shell echo '\#include <openssl/dtls1.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "yes")
 
-USE_OPENSSL_SRTP := $(shell [ -f $(SYSROOT)/include/openssl/srtp.h ] || \
-	[ -f $(SYSROOT)/local/include/openssl/srtp.h ] || \
-	[ -f $(SYSROOT_ALT)/include/openssl/srtp.h ] && echo "yes")
+USE_OPENSSL_SRTP := $(shell echo '\#include <openssl/srtp.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "yes")
 
 ifneq ($(USE_OPENSSL_DTLS),)
 CFLAGS  += -DUSE_OPENSSL_DTLS -DUSE_DTLS
@@ -482,9 +479,8 @@
 endif
 
 
-USE_ZLIB    := $(shell [ -f $(SYSROOT)/include/zlib.h ] || \
-	[ -f $(SYSROOT)/local/include/zlib.h ] || \
-	[ -f $(SYSROOT_ALT)/include/zlib.h ] && echo "yes")
+USE_ZLIB    := $(shell echo '\#include <zlib.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "yes")
 
 ifneq ($(USE_ZLIB),)
 CFLAGS  += -DUSE_ZLIB
@@ -494,7 +490,8 @@
 
 ifneq ($(OS),win32)
 
-HAVE_PTHREAD    := $(shell [ -f $(SYSROOT)/include/pthread.h ] && echo "1")
+HAVE_PTHREAD    := $(shell echo '\#include <pthread.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "1")
 ifneq ($(HAVE_PTHREAD),)
 HAVE_PTHREAD_RWLOCK := 1
 CFLAGS  += -DHAVE_PTHREAD
@@ -505,7 +502,8 @@
 endif
 
 ifneq ($(ARCH),mipsel)
-HAVE_GETIFADDRS := $(shell [ -f $(SYSROOT)/include/ifaddrs.h ] && echo "1")
+HAVE_GETIFADDRS := $(shell echo '\#include <ifaddrs.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "1")
 ifneq ($(HAVE_GETIFADDRS),)
 CFLAGS  += -DHAVE_GETIFADDRS
 endif
@@ -518,22 +516,24 @@
 
 endif
 
-HAVE_GETOPT     := $(shell [ -f $(SYSROOT)/include/getopt.h ] && echo "1")
+HAVE_GETOPT     := $(shell echo '\#include <getopt.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "1")
 ifneq ($(HAVE_GETOPT),)
 CFLAGS  += -DHAVE_GETOPT
 endif
-HAVE_INTTYPES_H := $(shell [ -f $(SYSROOT)/include/inttypes.h ] && echo "1")
+HAVE_INTTYPES_H := $(shell echo '\#include <inttypes.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "1")
 ifneq ($(HAVE_INTTYPES_H),)
 CFLAGS  += -DHAVE_INTTYPES_H
 endif
-HAVE_NET_ROUTE_H := $(shell [ -f $(SYSROOT)/include/net/route.h ] && echo "1")
+HAVE_NET_ROUTE_H := $(shell echo '\#include <net/route.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "1")
 ifneq ($(HAVE_NET_ROUTE_H),)
 CFLAGS  += -DHAVE_NET_ROUTE_H
 endif
 HAVE_SYS_SYSCTL_H := \
-	$(shell [ -f $(SYSROOT)/include/sys/sysctl.h ] || \
-		[ -f $(SYSROOT)/include/$(MACHINE)/sys/sysctl.h ] \
-		&& echo "1")
+	$(shell echo '\#include <sys/sysctl.h>' | \
+		$(CC) -E - >/dev/null 2>&1 && echo "1")
 ifneq ($(HAVE_SYS_SYSCTL_H),)
 CFLAGS  += -DHAVE_SYS_SYSCTL_H
 endif
@@ -549,15 +549,17 @@
 CFLAGS  += -DHAVE_SELECT
 CFLAGS  += -DHAVE_IO_H
 else
-HAVE_SYSLOG  := $(shell [ -f $(SYSROOT)/include/syslog.h ] && echo "1")
-HAVE_DLFCN_H := $(shell [ -f $(SYSROOT)/include/dlfcn.h ] && echo "1")
+HAVE_SYSLOG  := $(shell echo '\#include <syslog.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "1")
+HAVE_DLFCN_H := $(shell echo '\#include <dlfcn.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "1")
 ifneq ($(OS),darwin)
-HAVE_EPOLL   := $(shell [ -f $(SYSROOT)/include/sys/epoll.h ] || \
-			[ -f $(SYSROOT)/include/$(MACHINE)/sys/epoll.h ] \
-			&& echo "1")
+HAVE_EPOLL   := $(shell echo '\#include <sys/epoll.h>' | \
+			$(CC) -E - >/dev/null 2>&1 && echo "1")
 endif
 
-HAVE_RESOLV := $(shell [ -f $(SYSROOT)/include/resolv.h ] && echo "1")
+HAVE_RESOLV := $(shell echo '\#include <resolv.h>' | \
+	$(CC) -E - >/dev/null 2>&1 && echo "1")
 
 ifneq ($(HAVE_RESOLV),)
 CFLAGS  += -DHAVE_RESOLV
--- libre-0.5.9.orig/mk/re.mk
+++ libre-0.5.9/mk/re.mk
@@ -16,7 +16,6 @@
 #   OPT_SPEED      If non-empty, optimize for speed
 #   PROJECT        Project name
 #   RELEASE        Release build
-#   SYSROOT        System root of library and include files
 #   SYSROOT_ALT    Alternative system root of library and include files
 #   USE_OPENSSL    If non-empty, link to libssl library
 #   USE_ZLIB       If non-empty, link to libz library
@@ -47,11 +46,6 @@
 endif
 
 
-# Default system root
-ifeq ($(SYSROOT),)
-SYSROOT := /usr
-endif
-
 # Alternative Systemroot
 ifeq ($(SYSROOT_ALT),)
 SYSROOT_ALT := $(shell [ -d /sw/include ] && echo "/sw")
@@ -337,7 +331,6 @@
 	LIB_SUFFIX	:= .dll
 	MOD_SUFFIX	:= .dll
 	BIN_SUFFIX	:= .exe
-	SYSROOT		:= /usr/$(MACHINE)/
 endif
 
 CFLAGS	+= -DOS=\"$(OS)\"
@@ -687,7 +680,6 @@
 	@echo "  GCOV:          $(GCOV)"
 	@echo "  GPROF:         $(GPROF)"
 	@echo "  CROSS_COMPILE: $(CROSS_COMPILE)"
-	@echo "  SYSROOT:       $(SYSROOT)"
 	@echo "  SYSROOT_ALT:   $(SYSROOT_ALT)"
 	@echo "  LIB_SUFFIX:    $(LIB_SUFFIX)"
 	@echo "  MOD_SUFFIX:    $(MOD_SUFFIX)"
--- libre-0.5.9.orig/mk/re.mk
+++ libre-0.5.9/mk/re.mk
@@ -191,23 +191,10 @@
 # OS section
 #
 
-MACHINE   := $(shell $(CC) --print-multiarch)
-
 ifeq ($(CROSS_COMPILE),)
 OS        := $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
 endif
 
-
-ifneq ($(strip $(filter i386-mingw32 i486-mingw32 i586-mingw32msvc \
-	i686-w64-mingw32 x86_64-w64-mingw32 mingw32, \
-	$(MACHINE))),)
-	OS   := win32
-ifeq ($(MACHINE), mingw32)
-	CROSS_COMPILE :=
-endif
-endif
-
-
 # default
 LIB_SUFFIX	:= .so
 MOD_SUFFIX	:= .so
@@ -326,7 +313,6 @@
 	APP_LFLAGS	+= -Wl,--export-all-symbols
 	AR		:= ar
 	AFLAGS		:= cru
-	CROSS_COMPILE	?= $(MACHINE)-
 	RANLIB		:= $(CROSS_COMPILE)ranlib
 	LIB_SUFFIX	:= .dll
 	MOD_SUFFIX	:= .dll
@@ -654,7 +640,6 @@
 	@echo "info - $(PROJECT) version $(VERSION)"
 	@echo "  MODULES:       $(MODULES)"
 #	@echo "  SRCS:          $(SRCS)"
-	@echo "  MACHINE:       $(MACHINE)"
 	@echo "  ARCH:          $(ARCH)"
 	@echo "  OS:            $(OS)"
 	@echo "  BUILD:         $(BUILD)"

--- End Message ---
--- Begin Message ---
Source: libre
Source-Version: 0.5.9-2

We believe that the bug you reported is fixed in the latest version of
libre, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonas Smedegaard <[email protected]> (supplier of updated libre package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 19 Oct 2018 09:36:31 +0200
Source: libre
Binary: libre0 libre-dev
Architecture: source
Version: 0.5.9-2
Distribution: unstable
Urgency: medium
Maintainer: Debian VoIP Team <[email protected]>
Changed-By: Jonas Smedegaard <[email protected]>
Description:
 libre-dev  - Generic library for real-time communications (development files)
 libre0     - Generic library for real-time communications with async IO suppor
Closes: 911358
Changes:
 libre (0.5.9-2) unstable; urgency=medium
 .
   * Update patches:
     + Add patches 1001 1002 1003 to properly do multiarch and no sysroot
       (replacing patch 0001).
       Closes: Bug#911358. Thanks to Helmut Grohne.
     + Document patch numbering micro-policy in source.
Checksums-Sha1:
 204c17530fcc9c277daf79561a61104ce46ba7f8 2028 libre_0.5.9-2.dsc
 bda277f99e9269f62d78c8b804816b658f7063b2 14188 libre_0.5.9-2.debian.tar.xz
 3b905ba60bd797daac957336836b0b94ec34c6d7 6310 libre_0.5.9-2_amd64.buildinfo
Checksums-Sha256:
 b777150297723145feff328aa21e59e0390e120991ed2cbc91116ae4fc4f474d 2028 
libre_0.5.9-2.dsc
 3fde33e3f28262f08984fc8fee4fdaad6bf3940b9e18ab83fabd99c95ba1df1d 14188 
libre_0.5.9-2.debian.tar.xz
 5154b673846e9ea90be4cfe9450e7ed81c4555423d9ea5f48b841cc0d53e6db0 6310 
libre_0.5.9-2_amd64.buildinfo
Files:
 5ec330c7e77de79076cbb71f37f128b7 2028 comm optional libre_0.5.9-2.dsc
 308dce3ca88ba14a6cc5fc1356985717 14188 comm optional 
libre_0.5.9-2.debian.tar.xz
 a453cee8c238e290cf1f8e7f23707996 6310 comm optional 
libre_0.5.9-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAlvJihcACgkQLHwxRsGg
ASE+bA/+KQQDenBr//aaKmTw0v8/H5Bvfq74uNioKDwzwdoxS5PnYOsszzTXbyKn
eVEVixy/QX+WoDMiuHDA9Sd/DsRVVZJkcSO2cBgVQ/a8lHbsjLSg16mnqKp/MKLB
H9Z7DDwMkabiIvC1rpJ8oCQaSDDHu9X5TwjmBnAZdf4pkxaXoEzF6+iUeJaahb9X
FqZi5/flRSkgCvmeXzjgvLdnINurFfup1oL/F0S0upMl8qENStcLP43fSbL3C1jF
BAk3IZlECIEhON4LlA9KTshSydcmiFF2DYBYEJHhqlkjmxfbOHq4U1zaOkR0aNOs
pT/NL4+N4nnrLbrwEElZdl0CxsJmXO+2XaT1XgFr0iLXwb28yvp3cXReD5xCuXIH
6ZJCa8KzWvh3lKAFulIJ+yJxMYCh2rRGElab2XVaaJ/Wo6DXLcR0uRaS3Y389uzM
YOhBOD1XV6jzD/AszuqSF/qKnnQ5fpdTEaeJKNr9oJIiSAd454FNwRAwgvnbO7D6
wbgLskiYV4SlN+5mL1C9rGydlpxzfLCKNrHZveMa+km5EwLlN63FTuvoJ/iZ2NtQ
bbQyZEan/ZXkTpq7rOHtebFovyXNG+08qggGgUSjk5WElEYoE3ulGZrBNbBUBBN+
flZvt/hQmsTHFysPtVElHe7LoNwbjLziTk/o90hEWvQ2fujjPRM=
=zzSm
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to