Opened 10 years ago

Closed 10 years ago

#884 closed defect (fixed)

SQLite linking issue on Ubuntu

Reported by: Dimitar Misev Owned by: George Merticariu
Priority: major Milestone: 9.1
Component: build system Version: development
Keywords: Cc:
Complexity: Medium

Description

Mailing list report:

g++ -I/usr/include/postgresql   -I /usr/include/  -g3 -gdwarf-2 -rdynamic  -fno-stack-protector -O3  -I/home/rasdaman/install -I/home/rasdaman/install/debug -I/home/rasdaman/install/include  -DSHARE_DATA_DIR=\"/opt/rasdaman/share/rasdaman/\" -DCONFDIR=\"/opt/rasdaman/etc/\" -DBINDIR=\"/opt/rasdaman/bin/\" -DLOGDIR=\"/opt/rasdaman/log/\"  -L/usr/lib -lsqlite3 -L/usr/lib -lpq -o rasserver rasserver_main.o rasserver_config.o rasserver_entry.o createinitmdd.o ../servercomm/libservercomm.a ../qlparser/libqlparser.a ../conversion/libconversion.a ../rasodmg/librasodmg.a ../raslib/libraslib.a ../storagemgr/libstoragemgr.a ../reladminif/libreladminif.a ../tilemgr/libtilemgr.a ../mddmgr/libmddmgr.a ../catalogmgr/libcatalogmgr.a ../relmddif/librelmddif.a ../relstorageif/librelstorageif.a ../relcatalogif/librelcatalogif.a ../indexmgr/libindexmgr.a ../relblobif/librelblobif.a ../relindexif/librelindexif.a ../httpserver/libhttpserver.a ../network/libnetwork.a ../commline/libcommline.a ../lockmgr/liblockmanager.a ../servercomm/libservercomm.a ../relcatalogif/librelcatalogif.a ../raslib/libraslib.a -L/usr/lib -lpq -lz -lecpg -lnsl -L/usr/lib -lgdal1.7.0  -lpgtypes -lpq -lnetcdf_c++ -lnetcdf -lmfhdfalt -ldfalt -lz -ltiff -ledit -lnetpbm -lpng -lncurses -ljpeg -lfl -ldl -lcrypto -lcrypt
/usr/bin/ld: ../reladminif/libreladminif.a(sqlitewrapper.o): undefined reference to symbol 'sqlite3_step'
/usr/bin/ld: note: 'sqlite3_step' is defined in DSO /usr/lib/libsqlite3.so so try adding it to the linker command line
/usr/lib/libsqlite3.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[3]: *** [rasserver] Error 1
make[3]: Leaving directory `/home/rasdaman/install/server'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/rasdaman/install/server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rasdaman/install'
make: *** [all] Error 2
2015/01/28 16:09:58 The command [/bin/sh -c make] returned a non-zero code: 2

Solution: worked after setting the -lsqlite3 at the end. So the quick-and-dirty solution for me is now to remove the sqlite library from the LDFLAGS in configure.ac and to add it as LIB environment variable before running make.

Change History (2)

comment:1 by Dimitar Misev, 10 years ago

Owner: changed from Dimitar Misev to George Merticariu
Status: newassigned

comment:2 by George Merticariu, 10 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.