libdbi
This is an old revision of the document!
Version | Description of change |
---|---|
1.2.x | Compile options now use -rpath to hard-code location of libdbi and avoid environment setup hassles |
Libdbi is a "database-independent abstraction layer in C, similar to the DBI/DBD layer in Perl". Currently we use it for cstore, which is a C based interface to the database, and for reporter-store, the reporting system's backend service.
./configure --disable-docs && make all install
- Build libdbi-drivers.
# note: you may not need or may need to change --with-pgsql-dir=/opt/ ./configure --with-pgsql-dir=/opt/ --disable-docs --with-pgsql --enable-libdbi && make all install
- [Note - only for versions prior to Evergreen 1.2.x]: When all of this is done, you must ensure that
/usr/local/lib
and/usr/local/lib/dbd
are added to your ld path. If you encounter an error inosrfsys.log
similar toWARN: Failed to dlopen library file oils_cstore.so: libdbdpgsql.so: cannot open shared object file: No such file or directory
, you probably have not set this part of your environment correctly. On most systems, you can use one of the following approaches:- Modify the
LD_LIBRARY_PATH
environment variable for theopensrf
user:- In your favorite text editor, open
/home/opensrf/.bashrc
(assuming you're running the bash shell) - Add the following line to the bottom of the file:
export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/dbd:$LD_LIBRARY_PATH
- Run
. /home/opensrf/.bashrc
to set your environment immediately. Any subsequent times that you log in asopensrf
the environment will be set automatically for you.
- OR Modify the ld path for the entire system. (Note: This does not work on Gentoo; see the Gentoo install documentation for an alternative approach.)
- As the root user, open
/etc/ld.so.conf
in a text editor - Add the following lines to the bottom of the file:
/usr/local/lib /usr/local/lib/dbd
- Run
ldconfig
to reload the system path.
libdbi.1183435391.txt.gz · Last modified: 2022/02/10 13:33 (external edit)