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

Bug#971678: ghostscript: FTBFS: ERROR: cidfmap not virtually empty as expected



On Mon, 05 Oct 2020 at 10:56:17 +0100, Simon McVittie wrote:
> Control: retitle 971678 ghostscript: FTBFS when not building Arch:all: debian/libgs9-common/usr/share/ghostscript/9.53.3/Resource/Init/cidfmap: No such file or directory
> 
> On Sun, 04 Oct 2020 at 22:55:24 +0200, Sebastian Ramacher wrote:
> > ghostscript currently FTBFS on the buildds:
> > | grep: debian/libgs9-common/usr/share/ghostscript/9.53.3/Resource/Init/cidfmap: No such file or directory
> > | rm: cannot remove 'debian/libgs9-common/usr/share/ghostscript/9.53.3/Resource/Init/cidfmap': No such file or directory
> 
> I think this is the real problem. Testing a patch now.

See attached.

However, when testing that, I get a different (unrelated?) FTBFS when
*only* building the Architecture: all package (i.e. with -A):

----8<----
make -f Makefile DISPLAY_DEV=./soobj/display.dev BUILDDIRPREFIX=so GENOPT='' LDFLAGS='-Wl,-z,relro  '\
 CFLAGS='-fPIC   -O2 -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2  -Wall -Wstrict-prototypes -Wundef -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -fno-strict-aliasing -Werror=declaration-after-statement -fno-builtin -fno-common -Werror=return-type -DHAVE_STDINT_H=1 -DHAVE_DIRENT_H=1 -DHAVE_SYS_DIR_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_LIBDL=1 -DGX_COLOR_INDEX_TYPE="unsigned long long" -D__USE_UNIX98=1  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DHAVE_RESTRICT=1 -DUSE_LIBPAPER -I/usr/include/x86_64-linux-gnu  -fno-strict-aliasing -DHAVE_POPEN_PROTO=1 -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/lib/x86_64-linux-gnu/ghostscript/9.53.3\" ' prefix=/usr\
 ./sobin/gsc ./sobin/gsx -so-loader -so-loader -so-loader
make[4]: Entering directory '/<<PKGBUILDDIR>>'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[4]: *** [base/unix-dll.mak:174: sobin/gsc] Error 1
make[4]: *** Waiting for unfinished jobs....
make[4]: Leaving directory '/<<PKGBUILDDIR>>'
make[3]: *** [base/unix-dll.mak:294: so-subtarget] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>'
make[2]: *** [base/unix-dll.mak:243: so] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j2 so SHARE_JPEG=1 SHARE_LIBPNG=1 SHARE_LIBTIFF=1 SHARE_ZLIB=1 SHARE_JBIG2=1 SHARE_IJS=1 SHARE_EXPAT=1 WHICH_CMS=lcms2 SHARE_LCMS=1 LCMS2DIR=/usr SHARE_JPX=1 SHARE_FT=1 SHARE_LCUPS=1 SHARE_LCUPSI=1 returned exit code 2
make[1]: *** [debian/rules:78: override_dh_auto_build] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:165: binary-indep] Error 2
----8<----

So this presumably can't be a complete solution. I don't know why my patch
would make this happen; perhaps it's coincidence.

Again, I'd recommend testing the -A and -B build modes before uploading.

    smcv
>From 199e129841d1da4a6a7a41cc46fcc50bd8a96c79 Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Mon, 5 Oct 2020 10:57:03 +0100
Subject: [PATCH] Don't check/remove cidfmap when not building libgs9-common

This fixes FTBFS when libgs9-common is not built, in particular on the
official Debian buildd for each architecture.

Closes: #971678
---
 debian/rules | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/debian/rules b/debian/rules
index f02e98dd..e33927c5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,8 @@ pkg-lib = $(libname)$(GS_VERSION_MAJOR)
 pkg-dev = $(libname)-dev
 pkg-data = $(libname)$(GS_VERSION_MAJOR)-common
 
+binaries := $(shell dh_listpackages)
+
 # use upstream bootstrapping script
 override_dh_autoreconf:
 	dh_autoreconf ./autogen.sh
@@ -132,6 +134,7 @@ override_dh_install:
 
 	dh_link --package=$(pkg-data) -- $(DEB_DH_LINK_$(pkg-data))
 	dh_link --no-package=$(pkg-data)
+ifneq ($(filter $(pkg-data),$(binaries)),)
 	file='debian/$(pkg-data)/usr/share/ghostscript/$(GS_DOT_VERSION)/Resource/Init/cidfmap'; \
 	  ! egrep -v '^(%([^%].*)?)?$$' "$$file" && rm "$$file" || ( \
 		echo; \
@@ -146,6 +149,7 @@ override_dh_install:
 		usr/share/ghostscript/$(GS_DOT_VERSION)/Resource/Font
 	rename 's/\.t1$$//' \
 		debian/$(pkg-data)/usr/share/ghostscript/$(GS_DOT_VERSION)/Resource/Font/*
+endif
 
 # check that tracked issues are solved
 override_dh_auto_test:
-- 
2.28.0


Reply to: