Boost logo

Boost Users :

Subject: Re: [Boost-users] Trouble Updating Boost to run OpenFOAM
From: Leon Mlakar (leon_at_[hidden])
Date: 2016-06-09 14:48:06


On 09.06.2016 20:19, Blair Climenhaga wrote:
> Hi,
>
> Thank you so much for your response, it was extremely informative.
> However things are still not as they should be. I completed the
> following installation procedure
>
> 1.
>
> Download an unzip to a directory to /home/su2/Programs such that
> boost_1_61_0 is now in the directory.
>
> 2. cd into the boost_1_61_0 directory
> 3.
>
> Ran ./bootstrap.sh
>
> 4.
>
> Ran ./b2 --prefix=/usr/local
>
>
> However searching through the /usr/local directory I cannot find the
> files. Returning to the boost_1_61_0 directory I see new files making
> me think it installed to the this directory instead, did I do
> something wrong? Is there a way to have the system look to here for
> the installed files?
>
You didn't say what exactly you downloaded and are trying to install.
You can download either package with pre-compiled libraries (for some
platforms), or a source distribution package and compile it yourself. In
either case, and according to
http://www.boost.org/doc/libs/1_61_0/more/getting_started/unix-variants.html#easy-build-and-install,
you'd need to run ./bootstrap.sh with --prefix option, and ./b2 install
without it. I never install prebuild libraries so I have no experience
with such packages.

I'd recommend a careful reading of the above, and the associated
documents that are available at the Boost site. Occasionally I have to
compile and install Boost myself (usually because the system supplied
package is too old), but so far I found this process rather fluent and
well documented. It really is worth reading through the docs.

As for the latter part, your question it's a bit vague. When you compile
and link your sources that make a use of Boost libraries, it's a matter
of compiler and linker directives that tell compiler where to search for
header files and tell linker where to look for libraries. When you want
to run your programs that use Boost shared libraries, then the system
loader has to find these libraries. But all this stuff is platform
specific, sensitive to the linker options you have used and other
variables. By default gcc on Ubuntu will probaly look into /usr/include
and /usr/local/include for headers, and /lib, /usr/lib and
/usr/local/lib for libraries. But you can use -I and -L to specify
custom locations.

Cheers,

Leon

