isce-framework / fringe

Fine Resolution InSAR With Generalized Eigenvectors (FRInGE)
Apache License 2.0
81 stars 42 forks source link

installation on Mac #28

Open hfattahi opened 4 years ago

hfattahi commented 4 years ago

I had to slightly change the Cmake command from:

CXX=clang++ cmake -DCMAKE_INSTALL_PREFIX=../install ../src/fringe

To the following to install the package on my Mac:

CXX=clang++ cmake -DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_INSTALL_PREFIX=../install ../src/fringe Before issuing a PR I wanted to make sure if others have experienced this? @piyushrpt @yunjunz @yjzhenglamarmota

rtburns-jpl commented 4 years ago

Just my 2¢, but I always use this option on macOS so my cmake PR recommends it in the isce2 readme. https://github.com/isce-framework/isce2/pull/136/files#diff-04c6e90faac2675aa89e2176d2eec7d8R324-R329

piyushrpt commented 4 years ago

Yep. Need it to circumvent the default framework.

EJFielding commented 4 years ago

I got the cmake -DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_INSTALL_PREFIX=../install ../src/fringe to work on my Mac, but I am having trouble with it not finding the mpi.h file on build.

make all
[ 10%] Built target calamplib
[ 21%] Built target ampdispersionlib
[ 25%] Building CXX object src/nmap/CMakeFiles/nmaplib.dir/nmaplib.cxx.o
In file included from /Users/fielding/tools/Fringe/build/src/nmap/nmaplib.cxx:629:
In file included from /Users/fielding/tools/Fringe/src/fringe/src/nmap/./nmap.cpp:9:
In file included from /opt/local/include/armadillo:75:
In file included from /opt/local/include/armadillo_bits/include_hdf5.hpp:30:
In file included from /opt/local/include/hdf5.h:22:
/opt/local/include/H5public.h:63:13: fatal error: 'mpi.h' file not found
#   include <mpi.h>
            ^~~~~~~
1 error generated.
make[2]: *** [src/nmap/CMakeFiles/nmaplib.dir/nmaplib.cxx.o] Error 1
make[1]: *** [src/nmap/CMakeFiles/nmaplib.dir/all] Error 2
make: *** [all] Error 2

In case it matters, this is what I have for MacPorts:

port select mpi
Available versions for mpi:
    none
    openmpi-devel-mp-fortran
    openmpi-gcc7-fortran (active)
    openmpi-mp-fortran