Fix sqlite2 and sqlite3 related ports build problem.
Norikatsu Shigemura
nork at FreeBSD.org
Sun Feb 19 02:50:08 PST 2006
Hi mnag.
I noticed following problem about sqliteX WITH_THREADS.
1. sqlite2 or/and sqlite3 WITH_THREADS are installed.
2. cannot compile or run some ports liked sqliteX.
- - - - - - - - - - -
cc -O2 -fno-strict-aliasing -pipe -march=pentium-m -std=gnu99 -W -Wall -Wdeclaration-after-statement -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings -o .libs/sndfile-regtest sndfile-regtest.o database.o checksum.o -L/usr/local/lib ../src/.libs/libsndfile.so -lFLAC -lsqlite3 -lm -Wl,--rpath -Wl,/usr/local/lib
/usr/local/lib/libsqlite3.so: undefined reference to `pthread_create'
/usr/local/lib/libsqlite3.so: undefined reference to `pthread_equal'
/usr/local/lib/libsqlite3.so: undefined reference to `pthread_join'
*** Error code 1
- - - - - - - - - - -
Feb 17 16:04:21 sakura lmtpunix[85312]: unable to dlopen /usr/local/lib/sasl2/libsql.so: /usr/local/lib/libsqlite.so.2: Undefined symbol "pthread_mutex_unlock"
So I make two patches for sqlite2 and sqlite3. How about?
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/databases/sqlite2/Makefile,v
retrieving revision 1.37
diff -u -r1.37 Makefile
--- Makefile 13 Feb 2006 14:57:51 -0000 1.37
+++ Makefile 19 Feb 2006 10:16:12 -0000
@@ -89,7 +89,7 @@
@${ECHO} "config_TARGET_TCL_LIBS=\"-L${PREFIX}/lib -ltcl${TCL_VERSION:S/.//}\"" \
>> ${WRKSRC}/freebsd.hints
.if defined(WITH_THREADS)
- @${ECHO} "config_TARGET_CFLAGS=\"-DTHREADSAFE=1 ${PTHREAD_LIBS}\"" \
+ @${ECHO} "config_TARGET_CFLAGS=\"-DTHREADSAFE=1 ${PTHREAD_LIBS:C/-pthread/-pthread -lpthread/}\"" \
>> ${WRKSRC}/freebsd.hints
.endif
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/databases/sqlite3/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- Makefile 13 Feb 2006 16:53:11 -0000 1.16
+++ Makefile 19 Feb 2006 10:18:13 -0000
@@ -63,7 +63,7 @@
.endif
post-patch:
- @${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS}|g" \
+ @${REINPLACE_CMD} -e "s|-lpthread|${PTHREAD_LIBS:C/-pthread/-pthread -lpthread/}|g" \
${WRKSRC}/configure
@${REINPLACE_CMD} -e "s|tclsh \$$(TOP)|\$$(TCLSH) \$$(TOP)|g" \
-e "s|./libtool|${LIBTOOL}|g" \
More information about the freebsd-ports
mailing list