ncbi/ngs

Am I supposed to manually update $LD_LIBRARY_PATH and $CLASSPATH

BJWiley233 opened this issue · 4 comments

Hi,

Sorry for the silly question but after installation when I restart my terminal in Bionic, and I type echo $LD_LIBRARY_PATH and echo $CLASSPATH, these are not updated automatically. For ncbi-vdb I just added this manually to my ~/.bashrc file:
export LD_LIBRARY_PATH=/usr/local/ncbi/ncbi-vdb/lib64:$LD_LIBRARY_PATH
export NCBI_VDB_LIBDIR=/usr/local/ncbi/ncbi-vdb/lib64

I am also confused about whether we need to do this for ngs, ncbi-vdb, and sra-tools builds. As for also for sra-tools when I type echo $PATH, the path for sra-tools was also not added automatically. Should updating your path be part of the wiki build instructions for these?

Also what does the below mean after call make install? As they do not work for me.
Use $NCBI_VDB_LIBDIR in your link commands, e.g.:
ld -L$NCBI_VDB_LIBDIR -lncbi-vdb ...

After I update my bashrc file I still get the error:
ld: cannot open output file a.out: Permission denied

Sorry these are all beginner questions, but should be easy to answer.

Brian

Hi Brian,

It would help us to better answer your questions if we understand what you are trying to do.

If your goal is to build sra-tools from the source and start using the executables, all you need to do is build the 3 projects, as you have done, and add the sra-tools installation directory to your PATH (that is optional, though convenient).

Updating LD_LIBRARY_PATH is only needed if you are planning to do dynamic linking against the ncbi-vdb libraries. The ld … command the installation script mentions is just an example of that (the represents the user-specific portion of the command, so it is incomplete); please disregard it if dynamic linking is not your intention.

We will review our wiki build instructions to make sure they are clearer on these points.

If your are working towards something different, like creating programs that link against the ncbi-vdb and/or ngs libraries, please let us know and we will provide more specific support.

Hope this helps,
Anatoly

Brian,
An important detail: the installation scripts will update LD_LIBRARY, CLASSPATH and PATH for you but only if you run them as root (sudo make install), and to make the changes apply you would have to re-login.

The sudo issue gets a little murky. It is required when performing a standard host-global installation, but not for a user-local installation.

As @aboshkin mentioned - we'll try to make the documentation more clear about this. Thanks!