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

Bug#1110409: radlib FTCBFS: multiple reasons



Package: radlib
Version: 2.12.0-7
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
X-Debbugs-Cc: debian-cross@lists.debian.org

Dear Maintainer,

radlib fails to cross-build because:

1. in d/rules, it uses ./configure command. This causes
the compiler to be passed as gcc instead of the (triplet prefixed) cross-compiler.

Additionally, it also sets some options for --build and --host but these were never
passed to configure.

2. The Makefile.* files have un-necessary invocations to compile and link against
crt1.o, crtn.o etc -- the cross compiler should already take care of this.

Please consider to review/apply attached patch.

Thanks
Nilesh
diff -Nru radlib-2.12.0/debian/changelog radlib-2.12.0/debian/changelog
--- radlib-2.12.0/debian/changelog	2024-03-16 04:42:00.000000000 +0530
+++ radlib-2.12.0/debian/changelog	2025-08-05 01:51:21.000000000 +0530
@@ -1,3 +1,10 @@
+radlib (2.12.0-7.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fixup cross-builds (Closes: #-1)
+
+ -- Nilesh Patra <nilesh@debian.org>  Tue, 05 Aug 2025 01:51:21 +0530
+
 radlib (2.12.0-7) unstable; urgency=medium
 
   * debian/control: bump standard to 4.6.2 (no changes)
diff -Nru radlib-2.12.0/debian/patches/cross.patch radlib-2.12.0/debian/patches/cross.patch
--- radlib-2.12.0/debian/patches/cross.patch	1970-01-01 05:30:00.000000000 +0530
+++ radlib-2.12.0/debian/patches/cross.patch	2025-08-05 01:50:44.000000000 +0530
@@ -0,0 +1,40 @@
+--- a/debug/Makefile.am
++++ b/debug/Makefile.am
+@@ -38,7 +38,3 @@
+ INCLUDES         += -I$(prefix)/pgsql/include
+ endif
+ endif
+-
+-if CROSSCOMPILE
+-raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
+-endif
+--- a/debug/Makefile.in
++++ b/debug/Makefile.in
+@@ -43,7 +43,6 @@
+ @MYSQL_TRUE@am__append_4 = -L$(prefix)/lib64/mysql -L$(prefix)/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql
+ @MYSQL_FALSE@@PGRESQL_TRUE@am__append_5 = -L$(prefix)/pgsql/lib
+ @MYSQL_FALSE@@PGRESQL_TRUE@am__append_6 = -I$(prefix)/pgsql/include
+-@CROSSCOMPILE_TRUE@am__append_7 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
+ subdir = debug
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+--- a/msgRouter/Makefile.am
++++ b/msgRouter/Makefile.am
+@@ -38,7 +38,3 @@
+ INCLUDES           += -I$(prefix)/pgsql/include
+ endif
+ endif
+-
+-if CROSSCOMPILE
+-radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
+-endif
+--- a/msgRouter/Makefile.in
++++ b/msgRouter/Makefile.in
+@@ -43,7 +43,6 @@
+ @MYSQL_TRUE@am__append_4 = -L$(prefix)/lib64/mysql -L$(prefix)/lib/mysql -L/usr/lib64/mysql -L/usr/lib/mysql
+ @MYSQL_FALSE@@PGRESQL_TRUE@am__append_5 = -L$(prefix)/lib -L$(prefix)/pgsql/lib
+ @MYSQL_FALSE@@PGRESQL_TRUE@am__append_6 = -I$(prefix)/pgsql/include
+-@CROSSCOMPILE_TRUE@am__append_7 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o $(prefix)/lib/crtn.o
+ subdir = msgRouter
+ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
diff -Nru radlib-2.12.0/debian/patches/series radlib-2.12.0/debian/patches/series
--- radlib-2.12.0/debian/patches/series	2024-03-16 04:42:00.000000000 +0530
+++ radlib-2.12.0/debian/patches/series	2025-08-05 01:49:50.000000000 +0530
@@ -1,3 +1,4 @@
 compile-errors.patch
 umask.patch
 implicit.patch
+cross.patch
diff -Nru radlib-2.12.0/debian/rules radlib-2.12.0/debian/rules
--- radlib-2.12.0/debian/rules	2024-03-16 04:42:00.000000000 +0530
+++ radlib-2.12.0/debian/rules	2025-08-05 01:51:21.000000000 +0530
@@ -2,6 +2,7 @@
 
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
+include /usr/share/dpkg/buildtools.mk
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
@@ -21,5 +22,8 @@
 		--mandir=\$${prefix}/share/man \
 		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
 		--infodir=\$${prefix}/share/info \
+		CC="$(CC)" \
+		CXX="$(CXX)" \
 		CFLAGS="$(CFLAGS)" \
+		$(CROSS) \
 		LDFLAGS="-Wl,-z,defs -Wl,-z,now -L\$${prefix}/lib -lsqlite3 -lpthread"

Reply to: