Zbigniew Baniewski wrote: > On Thu, Mar 13, 2008 at 01:03:01PM -0500, P Kishor wrote: > > >> why is it the I had to do the above? Why is LD_LIBRARY_PATH not set >> automatically? And, since it wasn't set, how come other programs were >> working fine (assuming that other programs in the /usr/local/bin space >> were looking for libs in /usr/local/lib as well >> >> And, what can I do to make LD_LIBRARY_PATH permanent? >> > > You don't have to. > > > If you run "./configure --help" before any compilation, it'll show you its > switches. For example: > > #v+ > [..] > > Installation directories: > --prefix=PREFIX install architecture-independent files in PREFIX > [/usr/local] > [..] > --libdir=DIR object code libraries [EPREFIX/lib] > > ...and some "influential environment variables" as well: > > LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a > nonstandard directory <lib dir> > LIBS libraries to pass to the linker, e.g. -l<library> > #v- > > So, you can set it all *before*. > I agree with Zbigniew. When I compile SQLite in CentOS 5, I use something like the following `configure` line:
(First unpack the source code, then create an sqlite-x.x.x/bld directory, then cd into that) ../configure --prefix=/usr/local/sqlite-x.x.x --enable-threadsafe --disable-tcl make su make install You could put '3.5.6' where you see x.x.x and get a /usr/local/sqlite-3.5.6 binary directory when you `make install`. After `make install` I like to edit /etc/ld.so.conf to point to the /usr/local/sqlite-x.x.x/lib directory and then run `ldconfig`. However I don't know if this is a best practice or what others would recommend. I know I can run into trouble if I have multiple sqlite version libraries in /etc/ld.so.conf: /usr/local/sqlite-3.5.3/lib /usr/local/sqlite-3.5.6/lib What happens here is the running `sqlite3` results in version 3.5.3 being run, even if my path is set to point to /usr/local/sqlite-3.5.6/bin. I'm not sure what I'll do if the day comes when I need to access earlier versions of sqlite. I have a bunch of those in /usr/local now. The final step I do after building SQLite is to change my path to point to /usr/local/sqlite-x.x.x/bin. Again, understand that x.x.x refers to the version you are building. Thanks Bob Cochran Greenbelt, Maryland, USA _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users