Closed sachiwee closed 3 years ago
The first error I see is that GALACTICUS_EXEC_PATH is undefined.
You should set this to the path where you're compiling Galacticus. For example, if you're already in that directory you can just do:
export GALACTICUS_EXEC_PATH=`pwd`
Then you should clear out the failed build:
rm -rf work/build
and then try compiling again.
If you run into more problems post the error messages here and I'll try to help.
I tried that. But still get the same error
The other error on your original report showed:
Fatal Error: Cannot open module file 'hdf5.mod' for reading at (1): No such file or directory
compilation terminated.
which means it can't find the HDF5.mod file. Have you already installed the HDF5 library? If you have then you may just need to set the path to it. You can do this by adding
-fintrinsic-modules-path /path/to/install/include
where /path/to/install
is the path where you installed HDF5.
There is some progress. A different error this time
./scripts/build/findExecutables.pl pwd
Use of uninitialized value $ENV{"GALACTICUS_EXEC_PATH"} in concatenation (.) or string at ./scripts/build/findExecutables.pl line 6.
./scripts/build/codeDirectivesParse.pl pwd
Use of uninitialized value $ENV{"GALACTICUS_EXEC_PATH"} in concatenation (.) or string at ./scripts/build/codeDirectivesParse.pl line 5.
Can't locate File/Changes.pm in @INC (you may need to install the File::Changes module) (@INC contains: /perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at ./scripts/build/codeDirectivesParse.pl line 9.
BEGIN failed--compilation aborted at ./scripts/build/codeDirectivesParse.pl line 9.
./scripts/build/includeDependencies.pl pwd
Use of uninitialized value $ENV{"GALACTICUS_EXEC_PATH"} in concatenation (.) or string at ./scripts/build/includeDependencies.pl line 5.
/opt/local/bin/g++ -c source/libmatheval_config.cpp -o ./work/build/libmatheval_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DMATHEVALAVAIL" > ./work/build/Makefile_Config_MathEval ; \
echo "CPPFLAGS += -DMATHEVALAVAIL" >> ./work/build/Makefile_Config_MathEval ; \
else \
echo "FCFLAGS += -DMATHEVALUNAVAIL" > ./work/build/Makefile_Config_MathEval ; \
echo "CPPFLAGS += -DMATHEVALUNAVAIL" >> ./work/build/Makefile_Config_MathEval ; \
fi
/opt/local/bin/g++ -c source/ann_config.cpp -o ./work/build/ann_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DANNAVAIL" > ./work/build/Makefile_Config_ANN ; \
echo "CPPFLAGS += -DANNAVAIL" >> ./work/build/Makefile_Config_ANN ; \
else \
echo "FCFLAGS += -DANNUNAVAIL" > ./work/build/Makefile_Config_ANN ; \
echo "CPPFLAGS += -DANNUNAVAIL" >> ./work/build/Makefile_Config_ANN ; \
fi
/opt/local/bin/gfortran -c source/fftw3_config.F90 -o ./work/build/fftw3_config.o -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/lib/gfortran/modules -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran/modules -fintrinsic-modules-path /opt/local/bin/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -fintrinsic-modules-path /usr/local/bin/include -g > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DFFTW3AVAIL" > ./work/build/Makefile_Config_FFTW3 ; \
else \
echo "FCFLAGS += -DFFTW3UNAVAIL" > ./work/build/Makefile_Config_FFTW3 ; \
fi
/opt/local/bin/gcc -c source/flock_config.c -o ./work/build/flock_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DOFDAVAIL" > ./work/build/Makefile_Config_OFD ; \
echo "CFLAGS += -DOFDAVAIL" >> ./work/build/Makefile_Config_OFD ; \
echo "CPPFLAGS += -DOFDAVAIL" >> ./work/build/Makefile_Config_OFD ; \
else \
echo "FCFLAGS += -DOFDUNAVAIL" > ./work/build/Makefile_Config_OFD ; \
echo "CFLAGS += -DOFDUNAVAIL" >> ./work/build/Makefile_Config_OFD ; \
echo "CPPFLAGS += -DOFDUNAVAIL" >> ./work/build/Makefile_Config_OFD ; \
fi
./scripts/build/codeDirectivesParse.pl pwd
Use of uninitialized value $ENV{"GALACTICUS_EXEC_PATH"} in concatenation (.) or string at ./scripts/build/codeDirectivesParse.pl line 5.
Can't locate File/Changes.pm in @INC (you may need to install the File::Changes module) (@INC contains: /perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at ./scripts/build/codeDirectivesParse.pl line 9.
BEGIN failed--compilation aborted at ./scripts/build/codeDirectivesParse.pl line 9.
/opt/local/bin/gfortran source/hdf5FCInterop.F90 -o ./work/build/hdf5FCInterop.exe -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/lib/gfortran/modules -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran/modules -fintrinsic-modules-path /opt/local/bin/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -fintrinsic-modules-path /usr/local/bin/include -g -DOFDUNAVAIL -DFFTW3UNAVAIL -DANNUNAVAIL -DMATHEVALUNAVAIL
/opt/local/bin/gcc source/hdf5FCInteropC.c -o ./work/build/hdf5FCInteropC.exe -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -g -DOFDLOCKS -DOFDUNAVAIL
source/hdf5FCInteropC.c:3:10: fatal error: H5Tpublic.h: No such file or directory
3 | #include "H5Tpublic.h"
| ^~~~~
compilation terminated.
It looks like you still need to set GALACTICUS_EXEC_PATH
- did you try setting it using:
export GALACTICUS_EXEC_PATH=`pwd`
before you try compiling?
Also, it's missing further include paths. Try the following. First set INSTALL_PATH
to the path where you installed libraries (such as hdf5):
export INSTALL_PATH=/path/to/my/install
and then do:
export GALACTICUS_FCFLAGS="-fintrinsic-modules-path $INSTALL_PATH/finclude -fintrinsic-modules-path $INSTALL_PATH/include -fintrinsic-modules-path $INSTALL_PATH/include/gfortran -fintrinsic-modules-path $INSTALL_PATH/lib/gfortran/modules -L$INSTALL_PATH/lib -L$INSTALL_PATH/lib64"
export GALACTICUS_CFLAGS="-I$INSTALL_PATH/include"
export GALACTICUS_CPPFLAGS="-I$INSTALL_PATH/include"
If that doesn't solve the compilation problem let me know.
I have some of them in /opt/local/bin and some in /usr/local/bin how do I set the path in this situation?
Try:
export INSTALL_PATH1=/opt/local/bin
export INSTALL_PATH2=/usr/local/bin
export GALACTICUS_FCFLAGS="-fintrinsic-modules-path $INSTALL_PATH1/finclude -fintrinsic-modules-path $INSTALL_PATH1/include -fintrinsic-modules-path $INSTALL_PATH1/include/gfortran -fintrinsic-modules-path $INSTALL_PATH1/lib/gfortran/modules -L$INSTALL_PATH1/lib -L$INSTALL_PATH1/lib64 -fintrinsic-modules-path $INSTALL_PATH2/finclude -fintrinsic-modules-path $INSTALL_PATH2/include -fintrinsic-modules-path $INSTALL_PATH2/include/gfortran -fintrinsic-modules-path $INSTALL_PATH2/lib/gfortran/modules -L$INSTALL_PATH2/lib -L$INSTALL_PATH2/lib64"
export GALACTICUS_CFLAGS="-I$INSTALL_PATH1/include -I$INSTALL_PATH2/include"
export GALACTICUS_CPPFLAGS="-I$INSTALL_PATH1/include -I$INSTALL_PATH2/include"
Tried that but I still get the same error
Can you post the full output?
NABOO:galacticus sachi.wee$ sudo rm -rf work/build
NABOO:galacticus sachi.wee$ export GALACTICUS_EXEC_PATH=pwd
NABOO:galacticus sachi.wee$ export INSTALL_PATH1=/opt/local/bin
NABOO:galacticus sachi.wee$ export INSTALL_PATH2=/usr/local/bin
NABOO:galacticus sachi.wee$ export GALACTICUS_FCFLAGS="-fintrinsic-modules-path $INSTALL_PATH1/finclude -fintrinsic-modules-path $INSTALL_PATH1/include -fintrinsic-modules-path $INSTALL_PATH1/include/gfortran -fintrinsic-modules-path $INSTALL_PATH1/lib/gfortran/modules -L$INSTALL_PATH1/lib -L$INSTALL_PATH1/lib64 -fintrinsic-modules-path $INSTALL_PATH2/finclude -fintrinsic-modules-path $INSTALL_PATH2/include -fintrinsic-modules-path $INSTALL_PATH2/include/gfortran -fintrinsic-modules-path $INSTALL_PATH2/lib/gfortran/modules -L$INSTALL_PATH2/lib -L$INSTALL_PATH2/lib64"
NABOO:galacticus sachi.wee$ export GALACTICUS_CFLAGS="-I$INSTALL_PATH1/include -I$INSTALL_PATH2/include"
NABOO:galacticus sachi.wee$ export GALACTICUS_CPPFLAGS="-I$INSTALL_PATH1/include -I$INSTALL_PATH2/include"
NABOO:galacticus sachi.wee$ sudo make Galacticus.exe
./scripts/build/findExecutables.pl pwd
Use of uninitialized value $ENV{"GALACTICUS_EXEC_PATH"} in concatenation (.) or string at ./scripts/build/findExecutables.pl line 6.
./scripts/build/codeDirectivesParse.pl pwd
Use of uninitialized value $ENV{"GALACTICUS_EXEC_PATH"} in concatenation (.) or string at ./scripts/build/codeDirectivesParse.pl line 5.
Can't locate File/Changes.pm in @INC (you may need to install the File::Changes module) (@INC contains: /perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at ./scripts/build/codeDirectivesParse.pl line 9.
BEGIN failed--compilation aborted at ./scripts/build/codeDirectivesParse.pl line 9.
./scripts/build/includeDependencies.pl pwd
Use of uninitialized value $ENV{"GALACTICUS_EXEC_PATH"} in concatenation (.) or string at ./scripts/build/includeDependencies.pl line 5.
/opt/local/bin/g++ -c source/libmatheval_config.cpp -o ./work/build/libmatheval_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DMATHEVALAVAIL" > ./work/build/Makefile_Config_MathEval ; \
echo "CPPFLAGS += -DMATHEVALAVAIL" >> ./work/build/Makefile_Config_MathEval ; \
else \
echo "FCFLAGS += -DMATHEVALUNAVAIL" > ./work/build/Makefile_Config_MathEval ; \
echo "CPPFLAGS += -DMATHEVALUNAVAIL" >> ./work/build/Makefile_Config_MathEval ; \
fi
/opt/local/bin/g++ -c source/ann_config.cpp -o ./work/build/ann_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DANNAVAIL" > ./work/build/Makefile_Config_ANN ; \
echo "CPPFLAGS += -DANNAVAIL" >> ./work/build/Makefile_Config_ANN ; \
else \
echo "FCFLAGS += -DANNUNAVAIL" > ./work/build/Makefile_Config_ANN ; \
echo "CPPFLAGS += -DANNUNAVAIL" >> ./work/build/Makefile_Config_ANN ; \
fi
/opt/local/bin/gfortran -c source/fftw3_config.F90 -o ./work/build/fftw3_config.o -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/lib/gfortran/modules -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran/modules -fintrinsic-modules-path /opt/local/bin/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -fintrinsic-modules-path /usr/local/bin/include -g > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DFFTW3AVAIL" > ./work/build/Makefile_Config_FFTW3 ; \
else \
echo "FCFLAGS += -DFFTW3UNAVAIL" > ./work/build/Makefile_Config_FFTW3 ; \
fi
/opt/local/bin/gcc -c source/flock_config.c -o ./work/build/flock_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DOFDAVAIL" > ./work/build/Makefile_Config_OFD ; \
echo "CFLAGS += -DOFDAVAIL" >> ./work/build/Makefile_Config_OFD ; \
echo "CPPFLAGS += -DOFDAVAIL" >> ./work/build/Makefile_Config_OFD ; \
else \
echo "FCFLAGS += -DOFDUNAVAIL" > ./work/build/Makefile_Config_OFD ; \
echo "CFLAGS += -DOFDUNAVAIL" >> ./work/build/Makefile_Config_OFD ; \
echo "CPPFLAGS += -DOFDUNAVAIL" >> ./work/build/Makefile_Config_OFD ; \
fi
./scripts/build/codeDirectivesParse.pl pwd
Use of uninitialized value $ENV{"GALACTICUS_EXEC_PATH"} in concatenation (.) or string at ./scripts/build/codeDirectivesParse.pl line 5.
Can't locate File/Changes.pm in @INC (you may need to install the File::Changes module) (@INC contains: /perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at ./scripts/build/codeDirectivesParse.pl line 9.
BEGIN failed--compilation aborted at ./scripts/build/codeDirectivesParse.pl line 9.
/opt/local/bin/gfortran source/hdf5FCInterop.F90 -o ./work/build/hdf5FCInterop.exe -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/lib/gfortran/modules -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran/modules -fintrinsic-modules-path /opt/local/bin/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -fintrinsic-modules-path /usr/local/bin/include -g -DOFDUNAVAIL -DFFTW3UNAVAIL -DANNUNAVAIL -DMATHEVALUNAVAIL
/opt/local/bin/gcc source/hdf5FCInteropC.c -o ./work/build/hdf5FCInteropC.exe -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -g -DOFDLOCKS -DOFDUNAVAIL
source/hdf5FCInteropC.c:3:10: fatal error: H5Tpublic.h: No such file or directory
3 | #include "H5Tpublic.h"
| ^~~~~
compilation terminated.
make: *** [work/build/hdf5FCInteropC.exe] Error 1
NABOO:galacticus sachi.wee$
It may be because you're running make as sudo
. I'd suggest putting all of the commands into a script, called buildGalacticus.sh
like this:
#!/bin/sh
export GALACTICUS_EXEC_PATH=pwd
export INSTALL_PATH1=/opt/local/bin
export INSTALL_PATH2=/usr/local/bin
export GALACTICUS_FCFLAGS="-fintrinsic-modules-path $INSTALL_PATH1/finclude -fintrinsic-modules-path $INSTALL_PATH1/include -fintrinsic-modules-path $INSTALL_PATH1/include/gfortran -fintrinsic-modules-path $INSTALL_PATH1/lib/gfortran/modules -L$INSTALL_PATH1/lib -L$INSTALL_PATH1/lib64 -fintrinsic-modules-path $INSTALL_PATH2/finclude -fintrinsic-modules-path $INSTALL_PATH2/include -fintrinsic-modules-path $INSTALL_PATH2/include/gfortran -fintrinsic-modules-path $INSTALL_PATH2/lib/gfortran/modules -L$INSTALL_PATH2/lib -L$INSTALL_PATH2/lib64"
export GALACTICUS_CFLAGS="-I$INSTALL_PATH1/include -I$INSTALL_PATH2/include"
export GALACTICUS_CPPFLAGS="-I$INSTALL_PATH1/include -I$INSTALL_PATH2/include"
make Galacticus.exe
make the script executable:
chmod u=wrx buildGalacticus.sh
and then run the script as sudo
:
sudo ./buildGalacticus.sh
and see if that works.
Some progress. A different error this time. But lib64 doesn't exist in either of the paths
sudo ./buildGalacticus.sh
./scripts/build/findExecutables.pl pwd
./scripts/build/codeDirectivesParse.pl pwd
Can't locate File/Changes.pm in @INC (you may need to install the File::Changes module) (@INC contains: pwd/perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at ./scripts/build/codeDirectivesParse.pl line 9.
BEGIN failed--compilation aborted at ./scripts/build/codeDirectivesParse.pl line 9.
./scripts/build/includeDependencies.pl pwd
/opt/local/bin/g++ -c source/libmatheval_config.cpp -o ./work/build/libmatheval_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -I/opt/local/bin/include -I/usr/local/bin/include -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DMATHEVALAVAIL" > ./work/build/Makefile_Config_MathEval ; \
echo "CPPFLAGS += -DMATHEVALAVAIL" >> ./work/build/Makefile_Config_MathEval ; \
else \
echo "FCFLAGS += -DMATHEVALUNAVAIL" > ./work/build/Makefile_Config_MathEval ; \
echo "CPPFLAGS += -DMATHEVALUNAVAIL" >> ./work/build/Makefile_Config_MathEval ; \
fi
/opt/local/bin/g++ -c source/ann_config.cpp -o ./work/build/ann_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -I/opt/local/bin/include -I/usr/local/bin/include -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DANNAVAIL" > ./work/build/Makefile_Config_ANN ; \
echo "CPPFLAGS += -DANNAVAIL" >> ./work/build/Makefile_Config_ANN ; \
else \
echo "FCFLAGS += -DANNUNAVAIL" > ./work/build/Makefile_Config_ANN ; \
echo "CPPFLAGS += -DANNUNAVAIL" >> ./work/build/Makefile_Config_ANN ; \
fi
/opt/local/bin/gfortran -c source/fftw3_config.F90 -o ./work/build/fftw3_config.o -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/bin/finclude -fintrinsic-modules-path /opt/local/bin/include -fintrinsic-modules-path /opt/local/bin/include/gfortran -fintrinsic-modules-path /opt/local/bin/lib/gfortran/modules -L/opt/local/bin/lib -L/opt/local/bin/lib64 -fintrinsic-modules-path /usr/local/bin/finclude -fintrinsic-modules-path /usr/local/bin/include -fintrinsic-modules-path /usr/local/bin/include/gfortran -fintrinsic-modules-path /usr/local/bin/lib/gfortran/modules -L/usr/local/bin/lib -L/usr/local/bin/lib64 -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/lib/gfortran/modules -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran/modules -fintrinsic-modules-path /opt/local/bin/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -fintrinsic-modules-path /usr/local/bin/include -g > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DFFTW3AVAIL" > ./work/build/Makefile_Config_FFTW3 ; \
else \
echo "FCFLAGS += -DFFTW3UNAVAIL" > ./work/build/Makefile_Config_FFTW3 ; \
fi
/opt/local/bin/gcc -c source/flock_config.c -o ./work/build/flock_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -I/opt/local/bin/include -I/usr/local/bin/include -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DOFDAVAIL" > ./work/build/Makefile_Config_OFD ; \
echo "CFLAGS += -DOFDAVAIL" >> ./work/build/Makefile_Config_OFD ; \
echo "CPPFLAGS += -DOFDAVAIL" >> ./work/build/Makefile_Config_OFD ; \
else \
echo "FCFLAGS += -DOFDUNAVAIL" > ./work/build/Makefile_Config_OFD ; \
echo "CFLAGS += -DOFDUNAVAIL" >> ./work/build/Makefile_Config_OFD ; \
echo "CPPFLAGS += -DOFDUNAVAIL" >> ./work/build/Makefile_Config_OFD ; \
fi
./scripts/build/codeDirectivesParse.pl pwd
Can't locate File/Changes.pm in @INC (you may need to install the File::Changes module) (@INC contains: pwd/perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at ./scripts/build/codeDirectivesParse.pl line 9.
BEGIN failed--compilation aborted at ./scripts/build/codeDirectivesParse.pl line 9.
/opt/local/bin/gfortran source/hdf5FCInterop.F90 -o ./work/build/hdf5FCInterop.exe -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/bin/finclude -fintrinsic-modules-path /opt/local/bin/include -fintrinsic-modules-path /opt/local/bin/include/gfortran -fintrinsic-modules-path /opt/local/bin/lib/gfortran/modules -L/opt/local/bin/lib -L/opt/local/bin/lib64 -fintrinsic-modules-path /usr/local/bin/finclude -fintrinsic-modules-path /usr/local/bin/include -fintrinsic-modules-path /usr/local/bin/include/gfortran -fintrinsic-modules-path /usr/local/bin/lib/gfortran/modules -L/usr/local/bin/lib -L/usr/local/bin/lib64 -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/lib/gfortran/modules -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran/modules -fintrinsic-modules-path /opt/local/bin/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -fintrinsic-modules-path /usr/local/bin/include -g -DOFDUNAVAIL -DFFTW3UNAVAIL -DANNUNAVAIL -DMATHEVALUNAVAIL
ld: warning: directory not found for option '-L/opt/local/bin/lib64'
ld: warning: directory not found for option '-L/usr/local/bin/lib64'
/opt/local/bin/gcc source/hdf5FCInteropC.c -o ./work/build/hdf5FCInteropC.exe -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -I/opt/local/bin/include -I/usr/local/bin/include -g -DOFDLOCKS -DOFDUNAVAIL
./work/build/hdf5FCInterop.exe > ./work/build/hdf5FCInterop.dat
./work/build/hdf5FCInteropC.exe >> ./work/build/hdf5FCInterop.dat
./scripts/build/enumerateOpenMPCriticalSections.pl pwd
Can't locate Fortran/Utils.pm in @INC (you may need to install the Fortran::Utils module) (@INC contains: pwd/perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at ./scripts/build/enumerateOpenMPCriticalSections.pl line 7.
BEGIN failed--compilation aborted at ./scripts/build/enumerateOpenMPCriticalSections.pl line 7.
make: *** [work/build/openMPCriticalSections.xml] Error 2
It looks like your command to set GALACTICUS_EXEC_PATH
isn't working as intended - it needs to be:
export GALACTICUS_EXEC_PATH=`pwd`
using backticks, not single quotes.
Alternatively, just use pwd
to show you the current path where you're building Galacticus, and then change the command in your script to:
export GALACTICUS_EXEC_PATH=XYZ
replaceing XYZ
with the output from the pwd
command.
Now I get this error. But I have Sort::Topological installed
sudo ./buildGalacticus.sh
./scripts/build/findExecutables.pl pwd
./scripts/build/codeDirectivesParse.pl pwd
./scripts/build/stateStorables.pl pwd
Can't locate Sort/Topological.pm in @INC (you may need to install the Sort::Topological module) (@INC contains: /Users/sachi.wee/galacticus/perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree/Process/FunctionClass.pm line 11.
BEGIN failed--compilation aborted at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree/Process/FunctionClass.pm line 11.
Compilation failed in require at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree.pm line 21.
BEGIN failed--compilation aborted at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree.pm line 21.
Compilation failed in require at ./scripts/build/stateStorables.pl line 8.
BEGIN failed--compilation aborted at ./scripts/build/stateStorables.pl line 8.
./scripts/build/includeDependencies.pl pwd
/opt/local/bin/g++ -c source/libmatheval_config.cpp -o ./work/build/libmatheval_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -I/opt/local/bin/include -I/usr/local/bin/include -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DMATHEVALAVAIL" > ./work/build/Makefile_Config_MathEval ; \
echo "CPPFLAGS += -DMATHEVALAVAIL" >> ./work/build/Makefile_Config_MathEval ; \
else \
echo "FCFLAGS += -DMATHEVALUNAVAIL" > ./work/build/Makefile_Config_MathEval ; \
echo "CPPFLAGS += -DMATHEVALUNAVAIL" >> ./work/build/Makefile_Config_MathEval ; \
fi
/opt/local/bin/g++ -c source/ann_config.cpp -o ./work/build/ann_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -I/opt/local/bin/include -I/usr/local/bin/include -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DANNAVAIL" > ./work/build/Makefile_Config_ANN ; \
echo "CPPFLAGS += -DANNAVAIL" >> ./work/build/Makefile_Config_ANN ; \
else \
echo "FCFLAGS += -DANNUNAVAIL" > ./work/build/Makefile_Config_ANN ; \
echo "CPPFLAGS += -DANNUNAVAIL" >> ./work/build/Makefile_Config_ANN ; \
fi
/opt/local/bin/gfortran -c source/fftw3_config.F90 -o ./work/build/fftw3_config.o -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/bin/finclude -fintrinsic-modules-path /opt/local/bin/include -fintrinsic-modules-path /opt/local/bin/include/gfortran -fintrinsic-modules-path /opt/local/bin/lib/gfortran/modules -L/opt/local/bin/lib -L/opt/local/bin/lib64 -fintrinsic-modules-path /usr/local/bin/finclude -fintrinsic-modules-path /usr/local/bin/include -fintrinsic-modules-path /usr/local/bin/include/gfortran -fintrinsic-modules-path /usr/local/bin/lib/gfortran/modules -L/usr/local/bin/lib -L/usr/local/bin/lib64 -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/lib/gfortran/modules -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran/modules -fintrinsic-modules-path /opt/local/bin/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -fintrinsic-modules-path /usr/local/bin/include -g > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DFFTW3AVAIL" > ./work/build/Makefile_Config_FFTW3 ; \
else \
echo "FCFLAGS += -DFFTW3UNAVAIL" > ./work/build/Makefile_Config_FFTW3 ; \
fi
/opt/local/bin/gcc -c source/flock_config.c -o ./work/build/flock_config.o -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -I/opt/local/bin/include -I/usr/local/bin/include -g -DOFDLOCKS > /dev/null 2>&1 ; \
if [ $? -eq 0 ] ; then \
echo "FCFLAGS += -DOFDAVAIL" > ./work/build/Makefile_Config_OFD ; \
echo "CFLAGS += -DOFDAVAIL" >> ./work/build/Makefile_Config_OFD ; \
echo "CPPFLAGS += -DOFDAVAIL" >> ./work/build/Makefile_Config_OFD ; \
else \
echo "FCFLAGS += -DOFDUNAVAIL" > ./work/build/Makefile_Config_OFD ; \
echo "CFLAGS += -DOFDUNAVAIL" >> ./work/build/Makefile_Config_OFD ; \
echo "CPPFLAGS += -DOFDUNAVAIL" >> ./work/build/Makefile_Config_OFD ; \
fi
/opt/local/bin/gfortran source/hdf5FCInterop.F90 -o ./work/build/hdf5FCInterop.exe -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/bin/finclude -fintrinsic-modules-path /opt/local/bin/include -fintrinsic-modules-path /opt/local/bin/include/gfortran -fintrinsic-modules-path /opt/local/bin/lib/gfortran/modules -L/opt/local/bin/lib -L/opt/local/bin/lib64 -fintrinsic-modules-path /usr/local/bin/finclude -fintrinsic-modules-path /usr/local/bin/include -fintrinsic-modules-path /usr/local/bin/include/gfortran -fintrinsic-modules-path /usr/local/bin/lib/gfortran/modules -L/usr/local/bin/lib -L/usr/local/bin/lib64 -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/lib/gfortran/modules -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran/modules -fintrinsic-modules-path /opt/local/bin/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -fintrinsic-modules-path /usr/local/bin/include -g -DOFDUNAVAIL -DFFTW3UNAVAIL -DANNUNAVAIL -DMATHEVALUNAVAIL
ld: warning: directory not found for option '-L/opt/local/bin/lib64'
ld: warning: directory not found for option '-L/usr/local/bin/lib64'
/opt/local/bin/gcc source/hdf5FCInteropC.c -o ./work/build/hdf5FCInteropC.exe -DBUILDPATH=\'./work/build\' -I./source/ -I./work/build/ -fopenmp -I/opt/local/bin/include -I/usr/local/bin/include -g -DOFDLOCKS -DOFDUNAVAIL
./work/build/hdf5FCInterop.exe > ./work/build/hdf5FCInterop.dat
./work/build/hdf5FCInteropC.exe >> ./work/build/hdf5FCInterop.dat
./scripts/build/enumerateOpenMPCriticalSections.pl pwd
./scripts/build/buildCode.pl /Users/sachi.wee/galacticus ./work/build/radiusSolverEnclosedMassTask.functionCall.xml
Can't locate Sort/Topological.pm in @INC (you may need to install the Sort::Topological module) (@INC contains: /Users/sachi.wee/galacticus/perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at /Users/sachi.wee/galacticus/perl/Galacticus/Build/Dependencies.pm line 9.
BEGIN failed--compilation aborted at /Users/sachi.wee/galacticus/perl/Galacticus/Build/Dependencies.pm line 9.
Compilation failed in require at /Users/sachi.wee/galacticus/perl/Galacticus/Build/FunctionCall.pm line 12.
BEGIN failed--compilation aborted at /Users/sachi.wee/galacticus/perl/Galacticus/Build/FunctionCall.pm line 12.
Compilation failed in require at ./scripts/build/buildCode.pl line 18.
BEGIN failed--compilation aborted at ./scripts/build/buildCode.pl line 18.
./scripts/build/buildCode.pl /Users/sachi.wee/galacticus ./work/build/component.component.xml
Can't locate Sort/Topological.pm in @INC (you may need to install the Sort::Topological module) (@INC contains: /Users/sachi.wee/galacticus/perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at /Users/sachi.wee/galacticus/perl/Galacticus/Build/Dependencies.pm line 9.
BEGIN failed--compilation aborted at /Users/sachi.wee/galacticus/perl/Galacticus/Build/Dependencies.pm line 9.
Compilation failed in require at /Users/sachi.wee/galacticus/perl/Galacticus/Build/FunctionCall.pm line 12.
BEGIN failed--compilation aborted at /Users/sachi.wee/galacticus/perl/Galacticus/Build/FunctionCall.pm line 12.
Compilation failed in require at ./scripts/build/buildCode.pl line 18.
BEGIN failed--compilation aborted at ./scripts/build/buildCode.pl line 18.
./scripts/build/moduleDependencies.pl pwd
Can't locate Sort/Topological.pm in @INC (you may need to install the Sort::Topological module) (@INC contains: /Users/sachi.wee/galacticus/perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree/Process/FunctionClass.pm line 11.
BEGIN failed--compilation aborted at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree/Process/FunctionClass.pm line 11.
Compilation failed in require at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree.pm line 21.
BEGIN failed--compilation aborted at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree.pm line 21.
Compilation failed in require at ./scripts/build/moduleDependencies.pl line 9.
BEGIN failed--compilation aborted at ./scripts/build/moduleDependencies.pl line 9.
./scripts/build/preprocess.pl source/Galacticus.F90 ./work/build/Galacticus.p.F90
Can't locate Sort/Topological.pm in @INC (you may need to install the Sort::Topological module) (@INC contains: /Users/sachi.wee/galacticus/perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree/Process/FunctionClass.pm line 11.
BEGIN failed--compilation aborted at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree/Process/FunctionClass.pm line 11.
Compilation failed in require at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree.pm line 21.
BEGIN failed--compilation aborted at /Users/sachi.wee/galacticus/perl/Galacticus/Build/SourceTree.pm line 21.
Compilation failed in require at ./scripts/build/preprocess.pl line 6.
BEGIN failed--compilation aborted at ./scripts/build/preprocess.pl line 6.
make: *** [work/build/Galacticus.p.F90.up] Error 2
NABOO:galacticus sachi.wee$ which perl
/opt/local/bin/perl
NABOO:galacticus sachi.wee$ sudo perl -e Sort::Topological
NABOO:galacticus sachi.wee$
Where do you have Sort::Topological
installed? You probably need to add the relevant path to the PERL5LIB
variable.
I am not sure about the path. But I installed perl through MacPorts and used CPAN to install the modules
Ok, so we need to know where CPAN installed the module. Did you run CPAN as sudo
or as a regular user?
You could try something like
find /usr/local -name="Topological.pm"
to see if the module is installed anywhere under /use/local
for example.
I ran as sudo. I get this error find: -name=Topological.pm: unknown primary or operator
Ok, try
find /usr/local -name="Topological.pm"
and see if it finds Topological.pm
If not, try the same command with just /usr
and with /opt
I get the same error for both
find /usr/local -name="Topological.pm" find: -name=Topological.pm: unknown primary or operator NABOO:galacticus sachi.wee$ find /opt/local -name="Topological.pm" find: -name=Topological.pm: unknown primary or operator
My mistake, there should be no =
after -name
, just a space.
find /usr/local -name "Topological.pm" NABOO:galacticus sachi.wee$ find /opt/local -name "Topological.pm" NABOO:galacticus sachi.wee$ No output from that either
Interesting!
Can you try installing Sort:: Topological
again and post the output?
sudo perl -MCPAN -e 'install(Sort::Topological)' Password: Reading '/Users/sachi.wee/.cpan/Metadata' Database was generated on Fri, 10 Apr 2020 16:55:39 GMT Running install for module 'Sort::Topological' Checksum for /Users/sachi.wee/.cpan/sources/authors/id/K/KS/KSTEPHENS/Data-Match-0.06.tar.gz ok Configuring K/KS/KSTEPHENS/Data-Match-0.06.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Data::Match Writing MYMETA.yml and MYMETA.json KSTEPHENS/Data-Match-0.06.tar.gz /opt/local/bin/perl5.28 Makefile.PL -- OK Running make for K/KS/KSTEPHENS/Data-Match-0.06.tar.gz cp Match.pm blib/lib/Data/Match.pm cp lib/Sort/Topological.pm blib/lib/Sort/Topological.pm Manifying 2 pod documents KSTEPHENS/Data-Match-0.06.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 "/opt/local/bin/perl5.28" "-Iblib/lib" "-Iblib/arch" test.pl 1..1
Can't use an array as a reference at blib/lib/Data/Match.pm line 968. Compilation failed in require at test.pl line 10. BEGIN failed--compilation aborted at test.pl line 10. make: *** [test_dynamic] Error 255 KSTEPHENS/Data-Match-0.06.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports KSTEPHENS/Data-Match-0.06.tar.gz
Ok, this is a known problem with Sort:: Topological
which is causing it to fail to install. Can you try:
sudo perl -MCPAN -e 'force("install","Sort:: Topological")
and then post the output here.
Reading '/Users/sachi.wee/.cpan/Metadata' Database was generated on Fri, 10 Apr 2020 16:55:39 GMT Running install for module 'Sort::Topological' Checksum for /Users/sachi.wee/.cpan/sources/authors/id/K/KS/KSTEPHENS/Data-Match-0.06.tar.gz ok Configuring K/KS/KSTEPHENS/Data-Match-0.06.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Data::Match Writing MYMETA.yml and MYMETA.json KSTEPHENS/Data-Match-0.06.tar.gz /opt/local/bin/perl5.28 Makefile.PL -- OK Running make for K/KS/KSTEPHENS/Data-Match-0.06.tar.gz cp lib/Sort/Topological.pm blib/lib/Sort/Topological.pm cp Match.pm blib/lib/Data/Match.pm Manifying 2 pod documents KSTEPHENS/Data-Match-0.06.tar.gz /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 "/opt/local/bin/perl5.28" "-Iblib/lib" "-Iblib/arch" test.pl 1..1
Can't use an array as a reference at blib/lib/Data/Match.pm line 968. Compilation failed in require at test.pl line 10. BEGIN failed--compilation aborted at test.pl line 10. make: *** [test_dynamic] Error 255 KSTEPHENS/Data-Match-0.06.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports KSTEPHENS/Data-Match-0.06.tar.gz Running make install Manifying 2 pod documents Installing /opt/local/lib/perl5/site_perl/5.28/Sort/Topological.pm Installing /opt/local/lib/perl5/site_perl/5.28/Data/Match.pm Installing /opt/local/share/perl5.28/siteman/man3/Sort::Topological.3pm Installing /opt/local/share/perl5.28/siteman/man3/Data::Match.3pm Appending installation info to /opt/local/lib/perl5/5.28/darwin-thread-multi-2level/perllocal.pod KSTEPHENS/Data-Match-0.06.tar.gz sudo /usr/bin/make install -- OK
Ok looks like it installed ok. Try compiling Galacticus again now. It will probably take at least 1 hour to build.
looks like its compiling now. Thank you so much!
Great! Let me know if it succeeds.
there was another error
/opt/local/bin/gfortran -c ./work/build/structure_formation.spherical_collapse.solver.collisionlessMatter_darkEnergy.p.F90 -o ./work/build/structure_formation.spherical_collapse.solver.collisionlessMatter_darkEnergy.o -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/bin/finclude -fintrinsic-modules-path /opt/local/bin/include -fintrinsic-modules-path /opt/local/bin/include/gfortran -fintrinsic-modules-path /opt/local/bin/lib/gfortran/modules -L/opt/local/bin/lib -L/opt/local/bin/lib64 -fintrinsic-modules-path /usr/local/bin/finclude -fintrinsic-modules-path /usr/local/bin/include -fintrinsic-modules-path /usr/local/bin/include/gfortran -fintrinsic-modules-path /usr/local/bin/lib/gfortran/modules -L/usr/local/bin/lib -L/usr/local/bin/lib64 -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/lib/gfortran/modules -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran/modules -fintrinsic-modules-path /opt/local/bin/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -fintrinsic-modules-path /usr/local/bin/include -g -DOFDUNAVAIL -DFFTW3UNAVAIL -DANNUNAVAIL -DMATHEVALUNAVAIL 2>&1 | ./scripts/build/postprocess.pl ./work/build/structure_formation.spherical_collapse.solver.collisionlessMatter_darkEnergy.p.F90 /opt/local/bin/gfortran -c ./work/build/structure_formation.spherical_collapse.solver.baryons_darkMatter_darkEnergy.p.F90 -o ./work/build/structure_formation.spherical_collapse.solver.baryons_darkMatter_darkEnergy.o -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/bin/finclude -fintrinsic-modules-path /opt/local/bin/include -fintrinsic-modules-path /opt/local/bin/include/gfortran -fintrinsic-modules-path /opt/local/bin/lib/gfortran/modules -L/opt/local/bin/lib -L/opt/local/bin/lib64 -fintrinsic-modules-path /usr/local/bin/finclude -fintrinsic-modules-path /usr/local/bin/include -fintrinsic-modules-path /usr/local/bin/include/gfortran -fintrinsic-modules-path /usr/local/bin/lib/gfortran/modules -L/usr/local/bin/lib -L/usr/local/bin/lib64 -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/lib/gfortran/modules -fintrinsic-modules-path /opt/local/include/gfortran -fintrinsic-modules-path /opt/local/include -fintrinsic-modules-path /opt/local/finclude -fintrinsic-modules-path /opt/local/include/gfortran/modules -fintrinsic-modules-path /opt/local/bin/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -fintrinsic-modules-path /usr/local/bin/include -g -DOFDUNAVAIL -DFFTW3UNAVAIL -DANNUNAVAIL -DMATHEVALUNAVAIL 2>&1 | ./scripts/build/postprocess.pl ./work/build/structure_formation.spherical_collapse.solver.baryons_darkMatter_darkEnergy.p.F90 f951: internal compiler error: Segmentation fault: 11 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source if appropriate. See https://trac.macports.org/newticket for instructions. mv: rename ./work/build/moduleBuild/spherical_collapsesolvers@sphericalcollapsesolverbaryonsdarkmatterdarkenergy.smod to ./work/build/spherical_collapsesolvers@sphericalcollapsesolverbaryonsdarkmatterdarkenergy.smod: No such file or directory make: *** [work/build/structure_formation.spherical_collapse.solver.baryons_darkMatter_darkEnergy.o] Error 1
Can you post the output of
gfortran -v
NABOO:galacticus sachi.wee$ gfortran -v Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/10.0.1/lto-wrapper Target: x86_64-apple-darwin18 Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc10/gcc10/work/gcc-10-20200301/configure --prefix=/opt/local --build=x86_64-apple-darwin18 --enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc10 --includedir=/opt/local/include/gcc10 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-10 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-10 --with-gxx-include-dir=/opt/local/include/gcc10/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-tls --with-pkgversion='MacPorts gcc10 10-20200301_0' --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.0.1 20200301 (experimental) (MacPorts gcc10 10-20200301_0)
I think you'll need to try compiling a slightly older version of Galacticus that your compiler will support.
Assuming you cloned Galacticus using git you should try
git checkout 1960750cbb07ecd29e1717126b800e905233721a
and then try recompiling.
Yes I cloned Galacticus using git. Tried git checkout and waiting for it to compile now. Hopefully this works!
another error....
./scripts/build/preprocess.pl source/utility.IO.XML.F90 ./work/build/utility.IO.XML.p.F90 gfortran -c ./work/build/utility.IO.XML.p.F90 -o ./work/build/utility.IO.XML.o -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/bin/finclude -fintrinsic-modules-path /opt/local/bin/include -fintrinsic-modules-path /opt/local/bin/include/gfortran -fintrinsic-modules-path /opt/local/bin/lib/gfortran/modules -L/opt/local/bin/lib -L/opt/local/bin/lib64 -fintrinsic-modules-path /usr/local/bin/finclude -fintrinsic-modules-path /usr/local/bin/include -fintrinsic-modules-path /usr/local/bin/include/gfortran -fintrinsic-modules-path /usr/local/bin/lib/gfortran/modules -L/usr/local/bin/lib -L/usr/local/bin/lib64 -fintrinsic-modules-path /usr/local/finclude -fintrinsic-modules-path /usr/local/include/gfortran -fintrinsic-modules-path /usr/local/include -fintrinsic-modules-path /usr/lib/gfortran/modules -fintrinsic-modules-path /usr/include/gfortran -fintrinsic-modules-path /usr/include -fintrinsic-modules-path /usr/finclude -fintrinsic-modules-path /usr/lib64/gfortran/modules -fintrinsic-modules-path /usr/lib64/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -g -DOFDUNAVAIL -DFFTW3UNAVAIL -DANNUNAVAIL -DMATHEVALUNAVAIL 2>&1 | ./scripts/build/postprocess.pl ./work/build/utility.IO.XML.p.F90 source/utility.IO.XML.F90:26:9
29 | use :: FoX_dom , only : node | 1 Fatal Error: Cannot open module file 'fox_dom.mod' for reading at (1): No such file or directory compilation terminated. mv: rename ./work/build/moduleBuild/io_xml.mod to ./work/build/io_xml.mod: No such file or directory make: *** [work/build/utility.IO.XML.o] Error 1
Actually I might have a different version of FoX. Trying to install the version in the GitHub page and compile Galacticus again
Well another error
gfortran -c ./work/build/structure_formation.spherical_collapse.solver.baryons_darkMatter_darkEnergy.p.F90 -o ./work/build/structure_formation.spherical_collapse.solver.baryons_darkMatter_darkEnergy.o -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/bin/finclude -fintrinsic-modules-path /opt/local/bin/include -fintrinsic-modules-path /opt/local/bin/include/gfortran -fintrinsic-modules-path /opt/local/bin/lib/gfortran/modules -L/opt/local/bin/lib -L/opt/local/bin/lib64 -fintrinsic-modules-path /usr/local/bin/finclude -fintrinsic-modules-path /usr/local/bin/include -fintrinsic-modules-path /usr/local/bin/include/gfortran -fintrinsic-modules-path /usr/local/bin/lib/gfortran/modules -L/usr/local/bin/lib -L/usr/local/bin/lib64 -fintrinsic-modules-path /usr/local/finclude -fintrinsic-modules-path /usr/local/include/gfortran -fintrinsic-modules-path /usr/local/include -fintrinsic-modules-path /usr/lib/gfortran/modules -fintrinsic-modules-path /usr/include/gfortran -fintrinsic-modules-path /usr/include -fintrinsic-modules-path /usr/finclude -fintrinsic-modules-path /usr/lib64/gfortran/modules -fintrinsic-modules-path /usr/lib64/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -g -DOFDUNAVAIL -DFFTW3UNAVAIL -DANNUNAVAIL -DMATHEVALUNAVAIL 2>&1 | ./scripts/build/postprocess.pl ./work/build/structure_formation.spherical_collapse.solver.baryons_darkMatter_darkEnergy.p.F90 f951: internal compiler error: Segmentation fault: 11 libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source if appropriate. See https://trac.macports.org/newticket for instructions. mv: rename ./work/build/moduleBuild/spherical_collapsesolvers@sphericalcollapsesolverbaryonsdarkmatterdarkenergy.smod to ./work/build/spherical_collapsesolvers@sphericalcollapsesolverbaryonsdarkmatterdarkenergy.smod: No such file or directory make: *** [work/build/structure_formation.spherical_collapse.solver.baryons_darkMatter_darkEnergy.o] Error 1
It's difficult to know for to fix this as there's no useful error message given.
You could try using this revision of Galacticus and see if it works:
git checkout 304dbe0a7445f80a03d196bb685232d0b00a0057
What's happening here is that your compiler is crashing. But I can't tell why as there's no error message. So I'm trying to see if we can find an earlier version of Galacticus where it doesn't crash.
Oh ok. I will try this and see
That didn't work either
galacticus.output.version.revision.inc:3:42:
Error: Symbol 'gitbranch' at (1) already has basic type of CHARACTER source/galacticus.output.version.F90:87:51
114 | call versionGroup%writeAttribute(trim(buildTime),'buildTime') | 1 Error: Symbol 'buildtime' at (1) has no IMPLICIT type; did you mean 'runtime'? source/galacticus.output.version.F90:53:124
73 | Galacticus_Version_String=var_str("revision ")//gitHash//" (branch: "//trim(gitBranch)//"; build time: "//trim(buildTime)//")" | 1 Error: Symbol 'buildtime' at (1) has no IMPLICIT type source/galacticus.output.version.F90:42:56
56 | if (present(buildTime )) buildTime =trim(buildTime) | 1 Error: Symbol 'buildtime' at (1) has no IMPLICIT type; did you mean 'buildtime_'? source/galacticus.output.version.F90:87:21
114 | call versionGroup%writeAttribute(trim(buildTime),'buildTime') | 1 Error: Found no matching specific binding for the call to the GENERIC 'writeattribute' at (1) make: *** [work/build/galacticus.output.version.o] Error 1 rm work/build/objects.nodes.components.basic.non_evolving.bound_functions.Inc work/build/objects.nodes.components.basic.standard.bound_functions.Inc
Ok. Unfortunately I'm out of ideas. You could try other revisions of Galacticus and see if you can find a version that works.
If I can find time I'll see if I can install a Mac OS virtual machine and try installing it myself in there.
Ok. I will keep trying. Thank you very much for your help!
@sachiwee The error
Error: Symbol 'gitbranch' at (1) already has basic type of CHARACTER
seems to be a known issue with the Makefile, which has been resolved in the latest version. The problem is caused by an inappropriate treatment of the branch name when it starts with "*". Try to replace the following line in the Makefile
@if [ -f .git/refs/heads/master ] ; then git branch | awk '{print "character(len=128), parameter :: gitBranch=\""$$2"\""}' >> $(BUILDPATH)/galacticus.output.version.revision.inc; else printf 'character(len=128), parameter :: gitBranch="(unknown)"\n' >> $(BUILDPATH)/galacticus.output.version.revision.inc; fi
with
@if [ -f .git/refs/heads/master ] ; then git branch | awk '{if ($$1 == "*") print "character(len=128), parameter :: gitBranch=\""$$2"\""}' >> $(BUILDPATH)/galacticus.output.version.revision.inc; else printf 'character(len=128), parameter :: gitBranch="(unknown)"\n' >> $(BUILDPATH)/galacticus.output.version.revision.inc; fi
Then delete the build folder "./work" and recompile Galacticus. If it still does not compile successfully, I can try to install Galacticus on my mac and try if I can figure out what went wrong.
@Xiaolong-Du I tried that but now I get another error
gfortran -c source/fftw3_config.F90 -o ./work/build/fftw3_config.o -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/bin/finclude -fintrinsic-modules-path /opt/local/bin/include -fintrinsic-modules-path /opt/local/bin/include/gfortran -fintrinsic-modules-path /opt/local/bin/lib/gfortran/modules -L/opt/local/bin/lib -L/opt/local/bin/lib64 -fintrinsic-modules-path /usr/local/bin/finclude -fintrinsic-modules-path /usr/local/bin/include -fintrinsic-modules-path /usr/local/bin/include/gfortran -fintrinsic-modules-path /usr/local/bin/lib/gfortran/modules -L/usr/local/bin/lib -L/usr/local/bin/lib64 -fintrinsic-modules-path /usr/local/finclude -fintrinsic-modules-path /usr/local/include/gfortran -fintrinsic-modules-path /usr/local/include -fintrinsic-modules-path /usr/lib/gfortran/modules -fintrinsic-modules-path /usr/include/gfortran -fintrinsic-modules-path /usr/include -fintrinsic-modules-path /usr/finclude -fintrinsic-modules-path /usr/lib64/gfortran/modules -fintrinsic-modules-path /usr/lib64/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -g > /dev/null 2>&1 ; \ if [ $? -eq 0 ] ; then \ echo "FCFLAGS += -DFFTW3AVAIL" > ./work/build/Makefile_Config_FFTW3 ; \ else \ echo "FCFLAGS += -DFFTW3UNAVAIL" > ./work/build/Makefile_Config_FFTW3 ; \ fi gfortran source/hdf5FCInterop.F90 -o ./work/build/hdf5FCInterop.exe -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /opt/local/bin/finclude -fintrinsic-modules-path /opt/local/bin/include -fintrinsic-modules-path /opt/local/bin/include/gfortran -fintrinsic-modules-path /opt/local/bin/lib/gfortran/modules -L/opt/local/bin/lib -L/opt/local/bin/lib64 -fintrinsic-modules-path /usr/local/bin/finclude -fintrinsic-modules-path /usr/local/bin/include -fintrinsic-modules-path /usr/local/bin/include/gfortran -fintrinsic-modules-path /usr/local/bin/lib/gfortran/modules -L/usr/local/bin/lib -L/usr/local/bin/lib64 -fintrinsic-modules-path /usr/local/finclude -fintrinsic-modules-path /usr/local/include/gfortran -fintrinsic-modules-path /usr/local/include -fintrinsic-modules-path /usr/lib/gfortran/modules -fintrinsic-modules-path /usr/include/gfortran -fintrinsic-modules-path /usr/include -fintrinsic-modules-path /usr/finclude -fintrinsic-modules-path /usr/lib64/gfortran/modules -fintrinsic-modules-path /usr/lib64/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -g -DFFTW3UNAVAIL -DANNUNAVAIL -DMATHEVALUNAVAIL make: gfortran: No such file or directory
That's strange - it's been able to find gfortran before.
What does
which gfortran
show?
it doesn't return anything
Very strange. It seems to have lost where you installed gfortran. Maybe you need to reset your PATH variable to include the path to where you installed gfortran.
I aggreed with Andrew. You can try adding the directory where you install gcc to PATH.
PS. When you replace the line in the Makeifile as mentioned above, be careful that there might be preoblems with copying and pasting for some special characters. So instread of copy the whole line, just make the changes directly in the original file. Basically, the fix only add
if ($$1 == "*")
before
... print "character(len=128), parameter :: gitBranch=\""$$2"\""}' ...
there is another version of gcc in /usr/bin and seems to be in the path instead of the version in /opt/local/bin/gcc
Try
export PATH=/opt/local/bin:$PATH
and see if it can then find gfortran when you do
which gfortran
Hello, I get the following error while trying to compile. Could you please help me? Thank you very much!
./scripts/build/codeDirectivesParse.pl
pwd
Use of uninitialized value $ENV{"GALACTICUS_EXEC_PATH"} in concatenation (.) or string at ./scripts/build/codeDirectivesParse.pl line 5. Can't locate File/Changes.pm in @INC (you may need to install the File::Changes module) (@INC contains: /perl /opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.28 /opt/local/lib/perl5/vendor_perl/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.28 /opt/local/lib/perl5/5.28/darwin-thread-multi-2level /opt/local/lib/perl5/5.28) at ./scripts/build/codeDirectivesParse.pl line 9. BEGIN failed--compilation aborted at ./scripts/build/codeDirectivesParse.pl line 9. gfortran source/hdf5FCInterop.F90 -o ./work/build/hdf5FCInterop.exe -ffree-line-length-none -frecursive -DBUILDPATH=\'./work/build\' -J./work/build/moduleBuild/ -I./work/build/ -fintrinsic-modules-path /usr/local/finclude -fintrinsic-modules-path /usr/local/include/gfortran -fintrinsic-modules-path /usr/local/include -fintrinsic-modules-path /usr/lib/gfortran/modules -fintrinsic-modules-path /usr/include/gfortran -fintrinsic-modules-path /usr/include -fintrinsic-modules-path /usr/finclude -fintrinsic-modules-path /usr/lib64/gfortran/modules -fintrinsic-modules-path /usr/lib64/openmpi/lib -pthread -Wall -fbacktrace -ffpe-trap=invalid,zero,overflow -fdump-core -O3 -ffinite-math-only -fno-math-errno -fopenmp -g -DOFDUNAVAIL -DFFTW3UNAVAIL -DANNUNAVAIL -DMATHEVALUNAVAIL source/hdf5FCInterop.F90:28:20:28 | use :: HDF5 , only : hid_t, hsize_t, size_t | 1 Fatal Error: Cannot open module file 'hdf5.mod' for reading at (1): No such file or directory compilation terminated. make: *** [work/build/hdf5FCInterop.exe] Error 1