I am trying to install Boost C++ using Homebrew in Mac.
$brew install boost .
This installs latest version 1.75 ,
I want to install lower versions like 1.70 . Is there a way I can maintain alternate versions ?
I am open to any pkg manager other than brew . If there is any please suggest .
Thanks in advance !!
homebrew also hosts boost#1.57 and boost#1.60 (brew search boost). If the version you need is not one of those, you could always install it yourself; it's not like you have to maintain an older installation. You just have to go through the "hassle" of following the installation instructions.
I installed boost library in my ubuntu 12.04 machine using the following command:
sudo apt-get install libboost-all-dev
But when I checked /usr/include/boost, I don't see header files for multiprecision package (cpp_dec_float.hpp). Do I need to install it separately?
Boost.Multiprecission is present in Boost 1.53 onwards.
http://www.boost.org/doc/libs/1_53_0/libs/multiprecision/doc/html/boost_multiprecision/map/hist.html
If you install libboost-all-dev metapackage from precise repository by dependncy you get libboost-dev and by dependncy you also get libboost1.46-dev which is unfortunately too old.
http://packages.ubuntu.com/precise/libboost-all-dev
http://packages.ubuntu.com/precise/libboost-dev
http://packages.ubuntu.com/precise/libboost1.46-dev
You might try your luck with some PPA repository.
E. g. this one:
https://launchpad.net/~apokluda/+archive/ubuntu/boost1.53
and install the package following this tutorial.
https://charmie11.wordpress.com/2013/10/27/install-boost-1-53-on-ubuntu-by-package-manager/
How to install gcc version 4.8 on centos or scientific linux operating systems which require yum for installing.
I tried to download gcc from https://ftp.gnu.org/gnu/gcc/gcc-4.8.2/ and then ran ./configure and then make. After running make it gives me the error: configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
Is there some way by which I may install gcc version 4.8 on linux using yum install
I tried:
1). I tried with yum --enablerepo=testing-2-devtools-6 install devtoolset-2-gcc devtoolset-2-gcc-c++ it gives me repository not found
2). yum group install "Development Tools". It gives me Package gcc-4.4.7-11.el6.x86_64 already installed and latest version
3). building it from scratch, you'll have to do ./contrib/download_prerequisites first to get MPFR, GMP and MPC in the GCC source tree, then make a separate directory and run /path/to/gcc/source/configure.
It gives:
configure: error: building out of tree but /home/Softwares/gcc-4.8.2
contains host-x86_64-unknown-linux-gnu
https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/3/html/3.0_Release_Notes/DTS3.0_Release.html#Features
Install the Red Hat Developer Toolset 3.0 (or 2.X) in a way similar to what is described here. (Basically you use a repo someone else built for CentOS).
Google says to try
yum group install "Development Tools"
check out: http://www.cyberciti.biz/faq/centos-rhel-7-redhat-linux-install-gcc-compiler-development-tools/
Is it possible to use Homebrew to install boost libraries compiled with GCC (instead of Clang)?
I have tried pointing HOMEBREW_CXX to my Homebrew version of GCC, but it doesn't seem to do the trick.
If not, I can always modify the configure file following the suggestion in this answer:
How to install Boost with specified compiler (say GCC)
brew install boost --cc=gcc-4.9 will do it. install --cc is described in man brew.
How do you install Boost on MacOS?
Right now I can't find bjam for the Mac.
You can get the latest version of Boost by using Homebrew.
brew install boost.
Download MacPorts, and run the following command:
sudo port install boost
Just get the source, and compile Boost yourself; it has become very easy. Here is an example for the current version of Boost on the current macOS as of this writing:
Download the the .tar.gz from https://www.boost.org/users/download/#live
Unpack and go into the directory:tar -xzf boost_1_50_0.tar.gz
cd boost_1_50_0
Configure (and build bjam):
./bootstrap.sh --prefix=/some/dir/you/would/like/to/prefix
Build:
./b2
Install:./b2 install
Depending on the prefix you choose in Step 3, you might need to sudo Step 5, if the script tries copy files to a protected location.
Unless your compiler is different than the one supplied with the Mac XCode Dev tools, just follow the instructions in section 5.1 of Getting Started Guide for Unix Variants. The configuration and building of the latest source couldn't be easier, and it took all about about 1 minute to configure and 10 minutes to compile.
Install both of them using homebrew separately.
brew install boost
brew install bjam
Fink appears to have a full set of Boost packages...
With fink installed and running just do
fink install boost1.35.nopython
at the terminal and accept the dependencies it insists on. Or use
fink list boost
to get a list of different packages that are availible.
Install Xcode from the mac app store.
Then use the command:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
the above will install homebrew and allow you to use brew in terminal
then just use command :
brew install boost
which would then install the boost libraries to <your macusername>/usr/local/Cellar/boost
In order to avoid troubles compiling third party libraries that need boost installed in your system, run this:
sudo port install boost +universal
Try +universal
One thing to note: in order for that to make a difference you need to have built python with +universal, if you haven't or you're not sure you can just rebuild python +universal. This applies to both brew as well as macports.
$ brew reinstall python
$ brew install boost
OR
$ sudo port -f uninstall python
$ sudo port install python +universal
$ sudo port install boost +universal
you can download bjam for OSX (or any other OS) here
If you are too lazy like me:
conda install -c conda-forge boost