Source: odb-api
Version: 0.18.1-7
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)

Dear Maintainer,

odb-api fails to build when multpile python3 versions are supported, as
is the case in Ubuntu Focal currently, like this:

for f in `py3versions --supported | sed -e 's%python3.7%%'  ` ; do \
        /usr/bin/make -C /<<PKGBUILDDIR>>/debian/build/$f 
DESTDIR=/<<PKGBUILDDIR>>/debian/tmp ; \
        done
make[2]: Entering directory '/<<PKGBUILDDIR>>'
make[2]: *** /<<PKGBUILDDIR>>/debian/build/python3.8: No such file or 
directory.  Stop.
make[2]: Leaving directory '/<<PKGBUILDDIR>>'

(full log here:
https://launchpadlibrarian.net/447773633/buildlog_ubuntu-focal-amd64.odb-api_0.18.1-7build1_BUILDING.txt.gz)

It seems to me that the code that runs to configure the package for
other python versions is just wrong: it uses $$d in the argument to
--builddirectory which is not defined anywhere, it passed
--builddirectory to dh_auto_configure after "--" (so it is passed to the
upstream configure script, not dh) and it sets the build directory to be
a subdirectory of the "default" build directory. I don't know if this
last point is an actual problem (although it does smell funny to me),
but this patch fixes this anyway, as well as the other two problems.

Cheers,
mwh
-- System Information:
Debian Release: buster/sid
  APT prefers eoan
  APT policy: (500, 'eoan'), (400, 'eoan-proposed')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.0-18-generic (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru odb-api-0.18.1/debian/rules odb-api-0.18.1/debian/rules
--- odb-api-0.18.1/debian/rules 2019-09-02 04:48:13.000000000 +1200
+++ odb-api-0.18.1/debian/rules 2019-10-21 14:17:49.000000000 +1300
@@ -55,14 +55,14 @@
        done
        dh_auto_configure --  ${CMAKE_CFLAGS} 
-DPYTHON_EXECUTABLE=/usr/bin/${PY3DEFAULT}
        for f in ${PY3OTHERS} ; do \
-               dh_auto_configure --  ${CMAKE_CFLAGS} 
-DPYTHON_EXECUTABLE=/usr/bin/$$f \
-                        --builddirectory=$(BUILDDIR)/$$d ; \
+               dh_auto_configure --builddirectory=$(BUILDDIR)-$$f \
+                         -- ${CMAKE_CFLAGS} -DPYTHON_EXECUTABLE=/usr/bin/$$f; \
                done
 
 override_dh_auto_build:
        $(MAKE) -C $(BUILDDIR) DESTDIR=$(DESTDIR)
        for f in ${PY3OTHERS} ; do \
-               $(MAKE) -C $(BUILDDIR)/$$f DESTDIR=$(DESTDIR) ; \
+               $(MAKE) -C $(BUILDDIR)-$$f DESTDIR=$(DESTDIR) ; \
                done
 
 override_dh_auto_test:

Reply via email to