[EXTERNAL] Re: [odb-users] Problem installing ODB 2.1.0 somewhere other than /usr/local/

Boris Kolpackov boris at codesynthesis.com
Fri Sep 21 04:00:22 EDT 2012


Hi Sean,

Stroud, Sean T <ststrou at sandia.gov> writes:

> Seems like the --with-libodb option ought to work, since I am pointing
> at the directory where I build libodb (not the directory where I installed
> it).

It works for *building* libodb-mysql but not for *installing* it since
an installed library should not reference a non-installed one.


> Nevertheless, I tried the ./configure command you gave below, but got
> the following error:

Sorry, I made a mistake in the command. Instead of ~/ODB2.1/libodb-2.1.0
in CPPFLAGS and LDFLAGS it should have been ~/ODB2.1/local:

./configure --prefix=/home/ststrou/ODB2.1/local CPPFLAGS=-I/home/ststrou/ODB2.1/local/include LDFLAGS=-L/home/ststrou/ODB2.1/local/lib


> - I notice in your examples you have a backslash in the command
>   before the CPPFLAGS and before the LDFLAGS. Is that important?

Backslashes are used to break a long command into multiple lines,
for better readability.


> - Also, your suggestion about setting LD_LIBRARY_FLAGS env var 
> should not be necessary for building these libs, correct?  My
> understanding is that is only to help when linking a client
> program against the odb libraries.

Modern linkers are quite tricky in this regard and may require a
shared library to be loadable just to link it to another library.
See the -rpath-link ld option for details. So it is safer to just
add /home/ststrou/ODB2.1/local/lib to LD_LIBRARY_PATH before
building.

Note also that it is LD_LIBRARY_PATH, not LD_LIBRARY_FLAGS.

Boris



More information about the odb-users mailing list