Rico
Rico

Reputation: 13

ubuntu, installation of a library, what to write in prefix and in environment variable

I have recently started using ubuntu. I am installing linbox library: http://www.linalg.org/developer.html. The installation guide states that one should install several libraries, including fflas-ffpack library, and then run the script autogen.sh, optionally specifying the installation prefix:

cd linbox  
./autogen.sh [--prefix=] [options].  

[options] include --with-fflas-ffpack=, which, according to the installation guide, is needed only if the package is not installed at a standard location such as /usr or /usr/local. It is also necessary to set the LD_LIBRARY_PATH to support dynamic linking with the lib directory of any of the packages installed in a nonstandard place in that case.

I have installed fflas-ffpack library. sudo dpkg -L fflas-ffpack returns

/.  
/usr  
/usr/include  
/usr/include/fflas-ffpack  
/usr/include/fflas-ffpack/fflas-ffpack-config.h  
/usr/include/fflas-ffpack/fflas-ffpack-optimise.h  
/usr/bin  
/usr/bin/fflas-ffpack-config  
/usr/share  
/usr/share/doc  
/usr/share/doc/fflas-ffpack  
/usr/share/doc/fflas-ffpack/README  
/usr/share/doc/fflas-ffpack/TODO  
/usr/share/doc/fflas-ffpack/changelog.Debian.gz  
/usr/share/doc/fflas-ffpackcopyright  
/usr/share/doc/fflas-ffpackNEWS.gz  
/usr/share/man  
/usr/share/man/man1  
/usr/share/man/man1/fflas-ffpack-config.1.gz

However when I used command ./autogen.sh, an error was reported (ERROR: Fflas-Ffpack not found!). I am not sure what the problem is and suppose that I shoul use --with-fflas-ffpack= option.

I do not know whether I determined the problem correctly and if so what I should write instead of the word "prefix" in the expression --with-fflas-ffpack=, whether I should write something in place of [--prefix=] and which path I should assign to the variable LD_LIBRARY_PATH (/usr, /usr/include, or /usr/share).

I would be grateful for any help you can provide.

Upvotes: 1

Views: 1162

Answers (1)

tripleee
tripleee

Reputation: 189357

This depends on the package, which I have not looked at in any detail, but the general convention is:

Without a prefix, the package will be installed in a system-wide default location, such as /usr/local/bin for a binary and /usr/local/lib for a library. If you want to change this (for example, because you want it in /opt instead), the --prefix option allows you to override this. You obviously need write access to the directory tree where you specify for it to be installed.

The --with-whatever=path will similarly require you to fill in the path after the equals sign for a previous library you installed. If you installed whatever in the default, system-wide location, the linker should be able to find it just by using the system-wide default paths, but if you put it in, say, your home directory (which is often convenient when you download and build a library just because you need it in order to build another component; perhaps you don't have permission to install it site-wide, or installing it would disrupt the system's operation), then you need to say something like --with-whatever=/home/you/whatever.

The output from dpkg -L does not look like it actually contains a library at all (which appears to be how it's supposed to be).

Maybe simply try with --with-fflas-ffpack=/usr/include/fflas-ffpack since the header files are installed in a subdirectory, not the regular /usr/include. Or perhaps you don't need this at all, and the authgen.sh script already knows to look for these header files there (if the source has #include <fflas-fpack/file.h> rather than #include <file.h> then no separate configuration would appear to be necessary).

If that still doesn't help, perhaps you need to install another package, or read the documentation to figure out what still needs to be done -- there appears to be a separate package fflas-ffpack-dev-doc but I would start with the README and NEWS.gz files in /usr/share/doc/fflas-ffpack, and the manual page for fflas-fpack-config.

(Incidentally, dpkg -L does not need sudo privileges to run; it just reads and prints some text from the world-readable dpkg database.)

Upvotes: 1

Related Questions