Beginners > Installation questions
PhreeqcRM compile error on MacOS
hjung:
Hi,
I got this error message when I compile the phreeqcrm library on mac.
**********************************
../src/RM_interface_F.cpp:253:11: error: ordered comparison between pointer and zero ('int *' and 'int')
if (l1 > 0 && *num > 0 && *num <= Reaction_module_ptr->GetComponentCount())
~~ ^ ~
1 error generated.
make[1]: *** [src/RM_interface_F.lo] Error 1
**********************************
After I made 'l1' to '*l1', it compiles but ends with the following comments.
**********************************
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libphreeqcrm.a(ChartHandler.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libphreeqcrm.a(ChartObject.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libphreeqcrm.a(CurveObject.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libphreeqcrm.a(ChartHandler.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libphreeqcrm.a(ChartObject.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: .libs/libphreeqcrm.a(CurveObject.o) has no symbols
**********************************
When I ran make check command, another error message pops up
**********************************
/Library/Developer/CommandLineTools/usr/bin/make test
CC advection_c.o
../../Tests/advection_c.c:4:10: fatal error: 'malloc.h' file not found
#include <malloc.h>
^~~~~~~~~~
1 error generated.
**********************************
Any suggestion?
Thanks,
hjung
dlparkhurst:
You are correct, it should be *i1 in that statement.
As for the rest of your errors, it looks like the compillation does not succeed.
Looks like you are running on Linux. What compiler are you using? Did you use configure to generate a Makefile?
hjung:
Thanks for the reply Dr. Parkhurst.
I did run configure ("../configure CXX=g++-7") and the following is the final result of the configure.
*************************************
Summary:
C++ Compiler = g++-7
CPPFLAGS =
CXXFLAGS = -g -O2
Fortran Compiler =
Fortran Libs =
LDFLAGS =
Enable OpenMP = yes
Enable MPI = no
*************************************
I'm running on macOS High Sierra version 10.13.3 and "g++-7 -v" command gives this result
*************************************
Using built-in specs.
COLLECT_GCC=g++-7
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/7.3.0/libexec/gcc/x86_64-apple-darwin17.3.0/7.3.0/lto-wrapper
Target: x86_64-apple-darwin17.3.0
Configured with: ../configure --build=x86_64-apple-darwin17.3.0 --prefix=/usr/local/Cellar/gcc/7.3.0 --libdir=/usr/local/Cellar/gcc/7.3.0/lib/gcc/7 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-7 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-checking=release --with-pkgversion='Homebrew GCC 7.3.0' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-nls
Thread model: posix
gcc version 7.3.0 (Homebrew GCC 7.3.0)
*************************************
dlparkhurst:
Try commenting out the include statements for malloc.h in advection_c.c and species_c.c.
Apparently, that header file is now deprecated and should be covered by stdlib.h.
hjung:
It seems working after commenting out the statements including malloc.h but now I have another problem.
I'm trying to couple the phreeqcrm library to a transport library, palabos.
running the following command
==============
mpicxx -o plamp_calcite plamp_calcite.o /Users/heewon/work/palabos-v2.0r0/lib/libplb_mpi.a -L/usr/local/lib -lphreeqcrm -v
==============
spits out this error message
==============
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
"/Library/Developer/CommandLineTools/usr/bin/ld" -demangle -lto_library /Library/Developer/CommandLineTools/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.13.0 -o plamp_calcite -L/usr/local/lib -L/usr/local/opt/libevent/lib -L/usr/local/Cellar/open-mpi/3.0.0_2/lib plamp_calcite.o /Users/heewon/work/palabos-v2.0r0/lib/libplb_mpi.a -lphreeqcrm -lmpi -lc++ -lSystem /Library/Developer/CommandLineTools/usr/lib/clang/9.0.0/lib/darwin/libclang_rt.osx.a
Undefined symbols for architecture x86_64:
"PhreeqcRM::PhreeqcRM(int, int, PHRQ_io*)", referenced from:
_main in plamp_calcite.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
==============
This error is invoked when calling the constructor.
"PhreeqcRM phreeqc_rm(nxyz, nthreads);"
Is this a compatibility issue? If it is, do I need to recompile PhreeqcRM in 32-bit mode?
It would be great if I can have a stepwise guidance.
Navigation
[0] Message Index
[#] Next page
Go to full version