Package: charybdis
Version: 3.3.0-7
Severity: wishlist
User: [email protected]
Usertags: ld-as-needed
Tags: patch

charybdis fails to build with ld --as-needed.
This is caused by wrong placement of -lsqlite3 on the commandline.
Libraries must be placed behind the objects needing their symbols when
building with --as-needed
See the buildlog in ubuntu:
https://launchpadlibrarian.net/88975549/buildlog_ubuntu-precise-i386.charybdis_3.3.0-7_FAILEDTOBUILD.txt.gz

attached a revised non-static-sqlite3 patch that fixes the issue.
Description: make sqlite compilation non-static
 To comply with Debian policy (section 4.13), static linking is now
 disabled, to ease work from the security team.
Author: Antoine Beaupré <[email protected]>
Bug-Debian: http://bugs.debian.org/485553
Origin: debian
Bug: http://jira.atheme.org/browse/CHARY-6
Forwarded: http://jira.atheme.org/secure/attachment/10722/non-static-sqlite
Last-Update: 2011-11-03

--- a/bandb/Makefile.in
+++ b/bandb/Makefile.in
@@ -14,6 +14,7 @@
 LEXLIB          = @LEXLIB@
 CFLAGS          = @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
 LDFLAGS         = @LDFLAGS@
+LIBS           = @LIBS@ -lsqlite3
 MKDEP           = @MKDEP@ -DIRCD_PREFIX=\"@prefix@\"
 MV              = @MV@
 RM              = @RM@
@@ -39,16 +40,14 @@
 BANDB_SOURCES =     \
   bandb.c      \
   rsdb_snprintf.c \
-  rsdb_sqlite3.c \
-  sqlite3.c
+  rsdb_sqlite3.c
 
 BANDB_OBJECTS = ${BANDB_SOURCES:.c=.o}
 
 BANTOOL_SOURCES =     \
   bantool.c    \
   rsdb_snprintf.c \
-  rsdb_sqlite3.c \
-  sqlite3.c
+  rsdb_sqlite3.c
 
 BANTOOL_OBJECTS = ${BANTOOL_SOURCES:.c=.o}
 
@@ -57,10 +56,10 @@
 build: all
 
 bandb: ${BANDB_OBJECTS}
-       ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${BANDB_OBJECTS} ${IRCDLIBS}
+       ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${BANDB_OBJECTS} ${IRCDLIBS} ${LIBS}
 
 bantool: ${BANTOOL_OBJECTS}
-       ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${BANTOOL_OBJECTS} ${IRCDLIBS}
+       ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${BANTOOL_OBJECTS} ${IRCDLIBS} ${LIBS}
 
 install: build
        @echo "ircd: installing bandb ($(PROGS))"

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to