
I am trying to get started using Boost under Linux in order to test my TTI library using the latest trunk. So first I try using bootstrap with: ./bootstrap.sh --prefix=~/bin It completes succesfully but nothing is put in my home bin subdirectory. Did I do something wrong ? Invoking ./b2 --help does seem to work.

AMDG On 05/05/2013 04:10 AM, Edward Diener wrote:
I am trying to get started using Boost under Linux in order to test my TTI library using the latest trunk. So first I try using bootstrap with:
./bootstrap.sh --prefix=~/bin
It completes succesfully but nothing is put in my home bin subdirectory. Did I do something wrong ?
./booststrap.sh doesn't build anything. To install Boost, run ./b2 install If you just want to test TTI use: ./b2 libs/tti/test In Christ, Steven Watanabe

On 05/05/2013 07:40 AM, Steven Watanabe wrote:
AMDG
On 05/05/2013 04:10 AM, Edward Diener wrote:
I am trying to get started using Boost under Linux in order to test my TTI library using the latest trunk. So first I try using bootstrap with:
./bootstrap.sh --prefix=~/bin
It completes succesfully but nothing is put in my home bin subdirectory. Did I do something wrong ?
./booststrap.sh doesn't build anything. To install Boost, run ./b2 install
In the getting started guide, section 5.1 it says: "./bootstrap.sh --prefix=path/to/installation/prefix" and then "./b2 install" but I think that is wrong since in section 5.2.1 it says: "Run bootstrap.sh Run b2 install --prefix=PREFIX where PREFIX is the directory where you want Boost.Build to be installed" which appears to be what you are saying. Would be niced if someone fixed that documentation since I am probably not the only one to trip on it.

AMDG On 05/05/2013 10:32 AM, Edward Diener wrote:
In the getting started guide, section 5.1 it says:
"./bootstrap.sh --prefix=path/to/installation/prefix"
and then
"./b2 install"
but I think that is wrong since in section 5.2.1 it says:
"Run bootstrap.sh Run b2 install --prefix=PREFIX where PREFIX is the directory where you want Boost.Build to be installed"
which appears to be what you are saying. Would be niced if someone fixed that documentation since I am probably not the only one to trip on it.
Both forms are supposed to work. In Christ, Steven Watanabe

On 5 May 2013 12:10, Edward Diener
./bootstrap.sh --prefix=~/bin
It completes succesfully but nothing is put in my home bin subdirectory. Did I do something wrong ?
It doesn't understand tilde paths, and will have placed in a directory called "~". You need to use the full path. Btw. I think it will place the executable at 'bin/bin', and a lot of other stuff at 'bin/share', which might not be what you want.

On 05/05/2013 07:44 AM, Daniel James wrote:
On 5 May 2013 12:10, Edward Diener
wrote: ./bootstrap.sh --prefix=~/bin
It completes succesfully but nothing is put in my home bin subdirectory. Did I do something wrong ?
It doesn't understand tilde paths, and will have placed in a directory called "~". You need to use the full path. Btw. I think it will place the executable at 'bin/bin', and a lot of other stuff at 'bin/share', which might not be what you want.
Thanks ! I found that out also. Because I am mostly a Windows programmer I thought that the bash shell replaces '~' with the user's home directory but that's obviously wrong. I am still learning about the bash shell and still making mistakes.

Edward Diener
Thanks ! I found that out also. Because I am mostly a Windows programmer I thought that the bash shell replaces '~' with the user's home directory but that's obviously wrong. I am still learning about the bash shell and still making mistakes.
It's even weirder than that, and it's weirder than I thought (and I've been on Unix-type systems for ... 25+ years at this point). I thought that you were bitten by a rule that allowed tilde expansion only at the beginning of a non-quoted word. That is, I thought this would work, and it does: $ echo ~ /home/tkil But I thought this would fail, and it still worked! $ echo foo=~ foo=/home/tkil This fails as I expected: $ echo -e --foo=~ --foo=~ It turns out that there is a "maybe bug" in bash, where it tries to do tilde expansion when it thinks that it is doing an assignment. That feature makes it possible to say: my_bin_dir=~/bin But this logic is also kicking in for the second case above. It does not trigger on the third case, because "--foo" is not a valid variable name. Some more good reading here, including a situation similar to yours, where the author admits: "I don't know yet, if this is a bug or intended." http://wiki.bash-hackers.org/syntax/expansion/tilde As others have said, using $HOME is a good solution for your own home directory. (To a first approximation, you only need the ${HOME} form if you need to tell bash where your variable name ends and other text begins.) Home directories for other users can be obtained via "eval", or by using the bash variable-assignment trick above: $ echo --foo=~kevin/bin --foo=~kevin/bin $ kevins_bin_dir=~kevin/bin $ echo --foo=$kevins_bin_dir --foo=/home/kevin/bin You can also use the $(...) shortcut for "execute and give me the output": $ echo --foo=$(echo ~kevin/bin) --foo=/home/kevin/bin Which is, itself, a newer / saner / easier-to-read (IMHO) version of the venerable backticks: $ echo --foo=`echo ~kevin/bin` --foo=/home/kevin/bin It's funny that you ran into this. As someone who uses Unix-y systems most of the time, I find that doing command-line work on Windows is an epic pain. "What do you mean, the shell doesn't expand '*' for you???" Different strokes. :) Happy hacking! Best regards, Anthony Foiani
participants (4)
-
Anthony Foiani
-
Daniel James
-
Edward Diener
-
Steven Watanabe