Bug #255
closedwtdbosqlite3 and threading
100%
Description
It seems that the wtdbosqlite3 library needs threading but no check is done. This is the error I receive when trying to build dynamic libraries:
Linking CXX shared library libwtdbosqlite3.so
cd /home/pgquiles/personal/deb/wt/wt3/b/libwt-3.1.0a/build-shared/src/Wt/Dbo/backend && /usr/bin/cmake -E cmake_link_script CMakeFiles/wtdbosqlite3.dir/link.txt ---verbose=1
/usr/bin/c -fPIC -g -O2 -O3 -DNDEBUG -Wl,---no-undefined -Wl,---as-needed -shared -Wl,-soname,libwtdbosqlite3.so.1 -o libwtdbosqlite3.so.3.1.0 CMakeFiles/wtdbosqlite3.dir/Sqlite3.o CMakeFiles/wtdbosqlite3.dir/amalgamation/sqlite3.o -L/home/pgquiles/personal/deb/wt/wt3/b/libwt-3.1.0a/build-shared/src/Wt/Dbo ../libwtdbo.so.3.1.0 -ldl
CMakeFiles/wtdbosqlite3.dir/amalgamation/sqlite3.o: In function `pthreadMutexTry':
/home/pgquiles/personal/deb/wt/wt3/b/libwt-3.1.0a/src/Wt/Dbo/backend/amalgamation/sqlite3.c:15315: undefined reference to `pthread_mutex_trylock'
CMakeFiles/wtdbosqlite3.dir/amalgamation/sqlite3.o: In function `pthreadMutexAlloc':
/home/pgquiles/personal/deb/wt/wt3/b/libwt-3.1.0a/src/Wt/Dbo/backend/amalgamation/sqlite3.c:15192: undefined reference to `pthread_mutexattr_init'
/home/pgquiles/personal/deb/wt/wt3/b/libwt-3.1.0a/src/Wt/Dbo/backend/amalgamation/sqlite3.c:15193: undefined reference to `pthread_mutexattr_settype'
/home/pgquiles/personal/deb/wt/wt3/b/libwt-3.1.0a/src/Wt/Dbo/backend/amalgamation/sqlite3.c:15195: undefined reference to `pthread_mutexattr_destroy'
CMakeFiles/wtdbosqlite3.dir/amalgamation/sqlite3.o: In function `testThreadLockingBehavior':
/home/pgquiles/personal/deb/wt/wt3/b/libwt-3.1.0a/src/Wt/Dbo/backend/amalgamation/sqlite3.c:22447: undefined reference to `pthread_create'
/home/pgquiles/personal/deb/wt/wt3/b/libwt-3.1.0a/src/Wt/Dbo/backend/amalgamation/sqlite3.c:22448: undefined reference to `pthread_join'
collect2: ld returned 1 exit status
The attached patch against Wt 3.1.0a fixes the issue by:
a) not building the sqlite3 backend if threads are not available
b) linking to the threads library du jour
Files
Updated by Wim Dumon over 14 years ago
- Status changed from New to Closed
- Assignee set to Wim Dumon
- % Done changed from 0 to 100
Applied