Hello, I am having troubles compiling nwchem-6.6 on a Mac with High Sierra (Mac OS 10.13.3)
Here is my config/build
export NWCHEM_TOP=/Users/me/nwchem-6.6
export NWCHEM_TARGET=MACX64
export USE_MPI="y"
export USE_MPIF="y"
export USE_MPIF4="y"
export CFLAGS_FORGA="-DMPICH_NO_ATTR_TYPE_TAGS"
export HAS_BLAS="y"
export BLASOPT="-framework Accelerate"
export NWCHEM_MODULES="all"
export MPI_INCLUDE="/opt/local/include"
export MPI_LIB="/opt/local/lib"
export LIBMPI=" -lmpifort -lmpi -lpmpi -lpthread"
make nwchem_config &> make.nwchem_config.log
make -j 4 &> build.log
Compiling, I get the following error:
gfortran -c -cpp -fdefault-integer-8 -g -I. -I/Users/me/nwchem-6.6/src/include -I/Users/me/nwchem-6.6/src/tools/install/include -DMACX -DEXT_INT -DGFORTRAN -DGCC4 -DPARALLEL_DIAG basis.F
gfortran -c -cpp -fdefault-integer-8 -g -I. -I/Users/me/nwchem-6.6/src/include -I/Users/me/nwchem-6.6/src/tools/install/include -DMACX -DEXT_INT -DGFORTRAN -DGCC4 -DPARALLEL_DIAG bas_input.F
gfortran -c -cpp -fdefault-integer-8 -g -I. -I/Users/me/nwchem-6.6/src/include -I/Users/me/nwchem-6.6/src/tools/install/include -DMACX -DEXT_INT -DGFORTRAN -DGCC4 -DPARALLEL_DIAG bas_contrib.F
gfortran -c -cpp -fdefault-integer-8 -g -I. -I/Users/me/nwchem-6.6/src/include -I/Users/me/nwchem-6.6/src/tools/install/include -DMACX -DEXT_INT -DGFORTRAN -DGCC4 -DPARALLEL_DIAG bas_checksum.F
dyld: Library not loaded: /usr/local/lib/libmpc.3.dylib
Referenced from: /Users/me/usr/local/bin/../libexec/gcc/x86_64-apple-darwin15.6.0/7.1.0/f951
Reason: image not found
dyld: Library not loaded: /usr/local/lib/libmpc.3.dylib
Referenced from: /Users/me/usr/local/bin/../libexec/gcc/x86_64-apple-darwin15.6.0/7.1.0/f951
Reason: image not found
gfortran: internal compiler error: Abort trap: 6 (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
gfortran: internal compiler error: Abort trap: 6 (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
make[1]: *** [/Users/me/nwchem-6.6/lib/MACX64/libnwcutil.a(basis.o)] Error 4
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [/Users/me/nwchem-6.6/lib/MACX64/libnwcutil.a(bas_input.o)] Error 4
dyld: Library not loaded: /usr/local/lib/libmpc.3.dylib
Referenced from: /Users/me/usr/local/bin/../libexec/gcc/x86_64-apple-darwin15.6.0/7.1.0/f951
Reason: image not found
dyld: Library not loaded: /usr/local/lib/libmpc.3.dylib
Referenced from: /Users/me/usr/local/bin/../libexec/gcc/x86_64-apple-darwin15.6.0/7.1.0/f951
Reason: image not found
gfortran: internal compiler error: Abort trap: 6 (program f951)
gfortran: internal compiler error: Abort trap: 6 (program f951)
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
make[1]: *** [/Users/me/nwchem-6.6/lib/MACX64/libnwcutil.a(bas_checksum.o)] Error 4
make[1]: *** [/Users/me/nwchem-6.6/lib/MACX64/libnwcutil.a(bas_contrib.o)] Error 4
make: *** [libraries] Error 1
Looks like "/usr/local/lib/libmpc.3.dylib" doesn't exist. However, "/opt/local/lib/libmpc.3.dylib" does exist. The compiler is looking at "/usr/local/lib" and "/usr/local/include" instead of "/opt/local/....."
Any suggestions on how to proceed?
Thanks!
P.S.
Here are outputs from commands that may be relevant:
cc -v
produces:
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
gfortran -v
produces:
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/Users/me/usr/local/bin/../libexec/gcc/x86_64-apple-darwin15.6.0/7.1.0/lto-wrapper
Target: x86_64-apple-darwin15.6.0
Configured with: ../gcc-7.1.0/configure --enable-languages=c++,fortran
Thread model: posix
gcc version 7.1.0 (GCC)
which gfortran
produces:
/Users/me/usr/local/bin/gfortran
which cc
produces:
/usr/bin/cc
|