> All the best,
> Blair
>
> ------------------------------------------------------------------------
> To: boost-users_at_[hidden]
> From: leon_at_[hidden]
> Date: Thu, 9 Jun 2016 19:34:28 +0200
> Subject: Re: [Boost-users] Trouble Updating Boost to run OpenFOAM
>
> On 09.06.2016 19:23, Blair Climenhaga wrote:
>
> Hi,
>
> Thanks for the answer, that makes a lot of sense. To install it
> for myself do you know what directory I should download/extract
> the .zip directory to (usr, usr/include, usr/local etc.) ?
> Additionally what should I add as the prefix for the "./b2 install
> prefix=" command? I must apologize, I am very new to Linux and I
> have been trying to complete this process for the past few days to
> no avail.
>
>
> If that's a source package, unzip it at some convenient place in/under
> your home directory. Certainly don't use system directories for that.
> And don't unzip/compile as root. It's not hygienic. Build as regular
> user, use sudo for install only.
>
> Install prefix will tell b2 where to install compiled libraries and
> headers. It's your pick. I'd suggest you don't use the system space
> (/usr) but some other place (/usr/local, /opt, /opt/local/share or
> something like that) that is meant for customization. I don't recall
> off-hand which Ubuntu uses.
>
> But before you start, use apt to remove your current Boost
> installation to avoid confusion with two versions of the same stuff
> lying around.
>
> Good luck,
>
> Leon
>
> All the best,
> Blair
>
> ------------------------------------------------------------------------
> To: boost-users_at_[hidden] <mailto:boost-users_at_[hidden]>
> From: leon_at_[hidden] <mailto:leon_at_[hidden]>
> Date: Thu, 9 Jun 2016 19:14:46 +0200
> Subject: Re: [Boost-users] Trouble Updating Boost to run OpenFOAM
>
> On 09.06.2016 18:57, Blair Climenhaga wrote:
>
> Hi,
>
> I have done as you said a matter of days ago to OpenFOAM's
> forum and I have received no response. The matter is slightly
> urgent, hence why I chose to post to this mailing list. I am
> attempting to install/update to Boost 1.61.0 on my Ubuntu
> 12.04 workstation. Can you see any error in using the command
> below to achieve this/ any reason why not all directories
> would be added?
>
> |sudo apt-get install libboost-all-dev|
>
> That would be the correct command. But I doubt it will install
> Boost 1.61, as it installs prebuilt Boost libraries packaged for
> Ubuntu fetched from ubuntu repositories. Since Ubuntu 12.04 you
> said you are running on your WS is rather old (16.04 LTS is out
> there) I don't believe the 12.04 repositories will get updated to
> Boost 1.61. Especially considering that even 16.04 comes with
> Boost 1.58.
>
> If you need 1.61 your best bet is to download Boost 1.61 source
> distribution from the Boost site and build/install the stuff yourself.
>
> Cheers,
>
> Leon
>
> All the best, Blair
>
> ------------------------------------------------------------------------
> To: boost-users_at_[hidden]
> <mailto:boost-users_at_[hidden]>
> From: damien_at_[hidden] <mailto:damien_at_[hidden]>
> Date: Thu, 9 Jun 2016 10:27:05 -0600
> Subject: Re: [Boost-users] Trouble Updating Boost to run OpenFOAM
>
> On 6/9/2016 10:16 AM, Blair Climenhaga wrote:
>
>
> Hi,
>
> The problem I need solved is how to add the needed Boost
> directories, which is a Boost problem. Even if had no
> intent to use it with OpenFOAM, I would still like to add
> the new directories and libraries. Do you know how this
> can be completed?
>
> All the best,
> Blair
> ------------------------------------------------------------------------
> To: boost-users_at_[hidden]
> <mailto:boost-users_at_[hidden]>
> From: damien_at_[hidden] <mailto:damien_at_[hidden]>
> Date: Thu, 9 Jun 2016 10:09:11 -0600
> Subject: Re: [Boost-users] Trouble Updating Boost to run
> OpenFOAM
>
> On 6/9/2016 10:01 AM, Blair Climenhaga wrote:
>
> Hello Everyone,
>
> I have recently begun using OpenFOAM which requires
> boost for some of its functions, however upon
> installing OpenFOAM it appears that some of the needed
> Boost contents are not in my usr/include/boost such as
> the directories container, move, intrusive, core and
> many others. I have attempted to update boost in
> multiple ways so that these directories are added to
> the boost directory however I have had no success. The
> two types of attempts I have made are listed below.
>
> 1. Using sudo apt-get install libboost-all-dev,
> however this seems to just update the lib and provide
> me with the needed directories
> 2. Download the .zip of the newest boost version and
> follow the steps listed on the boost website. I have
> been downloading and installing the files to a
> directory in the home rather than usr and it seems
> that the product is not on the Path of the computer,
> as it is does not appear when I use the echo or
> whereis commands.
>
> If anyone has any advice for how to solve this issue
> or any recommendations I would greatly appreciate the
> assistance. Thank you for your time and for your help
> in advance.
>
> All the best,
> Blair Climenhaga
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> This isn't really a Boost question. However older
> guidelines for installing OpenFOAM on Ubuntu are here:
>
> https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.3.0/Ubuntu
>
> You'll see that there's specific Boost dev libraries that
> need to be installed. If this doesn't work you should ask
> on the OpenFOAM mailing list.
>
> Damien
>
> _______________________________________________
> Boost-users mailing list Boost-users_at_[hidden]
> <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> Well, not quite. How Ubuntu manages their Boost installation
> is up to Ubuntu. Boost installation is different on every
> Linux distribution. Your best bet is to ask on the OpenFOAM
> mailing list seeing as that's the software you need to work.
> They'll be able to tell you the apt-get commands to get the
> correct Boost libs for your Ubuntu and OpenFOAM versions.
> Unless there's an OpenFOAM on Ubuntu expert on the Boost list
> that knows the answer.
>
> Damien
>
>
> _______________________________________________ Boost-users
> mailing list Boost-users_at_[hidden]
> <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden] <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
>
> _______________________________________________ Boost-users
> mailing list Boost-users_at_[hidden]
> <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden] <mailto:Boost-users_at_[hidden]>
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
>
>
> _______________________________________________ Boost-users mailing
> list Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net