Package: cdpr Version: 2.4-1 Severity: wishlist Tags: patch User: [email protected] Usertags: origin-ubuntu oneiric ubuntu-patch
the package cdpr fails to build when using the linker flag --as-needed This is caused by the libraries being placed before the objects which need the symbols on the command line. So the library symbols are not registered as needed. See the log in the ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/cdpr/+bug/803174 Attached patch fixes this issue by using ordering the command line correctly.
Description: fix build with ld --as-needed when building with ld --as-needed libraries must be placed after object files needing them on the command line so the symbols of the libraries are registered as needed. Author: Julian Taylor <[email protected]> Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/cdpr/+bug/803174 --- cdpr-2.4.orig/Makefile +++ cdpr-2.4/Makefile @@ -16,7 +16,7 @@ CFLAGS = -Wall -W -O2 # Build for Solaris with the pcap headers/libs one dir up #CFLAGS = -DSOLARIS -Wall -I. -I../libpcap-0.7.1 -L../libpcap-0.7.1 -ggdb -LDFLAGS = -lpcap +LIBS = -lpcap # Build for Solaris #LDFLAGS = -lsocket -lnsl -lpcap @@ -33,7 +33,7 @@ conffile.o: conffile.c cdp.h cdpr.h gcc -c $(CFLAGS) conffile.c cdpr: cdpr.o cdprs.o conffile.o - gcc $(LDFLAGS) -o cdpr cdpr.o cdprs.o conffile.o + gcc $(LDFLAGS) -o cdpr cdpr.o cdprs.o conffile.o $(LIBS) install: all mkdir -p $(DESTDIR)$(prefix)/sbin/
signature.asc
Description: OpenPGP digital signature

