Compiler error "/usr/bin/ld: cannot find -lsqlite" lazarus / 32-Linux ---------------------------------------------------------------------- ocpaul20 · 2015-04-25 23:19 I am trying to compile the IDE with the sqlite package enabled. The package itself compiles OK but the IDE cannot find the sqlite library when it comes to linking into the IDE. Where do I have to place sqlite.so it for it to be found please? I have linked the libsqlite3.so.0.8.6 in /usr/lib to any place I can think of and it STILL is not being found and I get the error shown below in the verbose output log. I have placed a link in 1) /opt/gnome/lib 2) {the directory which contain my projects which compile successfully} 3) development 4) development/lazarus I have added to LD_LIBRARY_PATH environment variable 1) {the directory which contain my projects which compile successfully} I have added to PATH 1) {the directory which contain my projects which compile successfully} I have added environment variable  PPC_EXEC_PATH 1) {the directory which contain my projects which compile successfully} As you can see from the compile statement below obtained with the --verbose option on fpcup_update, I have /usr/lib in the -Fl options which show the compiler where to find the libraries. There must be something obvious I am missing. Can anyone help please? ========================================== Code: [Select]/usr/bin/make --assume-new=lazarus.pp lazarus OPT=' @/mnt/sda5/development/config_lazarus/idemake.cfg' make[2]: Entering directory `/mnt/sda5/development/lazarus/ide' /mnt/sda5/development/fpc/bin/i386-linux/fpc.sh -gl -vbqewnhi -Sci -dlclgtk2 -Fu../designer -Fu../debugger -Fu../debugger/frames -Fu../converter -Fu../packager -Fu../packager/frames -Fu../components/custom -Fuframes -Fu. -Fiinclude -Fiinclude/linux -Fi../images -FE.. -FU../units/i386-linux/gtk2 -Fl/usr/lib/gcc/i486-slackware-linux/4.7.1 -Fl/lib -Fl/usr/lib -Fl/usr/local/lib -Fl/usr/X11R7/lib -Fl/root/my-applications/lib @/mnt/sda5/development/config_lazarus/idemake.cfg -di386 lazarus.pp Hint: (11030) Start of reading config file /mnt/sda5/development/fpc/bin/i386-linux/fpc.cfg Hint: (11031) End of reading config file /mnt/sda5/development/fpc/bin/i386-linux/fpc.cfg Hint: (11030) Start of reading config file /mnt/sda5/development/config_lazarus/idemake.cfg Hint: (11031) End of reading config file /mnt/sda5/development/config_lazarus/idemake.cfg Free Pascal Compiler version 2.6.5 [2015/04/26] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others (1002) Target OS: Linux for i386 (3104) Compiling lazarus.pp (9022) Compiling resource /mnt/sda5/development/lazarus/units/i386-linux/gtk2/lazarus.or (9015) Linking ../lazarus /usr/bin/ld: warning: ../link.res contains output sections; did you forget -T? /usr/bin/ld: cannot find -lsqlite /mnt/sda5/development/lazarus/ide/lazarus.pp(146,1) Error: (9013) Error while linking /mnt/sda5/development/lazarus/ide/lazarus.pp(146,1) Fatal: (10026) There were 1 errors compiling module, stopping Fatal: (1018) Compilation aborted make[2]: *** [lazarus] Error 1 make[1]: *** [idepkg] Error 2 make: *** [idepkg] Error 2 Error: /mnt/sda5/development/fpc/bin/i386-linux/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled) make[2]: Leaving directory `/mnt/sda5/development/lazarus/ide' make[1]: Leaving directory `/mnt/sda5/development/lazarus/ide' make: Leaving directory `/mnt/sda5/development/lazarus' Error: (lazarus) Build IDE: stopped with exit code 2 Error: (lazarus) Building IDE: Building IDE failed. ...a few more lines and then stops it seems no-one knows the answer to this one but there MUST be an answer somewhere. This similar question from back in 2008 http://forum.lazarus.freepascal.org/index.php/topic,5954.15.html ---------------------------------------------------------------------- Blaazen · 2015-04-25 23:32 If you added library manually, you need to do Code: [Select]ldconfig(as superuser). Anyway it's better to install sqlite from repositories of your distro. But I myself don't have much experience with sqlite. ---------------------------------------------------------------------- ocpaul20 · 2015-04-26 00:52 rebuilding the IDE also has problems but I seem to eventually figured out a fix. From the install/uninstall packages menu item, uninstall the sqlitelaz package. This allows the 'rebuild IDE' to complete at least. Still dont know how to get the compiler finding the sqlite library. I assume it is looking for the sqlite.so file somewhere. ---------------------------------------------------------------------- Leledumbo · 2015-04-26 05:26 Watch out, there are sqlitelaz and sqlite3laz. The former links to sqlite version < 3, while the latter is likely to be what you have installed currently.