Skip to content

Instantly share code, notes, and snippets.

@benmaier
Last active December 4, 2023 10:33
Show Gist options
  • Save benmaier/3d7a10a4492c19bd91ce270fa2321519 to your computer and use it in GitHub Desktop.
Save benmaier/3d7a10a4492c19bd91ce270fa2321519 to your computer and use it in GitHub Desktop.
What I did to compile TISEAN on OS X High Sierra

Compile TISEAN on OS X High Sierra

Install relevant compilers

Follow the installation instructions on http://hpc.sourceforge.net/ to install the latest binaries of gcc and gfortran for Mac OS X.

The important part is, download the gcc-8.1 binary, then do, quote

cd to the download folder. Then gunzip gcc-8.1-bin.tar.gz (if your browser didn't do so already) and then sudo tar -xvf gcc-8.1-bin.tar -C /"

I also had to do

export PATH="/usr/bin:$PATH"

Otherwise I would get the error that 'm' is an unknown flag because it would load the wrong binary. You can also just add the line above to your ~/.bash_profile and do source ~/.bash_profile.

Download TISEAN

This is the relevant page https://www.pks.mpg.de/~tisean/archive_3.0.0.html

Execute the following to compile in ~/Library

cd ~/Library
wget https://www.pks.mpg.de/~tisean/TISEAN_3.0.1.zip
unzip TISEAN_3.0.1.zip -d TISEAN
mv TISEAN/TISEAN_3.0.1/* TISEAN
rmdir TISEAN/TISEAN_3.0.1/
rm TISEAN_3.0.1.zip
cd TISEAN

Compile

Execute

export FC=gfortran; ./configure --prefix=~/Library/TISEAN
make 
make install

Execution

Your binaries are now in ~/Library/TISEAN/bin. You can execute, e.g. mutual by calling ~/Library/TISEAN/bin/mutual or you add ~/Library/TISEAN/bin to your PATH variable and just call mutual from the command line.

Install Tisean using Homebrew

There's an easier way of installing Tisean using the custom package manager for Mac OS X called Homebrew.

Install Homebrew

First, if you have not yet, please install Homebrew.

Install Tisean

Now, do

brew tap brewsci/science
brew install tisean
@benmaier
Copy link
Author

Hi Irene, I just wrote this while taking part in a summer school in which we used TISEAN. Never used it afterwards, so I fear I won't be of much help. I think you're correct, though, it looks as if your system is lacking some dependencies. At least malloc.h seems important. While I'd recommend installing the dependencies with homebrew, have you tried installing TISEAN with homebrew? it seems to be much less of a hassle.

Cheers
Ben

@faimai00
Copy link

Hey Ben,

Thank you so much for your reply!
I did try to install it using Homebrew but I also got an error (see below). Thank you very much for your suggestion, I will definitively start looking into the dependencies! :)

Screenshot 2022-09-19 at 15 55 32

@benmaier
Copy link
Author

hm, for me it downloads from Dresden.

ᐅ  brew install tisean
==> Downloading https://www.mpipks-dresden.mpg.de/~tisean/TISEAN_3.0.1.tar.gz
Already downloaded: /Users/bfmaier/Library/Caches/Homebrew/downloads/d1a974e909bccdc5dde880b25015abe6c6ef02f23d22de8e7f1c94b7f17d170f--TISEAN_3.0.1.tar.gz
==> Installing tisean from brewsci/science
==> ./configure --prefix=/opt/homebrew/Cellar/tisean/3.0.1_4

maybe brew update first?

Anyway, probably won't work, I get the following error:

==> Downloading https://www.mpipks-dresden.mpg.de/~tisean/TISEAN_3.0.1.tar.gz
Already downloaded: /Users/bfmaier/Library/Caches/Homebrew/downloads/d1a974e909bccdc5dde880b25015abe6c6ef02f23d22de8e7f1c94b7f17d170f--TISEAN_3.0.1.tar.gz
==> Installing tisean from brewsci/science
==> ./configure --prefix=/opt/homebrew/Cellar/tisean/3.0.1_4
==> make
==> make install
Last 15 lines from /Users/bfmaier/Library/Logs/Homebrew/tisean/03.make:
2022-09-19 14:59:41 +0000

make
install

if test -n ""; then (cd source_f && /Library/Developer/CommandLineTools/usr/bin/make missing); fi
if test -n "clang"; then (cd source_c && /Library/Developer/CommandLineTools/usr/bin/make missing); fi
make: *** [do_install] Error 1
make: *** Waiting for unfinished jobs....

Do not report this issue to Homebrew/brew or Homebrew/core!

@faimai00
Copy link

I have the latest version of Homebrew so not sure it is due to that.. the file it is trying to download does not exist at that address so that is why it fails. I will keep trying and will post if I find a solution! :)
Thank you so much for your help!!

@benmaier
Copy link
Author

Hm, you probably know that, but in case you don't: brew update is not about updating brew to a newer version of itself, it's run to update the formulas (i.e. the ruby scripts that determine which files to download and to install etc). In any case, it's good to run brew update once in a while to update these formulas.

In the brewsci-repository, it looks like the Dresden address is hardcoded (see https://github.com/brewsci/homebrew-science/blob/master/Formula/tisean.rb):

  homepage "https://www.mpipks-dresden.mpg.de/~tisean/"
  url "https://www.mpipks-dresden.mpg.de/~tisean/TISEAN_3.0.1.tar.gz"

which led me to believe that your formula is outdated. However, the address your brew uses is also in the file:

 bottle do
    root_url "https://archive.org/download/brewsci/bottles-science"

So, I don't know :) the formula itself seems to have been updated last over a year ago, so I think it'd probably be a good idea to open an issue about this install not working anymore at https://github.com/brewsci/homebrew-science/issues regarding tisean.rb . Or you ping @sjackman or @cxwx directly, who seem to have contributed to this formula the most.

Good luck!

@faimai00
Copy link

Good idea! I will do that.

@OleksandraOst
Copy link

Hello @faimai00!
I am trying to install TISEAN on macOS Monterey and I am facing the same problem with https://archive.org/download/brewsci/bottles-science/tisean-3.0.1_4.sierra.bottle.tar.gz
Could you please tell me if you contacted @sjackman and @cxwx or if you managed to install TISEAN?

@faimai00
Copy link

faimai00 commented Dec 4, 2023

Hi @OleksandraOst
Unfortunately I gave up with installing TISEAN as I was tight with time whilst working on the project that required it. I did not contact @sjackman or @cxwx. Really sorry I cannot help with this. Perhaps try to contact them now?
Sorry to hear this is an ongoing issue. Good luck!

@benmaier
Copy link
Author

benmaier commented Dec 4, 2023

Have you folks tried installing/compiling from scratch as described in the first half of the gist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment