I figured out the problem. Apparently libsqlite3.so.0.8.6 is different for Ubuntu and Centos (at least as installed by yum and apt-get).
Ubuntu has the function sqlite3_prepare_v2, but the centos version does not (only sqlite3_prepare).
I was able to work around this problem by changing the sqlite3_prepare_v2 call to sqlite3_prepare, and the subscriber registry built successfully.
I did get it from the yum repository. It is the same version as the libsqlite I have on my working Ubuntu system.
Right before I left, I tried setting LD_LIBRARY_PATH to /usr/lib but that didn't work.
Sent from my iPhone
On Dec 20, 2011, at 6:35 PM, Kurtis Heimerl <email@example.com> wrote:
> Code should be fine, it seems like libsqlite3 isn't on your library
> path. Did you get it from the yum repository?
> On Tue, Dec 20, 2011 at 2:40 PM, Ed Bindl <firstname.lastname@example.org> wrote:
>> I'm moving my openBTS installation to CentOS, and am having problems
>> building the subscriber registry.
>> I checked out the entire svn repo and successfully built openBTS. Now I'm
>> trying to build the subscriber registry by:
>> <From SVN ROOT>
>> cd subscriberRegistry/trunk
>> sudo make
>> and get this output:
>> g++ -o srmanager.cgi -g -Wall -Wno-deprecated
>> -I../../openbts/trunk/CommonLibs -I../../openbts/trunk/sqlite3 srmanager.cpp
>> ../../openbts/trunk/sqlite3/sqlite3util.cpp SubscriberRegistry.cpp
>> servershare.cpp -losipparser2 -losip2 -lc -lpthread -lsqlite3
>> /tmp/ccZymBY9.o: In function `sqlite3_prepare_statement(sqlite3*,
>> sqlite3_stmt**, char const*)':
>> undefined reference to `sqlite3_prepare_v2'
>> collect2: ld returned 1 exit status
>> make: *** [srmanager.cgi] Error 1
>> I double checked to make sure that all the links to the files in openbts/
>> and sqlite/ resolved, and they did.
>> I figured this was a problem with my libsqlite3, so I did some poking
>> around, and discovered that it was indeed installed in /usr/lib, so I made
>> some symlinks, to match my ubuntu system thinking that may fix the problem.
>> The current state is:
>> ls -al /usr/lib/libsqlite*
>> lrwxrwxrwx 1 root root 19 Dec 19 17:13 /usr/lib/libsqlite3.so ->
>> lrwxrwxrwx 1 root root 19 Dec 14 06:31 /usr/lib/libsqlite3.so.0 ->
>> -rwxr-xr-x 1 root root 387964 Sep 19 2009 /usr/lib/libsqlite3.so.0.8.6
>> lrwxrwxrwx 1 root root 28 Dec 20 17:37 /usr/lib/libsqlite.so ->
>> lrwxrwxrwx 1 root root 28 Dec 20 17:10 /usr/lib/libsqlite.so.0 ->
>> Can anyone give me any insight as to what might be going on? I'm using a
>> version of the code I pulled today from the svn repo at wush.net.
>> Write once. Port to many.
>> Get the SDK and tools to simplify cross-platform app development. Create
>> new or port existing apps to sell to consumers worldwide. Explore the
>> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
>> Openbts-discuss mailing list