Build <boost/thread/thread.hpp> for Mac OS X - macos

From the documentation on the boost website, thread.hpp is not a header-only library, it needs to be built separately. I wonder how can I build thread.hpp separately?

Rather than re-invent the wheel, the easiest thing to do is to get boost from somewhere like Homebrew or MacPorts.
E.g. first install Homebrew:
$ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
and then just:
$ sudo brew install boost
and you're good to go.

Related

Is it possible to install Pascal compiler on a mac without installing XCODE?

I am looking for a way to install fpc or any other pascal compiler on my macbook without installing the 7gb Xcode because my internet sucks and I am a VIM guy. Thanks.
Yes, it is!
You need Homebrew
Installation of Homebrew is simple just paste this into your terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
You need to install fpc
Same case; Paste it into terminal.
brew install fpc
You can start to use fpc

How to start a new static website project with SASS installed in MACOS

I was trying to install sass in one of my latest static website project, But got up with a few errors like FAILED TO BUILD GEM NATIVE EXTENSIONS. Its been 5 years I used sass last time, that time it was quite easy by simply adding gem install sass, But I found its difficult.
I have read a few articles and there its saying to install brew, RVM etc etc. I use MACOS. How can I solve my problem from scratch? What should I install and where to install (root / inside project folder).
ruby-sass has been deprecated, and it's recommended that you use another installation method.
https://sass-lang.com/install
I recommend installing via brew (which is a package manager for OS X) since you're on OS X.
https://brew.sh/
To install Brew, open your terminal and paste this:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Once the install completes, enter the following command:
brew install sass/sass/sass

Automated installation with Brew/cask in apps folder

I want create an automated script to use on a post installation.
For this reason i want use brew and cask to make it all.
So, i think that my script should start with that to install brew:
echo << "Installing homebrew..."
if test ! $(which brew); then
echo "Homebrew not found, Installing..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
Then i need to install some useful stuff as i see here:
http://lapwinglabs.com/blog/hacker-guide-to-setting-up-your-mac
So i put this too on my script:
# Install GNU core utilities (those that come with OS X are outdated)
brew install coreutils
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew install findutils
# Install Bash 4
brew install bash
# Install more recent versions of some OS X tools
brew tap homebrew/dupes
brew install homebrew/dupes/grep
$PATH=$(brew --prefix coreutils)/libexec/gnubin:$PATH
After that, the guide on the link says to install all the apps with cask and clean.
Here is my question.
I wish install and can update them in future using the classical Application folder of mac
How i can do that?
Maybe i should put this line:
export HOMEBREW_CASK_OPTS="--appdir=/Applications --caskroom=/usr/local/Caskroom"
Before all the commands to install the apps? May it works? (I have found this line here around)
If this line is correct can I update my apps using a brew/cask command?
Sorry for the dumbs questions, I've just discovered brew and cask yesterday :)
Any suggestion or example for this script is well accepted :)
brew cask install <formula> is supposed to symlink your app in Applications automatically.

How to install ImageMagick in Mac for simple task (R)

I have a simple task I want to carry out and after exhausting all resources on google I'm stumped. I think whats hindering me most is installing ImageMagick. When I used my terminal I get errors. All I want to do is make some plots on R and make a GIF out of them. Is there anyone way to confirm ImageMagick is installed?
In general you will need either MacPorts or Homebrew installed first to install ImageMagick. As you stated above it sounds like you don't have Macports installed.
If you don't have either installed, I'm a big fan of homebrew, and so I'll walk your through install with homebrew.
Step 1. First install homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
as per the homebrew website here.
Once that's done installing you'll then be able to use commands like brew install foo where foo is something you'd like to install. In your example you see port install imagemagick which is the Macports way of installing image magick.
Step 2. Install imagemagick. As per ImageMagick Mountain Lion instructions here:
brew install imagemagick
That command should install imagemagick. A super handy tool with homebrew is brew doctor which analyses all the installs you've done with homebrew to make sure they'll properly setup.

How can I install GNU Octave on Mac with Fink ?

I tried to install GNU Octave on my Mac using Fink by this instruction
http://wiki.octave.org/Octave_for_MacOS_X
I think I have followed all the instructions but I can't run Octave.
How can I check if it is installed correctly?
I tried typing 'octave' in the terminal but it says 'command not found'
Or, is there any easy instruction for Octave installation?
I've found many install guides but they are all different and assumes some knowledge.
Incidentally, I have installed Octave GNU today twice on two different machines (both running Lion).
I needed the latest version of Octave (3.6.4), and used Homebrew.
I already had XCode installed, so the rest:
Install Homebrew
Based on the instructions in this page, I ran:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Install Octave
Following this guide, I ran:
brew tap homebrew/science
brew update && brew upgrade
brew install gfortran
brew install octave
Install AquaTerm
Notice that you need this before you install gnuplot (or gnuplot won't see aqua as a valid terminal and you may get 'unknown or ambiguous terminal type' error).
Simply downloaded the latest version (1.1.0) dmg from SourceForge.
Install gnuplot
brew install gnuplot
You could try installing it with Home Brew. Once you download and install Home Brew, use this guide to get Octave installed.
Easiest option would be using the precompilled .app
I've tried the precompiled .app, but had issues with certain functions (like sound),
whereas the macports version always worked.
I usually install it using macports:
sudo port install octave
for the basics.
You might need other port variants/octave modules installed:
sudo port install octave octave-signal octave-plot octave-image octave-signal
Need to have XCode with Command Line Tools first and Macports with this route though
How to know if a Fink package is installed
By default (and this should be your case too if you didn't changed it), Fink installs everything under /sw, i.e. the binaries you are looking for should be in /sw/bin/.
Run ls /sw/bin/octave*and, depending on the output, you then have two choices :
Either the Octave binary is inside /sw/bin, in that case run echo $PATH and learn more about PATH Variable to fix your problem.
Otherwise, if there is nothing inside, there might have been a problem with the install. Try running fink install octave once more, look closely at the output and update your post if necessary.
This is simply an update on the instruction provided by Izhaki (that I ran on Mac OSX 10.8.4).
You may be required to update XCode to 4.6.3. This can be done through the AppStore.
If you encounter the error:
Error: Download failed: http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130613oss_src.tgz
during
brew install octave
Then invoke:
brew update
brew install octave
and the install will pick up where it left off. Other than that, the instruction worked seamlessly.

Resources