ChrisBeaumont / Dendro

Fast Dendrograms in C++
2 stars 0 forks source link

OS X Compilation Troubles + fixes #1

Open bradenmacdonald opened 12 years ago

bradenmacdonald commented 12 years ago

I just tried to compile this so I could do some benchmarks on my Macbook. I thought I'd share what I had to do so that it can be easier for others to try this out:

I was getting an error about missing install-sh, despite your commit to add it in 299d61ac3895ca572bcaf4ba311c2ebc189c6ab4. I figured out that the install-sh you added is just a symlink pointing to a directory that's fairly specific to your system... On my Mac, this file was missing, as was depcomp. I had to delete the install-sh symlink and run automake --add-missing to get this to compile.

$ automake --add-missing
configure.ac:7: installing './install-sh'
configure.ac:7: installing './missing'
src/Makefile.am: installing './depcomp'
$ ./configure && make

Then, for some reason make was not linking to cfitsio, so I got the following error:

...
Making all in src
g++ -DNDEBUG -O3 -Wall -fmessage-length=0 -MMD -I/usr/local/include -I/usr/local/include/CCfits -g -O2 -lCCfits  -o dendro dendro.o DendroFits.o main.o  -lCCfits
Undefined symbols for architecture x86_64:
  "_ffuky", referenced from:
      CCfits::KeyData<int>::write()  in DendroFits.o
      CCfits::KeyData<float>::write()in DendroFits.o
ld: symbol(s) not found for architecture x86_64

I found that if I manually changed the g++ link command and added -lcfitsio to the command line, it compiled without error. I suspect the autoconf script is somehow doesn't realize that cfitsio is required?

ChrisBeaumont commented 12 years ago

Hi Braden,

Yes, Tom and I have recently had a similar conversation over email -- I clearly setup automake incorrectly (I don't really know how to do it properly). This is something we will have to fix if we decide to stay with C++