Package: xpdf Version: 3.03-9 Severity: normal Tags: patch User: debian-...@lists.debian.org Usertags: ld-as-needed
Hello, xpdf 3.03-9 will FTBFS when trying to link with --as-needed. The problem is in debian/rules passing the libs to link with in LDFLAGS instead of LIBS (the correct variable for this). Attached is a patch which fixes it. This isn't a problem for Debian (yet), but as Ubuntu uses ld --as-needed already by default, xpdf FTBFS there: ,----[ https://launchpadlibrarian.net/104399108/buildlog_ubuntu-quantal-i386.xpdf_3.03-9_FAILEDTOBUILD.txt.gz ]- | g++ -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -lXm -lpoppler -lXt -lX11 -o build/xpdf.real build/*.o | build/xpdf.o: In function `main': | /build/buildd/xpdf-3.03/build/xpdf.cc:342: undefined reference to `Object::memCheck(_IO_FILE*)' | /build/buildd/xpdf-3.03/build/xpdf.cc:251: undefined reference to `GooString::GooString(char const*)' | /build/buildd/xpdf-3.03/build/xpdf.cc:302: undefined reference to `GooString::GooString(char const*)' | /build/buildd/xpdf-3.03/build/xpdf.cc:325: undefined reference to `GooString::~GooString()' `---- Regards, Michael
diff -Nru xpdf-3.03/debian/rules xpdf-3.03/debian/rules --- xpdf-3.03/debian/rules 2012-02-25 02:05:38.000000000 +0100 +++ xpdf-3.03/debian/rules 2012-05-06 19:55:56.000000000 +0200 @@ -4,7 +4,7 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all includes=$(strip $(shell pkg-config --cflags poppler)) -LDFLAGS+=-lXm $(shell pkg-config --libs poppler --libs xt --libs x11) +LIBS+=-lXm $(shell pkg-config --libs poppler --libs xt --libs x11) CPPFLAGS+=$(includes) $(includes)/goo $(includes)/splash -Wno-write-strings -DHAVE_DIRENT_H CPPFLAGS+=-Wno-format-extra-args -DSYSTEM_XPDFRC=\"/etc/xpdf/xpdfrc\" @@ -28,7 +28,7 @@ mv build/parseargs.c build/parseargs.cc override_dh_auto_build: $(objects) - $(CXX) $(LDFLAGS) -o build/xpdf.real build/*.o + $(CXX) $(LDFLAGS) -o build/xpdf.real build/*.o $(LIBS) %: dh ${@}