Thursday, 10 December 2015

How to get Git using https:// instead of git://

The company network may have blocked the git:// protocol and a package manager like ngm may fail when attempting to update dependencies.

You can get Git to automatically use https:// instead of git:// in URL's.

git config --global url.https://.insteadOf git://

Monday, 9 November 2015

Installing POCO C++ Libraries on MacOS X

Current OS version is 10.11.1.
Current Xcode version is 7.1 (7B91b)

You need GNU make version 3.80 (or newer). On my Mac it is found as 


$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0


I downloaded the current version of the libraries from pocoproject.org and moved it to a subdirectory under /Users/robert

$ gunzip poco-1.6.1.tar.gz
$ tar -xf poco-1.6.1.tar
$ cd poco-1.6.1
$ ./configure
$ make -s
$ sudo make -s install

Sunday, 8 November 2015

Installing C++ Boost libraries on MacOS X

This post describes installing Boost on iMac.

Current OS version is 10.11.1.
Current Xcode version is 7.1 (7B91b)

I already have Apple´s SDK Xcode installed. It is free and can be downloaded from App Store. To use it we have to read and accept their license terms, otherwise the bootstrap'ing fails later.

$ sudo xcodebuild -license

I wanted to install the include-files and libraries of boost to /usr/local. 

These are the steps I went through:


Download and unpack Boost from www.boost.org. Current release is Version 1.59.0. I moved the download file boost_1_59_0.tar.bz2 to a directory under my home directory /Users/robert. I will refer to it as /path/to/boost. I decided not to store the whole installation under /usr/local.

$ cd /path/to/boost
$ tar --bzip2 -xf ./boost_1_59_0.tar

To generate the build script issue the commands.

$ cd boost_1_59_0
$ ./bootstrap.sh --prefix=/usr/local


If the toolset darwin is not automatically detected, it may be due to lack of Xcode installation.
If successful you can now build the boost libraries using

$ ./b2 stage

I get a lot of compiler warnings about BOOST_DO_JOIN etc., but no errors at this time. This will build the libraries into subdirectory stage. If successful you can issue the following command to install into /usr/local which was specified using the --prefix option. Use sudo to allow for writing to /usr/local.

$ sudo ./b2 install