0

I would love to hear your explanations and methods of solutions for the problem that I have been facing for such a long time by now.

I am working in a remote cluster where sudo command is not allowed and any operation on directories above $HOME branch is not permitted ($HOME=/storage/5/trentalove)

I need to configure

$HOME/external/trentacoollime

with boost library, which I installed in $HOME/boost_1_65_1 using the boost_1_65_1.tar.bz2 source from http://www.boost.org/users/history/version_1_65_1.html

(Please note that sudo apt-get install libboost-all-dev is not allowed.)

Then, I define my PATH variable in .bash_profile and export as `export PATH = $HOME/boost_1_65_1:$PATH'

However, when I configure in $HOME/external/trentacoollime directory, with

./configure

I was prompted with an error message

configure: error: cannot find Boost headers version>=1.41.0

When I configure with

./configure --with-boost=../../boost_1_65_1

It gave me no error message and successfully configured.

My guess is that since I defined and exported the PATH variable to the boost directory, I need not have the --with-boost=../../boost_1_65_1 option when I execute the ./configure command. However, I needed it.

Could someone explain what I am missing?

p.s. I did the same thing in my own machine with sudo apt-get install libboost-all-dev, which installed boost_1_65_1 under /usr/include directory. Then I could still configure the $HOME/external/trentacoollime with just ./configure and no --with-boost= option ($PATH being defined in the same way as in the cluster). However, please note that I can not implement the same strategy in the cluster since I do not have permission for sudo nor any kind of mv, cp, ln command to /usr/include, which is at a higher branch than my $HOME directory.

  • 2
    PATH determines where the shell looks for executable files - AFAIK it has no effect on where build tools look for header files – steeldriver Dec 24 '17 at 2:20
  • Could you give me any suggestion how to make ./configure command to look for $HOME/boost_1_65_1 directory without giving --with-boost option? – trenta coollime Dec 24 '17 at 2:34
  • I don't really understand why you want to do this - if the ./configure script provides a --with-boost option, then that's really the most sensible thing to use. You could try setting an include path via one of the commonly respected environment variables e.g. export CXXFLAGS='-I $HOME/boost_1_65_1' – steeldriver Dec 24 '17 at 2:47
  • Thank you for your keep up. I get your point, I can still use --with-boost=../../Boost_1_65_1 option. – trenta coollime Dec 24 '17 at 2:50
  • However, the real problem comes into my next command which is make. I do not know any option that corresponds to --with-boost of ./configure command. After completing ./configure command successfully with --with-boost=../../Boost_1_65_1, I have to execute make. – trenta coollime Dec 24 '17 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.