User Tools

Site Tools


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.

  • Get libdbi sources here
  • Get the libdbi-drivers sources here
  • Build libdbi
./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 in osrfsys.log similar to WARN: 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 the opensrf user:
      1. In your favorite text editor, open /home/opensrf/.bashrc (assuming you're running the bash shell)
      2. Add the following line to the bottom of the file:
        export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/dbd:$LD_LIBRARY_PATH
      3. Run . /home/opensrf/.bashrc to set your environment immediately. Any subsequent times that you log in as opensrf 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.)
      1. As the root user, open /etc/ld.so.conf in a text editor
      2. Add the following lines to the bottom of the file:
        /usr/local/lib
        /usr/local/lib/dbd
      3. Run ldconfig to reload the system path.
libdbi.1183435391.txt.gz · Last modified: 2022/02/10 13:33 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.