Package: planner
Version: 0.14.5-1
Severity: wishlist
User: debian-...@lists.debian.org
Usertags: ld-as-needed
Tags: patch

planner fails to build with ld --as-needed.
This is caused by wrong placement of libraries on the commandline.
Shared libraries must be placed behind the objects needing their symbols
when
building with --as-needed.
See the buildlog in ubuntu:
https://launchpadlibrarian.net/90432123/buildlog_ubuntu-precise-i386.planner_0.14.5-1_FAILEDTOBUILD.txt.gz

attached a patch that fixes the issue.
Description: fix build with ld --as-needed
 libraries must be behind objects (including static libraries)
Author: Julian Taylor <jtay...@ubuntu.com>

--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,9 +8,9 @@
 	-DEXAMPLESDIR=\"$(top_srcdir)/tests/files\"
 
 LDADD =	\
+	$(PLANNER_LIBS) \
 	$(top_builddir)/src/libplannerapp.la \
-	$(top_builddir)/libplanner/libplanner-1.la \
-	$(PLANNER_LIBS)
+	$(top_builddir)/libplanner/libplanner-1.la
 
 check_LTLIBRARIES = libselfcheck.la
 
@@ -21,19 +21,19 @@
 check_PROGRAMS = $(TESTS)
 
 scheduler_test_SOURCES = scheduler-test.c
-scheduler_test_LDADD = $(LDADD) libselfcheck.la
+scheduler_test_LDADD = libselfcheck.la $(LDADD)
 
 time_test_SOURCES = time-test.c
-time_test_LDADD = $(LDADD) libselfcheck.la
+time_test_LDADD = libselfcheck.la $(LDADD)
 
 calendar_test_SOURCES = calendar-test.c
-calendar_test_LDADD = $(LDADD) libselfcheck.la
+calendar_test_LDADD = libselfcheck.la $(LDADD)
 
 task_test_SOURCES = task-test.c
-task_test_LDADD = $(LDADD) libselfcheck.la
+task_test_LDADD = libselfcheck.la $(LDADD)
 
 cmd_manager_test_SOURCES = cmd-manager-test.c
-cmd_manager_test_LDADD = $(LDADD) libselfcheck.la
+cmd_manager_test_LDADD = libselfcheck.la $(LDADD)
 
 TESTS_ENVIRONMENT = \
 	PLANNER_STORAGEMODULEDIR=$(top_builddir)/libplanner/.libs \

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to