Jump to content


Photo

Compile Server Problem On Freebsd


  • Please log in to reply
1 reply to this topic

#1 vozice_09

vozice_09

    Sergeant

  • Forum Members
  • PipPipPip
  • 21 posts

Posted 24 October 2007 - 02:19 AM

I trying compile ufo2000 server on 6.2-RELEASE-p5:
gmake server
...
...
g++ -funsigned-char -Wall -Wno-deprecated-declarations -I src/lua -I src/luasqlite3 -DDEBUGMODE -DUFO_SVNVERSION=\"1086\" -O2 -pipe -I/usr/local/include/freetype2 -I/usr/local/include -DHAVE_FREETYPE -DGLYPH_TARGET=GLYPH_TARGET_ALLEGRO -DGK_NO_LEGACY -DHAVE_PNG -DLINUX -I/usr/local/include -o ufo2000-srv obj-srv/server_config.o obj-srv/server_main.o obj-srv/server_protocol.o obj-srv/server_game.o obj-srv/md5.o obj-srv/server_transport.o obj-srv/lapi.o obj-srv/lauxlib.o obj-srv/lbaselib.o obj-srv/lcode.o obj-srv/ldblib.o obj-srv/ldebug.o obj-srv/ldo.o obj-srv/ldump.o obj-srv/lfunc.o obj-srv/lgc.o obj-srv/liolib.o obj-srv/llex.o obj-srv/lmathlib.o obj-srv/lmem.o obj-srv/loadlib.o obj-srv/lobject.o obj-srv/lopcodes.o obj-srv/lparser.o obj-srv/lstate.o obj-srv/lstring.o obj-srv/lstrlib.o obj-srv/ltable.o obj-srv/ltablib.o obj-srv/ltests.o obj-srv/ltm.o obj-srv/lundump.o obj-srv/lvm.o obj-srv/lzio.o obj-srv/sqlite3_command.o obj-srv/sqlite3_connection.o obj-srv/sqlite3_internal.o obj-srv/sqlite3_reader.o -lsqlite3 -lNL -pthread
/usr/bin/ld: cannot find -lsqlite3
gmake: *** [ufo2000-srv] Error 1


pkg_info | grep sqlite
sqlite3-3.4.1
sqlite3-threads-3.4.1

Can you help me, please?

#2 AndyS

AndyS

    Sergeant

  • Forum Members
  • PipPipPip
  • 13 posts

Posted 29 October 2007 - 03:52 PM

The compile command does not contain any -L directory directives to tell the linker (ld) where to search for libraries that are not on the compiler/linker default paths (typically current dir and $LIBRARY_PATH on some architectures). Find the libsqlite3.a file and add it's path after a -L directive. This should fix it I think (I'm not familiar with FreeBsd so I could be wrong).


g++ -funsigned-char -Wall -Wno-deprecated-declarations -I src/lua -I src/luasqlite3 -DDEBUGMODE -DUFO_SVNVERSION=\"1086\" -O2 -pipe -I/usr/local/include/freetype2 -I/usr/local/include -DHAVE_FREETYPE -DGLYPH_TARGET=GLYPH_TARGET_ALLEGRO -DGK_NO_LEGACY -DHAVE_PNG -DLINUX -I/usr/local/include -o ufo2000-srv obj-srv/server_config.o obj-srv/server_main.o obj-srv/server_protocol.o obj-srv/server_game.o obj-srv/md5.o obj-srv/server_transport.o obj-srv/lapi.o obj-srv/lauxlib.o obj-srv/lbaselib.o obj-srv/lcode.o obj-srv/ldblib.o obj-srv/ldebug.o obj-srv/ldo.o obj-srv/ldump.o obj-srv/lfunc.o obj-srv/lgc.o obj-srv/liolib.o obj-srv/llex.o obj-srv/lmathlib.o obj-srv/lmem.o obj-srv/loadlib.o obj-srv/lobject.o obj-srv/lopcodes.o obj-srv/lparser.o obj-srv/lstate.o obj-srv/lstring.o obj-srv/lstrlib.o obj-srv/ltable.o obj-srv/ltablib.o obj-srv/ltests.o obj-srv/ltm.o obj-srv/lundump.o obj-srv/lvm.o obj-srv/lzio.o obj-srv/sqlite3_command.o obj-srv/sqlite3_connection.o obj-srv/sqlite3_internal.o obj-srv/sqlite3_reader.o -lsqlite3 -lNL -pthread
/usr/bin/ld: cannot find -lsqlite3
gmake: *** [ufo2000-srv] Error 1