Package: fossology
Version: 1.2.0-3
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch oneiric

(This was originally filed as
https://bugs.launchpad.net/ubuntu/+source/fossology/+bug/770861.)

fossology fails to build with 'ld --as-needed', because it places
libraries on its link line in the wrong order: libfossdb refers to
symbols in libpq, so -lpq needs to come after -lfossdb.  See
http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries.
Patch follows.

  * Move -lpq after -lfossdb, fixing build failure with 'ld --as-needed'.

--- fossology-1.2.0.orig/devel/libfossdb/Makefile
+++ fossology-1.2.0/devel/libfossdb/Makefile
@@ -15,7 +15,7 @@
        $(AR) cr $@ libfossdb.o
 
 $(EXE): %: %.c $(LIB) $(VARS)
-       $(CC) $< -lpq $(CFLAGS_DB) -I`pg_config --includedir` -o $@
+       $(CC) $< $(CFLAGS_DB) -lpq -I`pg_config --includedir` -o $@
 
 install: install-dev install-lib install-exe
 

Thanks,

-- 
Colin Watson                                       [[email protected]]



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to