Package: yaskkserv Version: 0.5.2-1 Severity: normal Tags: upstream patch User: [email protected] Usertags: ld-as-needed
yaskkserv fails to build when --as-needed linker option is enabled, because of incorrect order of parameters passed to ld. Here's a log of failed build in Ubuntu: https://launchpadlibrarian.net/85014189/buildlog_ubuntu-precise-i386.yaskkserv_0.5.2-1_FAILEDTOBUILD.txt.gz See also http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries The attached patch was used in Ubuntu to fix the problem. https://launchpad.net/ubuntu/+source/yaskkserv/0.5.2-1ubuntu1 -- System Information: Debian Release: wheezy/sid APT prefers oneiric-updates APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 'oneiric-proposed'), (500, 'oneiric'), (100, 'oneiric-backports') Architecture: i386 (i686) Kernel: Linux 3.0.0-13-generic (SMP w/2 CPU cores) Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
Description: fix FTBFS with --as-needed linker option Libraries should be put after object files on the command line. Author: Ilya Barygin <[email protected]> --- yaskkserv-0.5.2.orig/source/Makefile.bsd_cygwin_linux_gcc.common +++ yaskkserv-0.5.2/source/Makefile.bsd_cygwin_linux_gcc.common @@ -22,7 +22,8 @@ CPPFLAGS = $(DEBUG_FLAGS) $(CXXFLAGS_AR CXXFLAGS = $(DEBUG_FLAGS) $(CXXFLAGS_ARCHITECTURE) $(CXXFLAGS_BYTE_ORDER) $(CXXFLAGS_CONFIG) $(INCLUDE_FLAGS) $(OPTIMIZE_FLAGS) $(CXXFLAGS_WARNING) -fno-exceptions -fno-rtti -fmessage-length=0 -pipe -fPIC -D $(PROJECT_IDENTIFIER)_VERSION=\"$(PROJECT_VERSION)\" -LDFLAGS = $(DEBUG_FLAGS) $(LDFLAGS_ARCHITECTURE) $(OPTIMIZE_FLAGS) -pipe -lm $(LIBRARY_FLAGS) -fPIC +LDFLAGS = $(DEBUG_FLAGS) $(OPTIMIZE_FLAGS) -pipe $(LIBRARY_FLAGS) -fPIC +LIBS = $(LDFLAGS_ARCHITECTURE) -lm CXX = $(CCACHE) $(GPLUSPLUS) LD = $(GPLUSPLUS) --- yaskkserv-0.5.2.orig/source/yaskkserv_hairy/Makefile.bsd_cygwin_linux_gcc +++ yaskkserv-0.5.2/source/yaskkserv_hairy/Makefile.bsd_cygwin_linux_gcc @@ -24,7 +24,7 @@ TARGET = $(VAR_PATH)/$(TARGET_BASE)/$( all : $(TARGET) $(TARGET) : $(OBJECTS_SKK) $(OBJECTS) - $(LD) $(LDFLAGS) -o $@ $^ + $(LD) $(LDFLAGS) -o $@ $^ $(LIBS) ifndef DEBUG $(STRIP) $@$(EXECUTE_FILE_SUFFIX) endif

