[Debian GNUstep maintainers] Bug#633544: grr.app: FTBFS with ld that defaults to --as-needed: undefined reference to `__objc_class_name_RSSArticle'

Colin Watson cjwatson at ubuntu.com
Mon Jul 11 12:58:38 UTC 2011


Package: grr.app
Version: 0.6.2.dfsg-5
Severity: important
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch oneiric

I noticed that somebody had synced the base GNUstep packages from
experimental into Ubuntu oneiric, so I started work on rebuilding all
the application packages against that new version so that we can drop
the older library versions.  grr.app failed to build as follows:

  https://launchpadlibrarian.net/74974288/buildlog_ubuntu-oneiric-i386.grr.app_0.6.2.dfsg-5build2_FAILEDTOBUILD.txt.gz

  gcc  -rdynamic -lRSSKit      -Wl,-z,defs -Wl,--as-needed -Wl,-rpath,/usr/lib/grr.app -LRSSKit/obj -LlibRSSKit.obj -shared-libgcc -fexceptions -fgnu-runtime -o Grr.app/./Grr \
          ./obj/Grr.obj/AppController.m.o ./obj/Grr.obj/MainController.m.o ./obj/Grr.obj/MainTableDelegate.m.o ./obj/Grr.obj/FeedList.m.o ./obj/Grr.obj/FeedTableDelegate.m.o ./obj/Grr.obj/ArticleViewing.m.o ./obj/Grr.obj/FeedSelection.m.o ./obj/Grr.obj/FeedManagement.m.o ./obj/Grr.obj/FetchingProgressManager.m.o ./obj/Grr.obj/ErrorLogController.m.o ./obj/Grr.obj/OpenURL.m.o ./obj/Grr.obj/PreferencesController.m.o ./obj/Grr.obj/RSSDropZone.m.o ./obj/Grr.obj/FilterManager.m.o ./obj/Grr.obj/RSSReaderFeed.m.o ./obj/Grr.obj/RSSReaderArticle.m.o ./obj/Grr.obj/RSSReaderService.m.o ./obj/Grr.obj/FeedPreferencesManager.m.o ./obj/Grr.obj/main.m.o       -L/usr/local/lib -L/usr/lib     -lgnustep-gui    -lgnustep-base   -lpthread -lobjc   -lm
  ./obj/Grr.obj/MainController.m.o:(.data.rel+0x10): undefined reference to `__objc_class_name_RSSArticle'
  ./obj/Grr.obj/ArticleViewing.m.o:(.data.rel+0x0): undefined reference to `__objc_class_name_RSSArticle'
  ./obj/Grr.obj/FeedSelection.m.o:(.data.rel+0x0): undefined reference to `__objc_class_name_RSSFeed'
  ./obj/Grr.obj/FeedManagement.m.o:(.data.rel+0x14): undefined reference to `__objc_class_name_RSSFeed'
  ./obj/Grr.obj/FilterManager.m.o:(.data.rel+0x4): undefined reference to `__objc_class_name_RSSFeed'
  ./obj/Grr.obj/RSSReaderFeed.m.o:(.data.rel+0x4): undefined reference to `__objc_class_name_RSSFeed'
  ./obj/Grr.obj/RSSReaderArticle.m.o:(.data.rel+0x4): undefined reference to `__objc_class_name_RSSArticle'
  ./obj/Grr.obj/FeedPreferencesManager.m.o:(.data.rel+0x4): undefined reference to `__objc_class_name_RSSFeed'

It appears that link-libs.patch needs to be extended to cover this;
-lRSSKit is clearly in the wrong place on the link line for --as-needed
(http://wiki.debian.org/ToolChain/DSOLinking).  This probably doesn't
affect Debian right now because --as-needed is a positional option and
only affects those libraries listed after it, but Ubuntu's linker
defaults to --as-needed right out of the gate.  Nevertheless, I believe
that the debian-gcc team is tracking these problems and wants to make
Debian packages work cleanly with such a linker.

Here's a patch.  Does it seem like a reasonable approach?

  * debian/patches/link-libs.patch: Use ADDITIONAL_GUI_LIBS rather than
    ADDITIONAL_LDFLAGS in GNUmakefile.preamble.

diff -u grr.app-0.6.2.dfsg/debian/patches/link-libs.patch grr.app-0.6.2.dfsg/debian/patches/link-libs.patch
--- grr.app-0.6.2.dfsg/debian/patches/link-libs.patch
+++ grr.app-0.6.2.dfsg/debian/patches/link-libs.patch
@@ -2,6 +2,8 @@
 
 	* RSSKit/GNUmakefile (libRSSKit_LIBRARIES_DEPEND_UPON): Add
           $(OBJC_LIBS).
+	* GNUmakefile.preamble (ADDITIONAL_LDFLAGS): Rename to...
+	(ADDITIONAL_GUI_LIBS): ...this.
 
 
 --- grr.app-0.6.2.dfsg.orig/RSSKit/GNUmakefile
@@ -17,0 +20,11 @@
+--- grr.app-0.6.2.dfsg.orig/GNUmakefile.preamble
++++ grr.app-0.6.2.dfsg/GNUmakefile.preamble
+@@ -12,7 +12,7 @@
+ ADDITIONAL_CFLAGS += 
+ 
+ # Additional flags to pass to the linker
+-ADDITIONAL_LDFLAGS += -lRSSKit 
++ADDITIONAL_GUI_LIBS += -lRSSKit 
+ 
+ # Additional include directories the compiler should search
+ ADDITIONAL_INCLUDE_DIRS += 

-- 
Colin Watson                                       [cjwatson at ubuntu.com]





More information about the pkg-GNUstep-maintainers mailing list