Error in building REFPROP Mac OS
karimialii opened this issue · 3 comments
Hi everyone, I tried to build Refprop library for Mac OS but I faced with this error:
this is my terminal output:
Last login: Fri Aug 5 11:03:23 on ttys001
alikarimi@Alis-MacBook-Pro ~ % git clone --recursive https://github.com/usnistgov/REFPROP-cmake.git
Cloning into 'REFPROP-cmake'...
remote: Enumerating objects: 329, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 329 (delta 15), reused 18 (delta 8), pack-reused 297
Receiving objects: 100% (329/329), 71.06 KiB | 430.00 KiB/s, done.
Resolving deltas: 100% (169/169), done.
Submodule 'externals/REFPROP-headers' (https://github.com/CoolProp/REFPROP-headers) registered for path
'externals/REFPROP-headers'
Cloning into '/Users/alikarimi/REFPROP-cmake/externals/REFPROP-headers'...
remote: Enumerating objects: 362, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 362 (delta 1), reused 4 (delta 1), pack-reused 356
Receiving objects: 100% (362/362), 111.19 KiB | 349.00 KiB/s, done.
Resolving deltas: 100% (225/225), done.
Submodule path 'externals/REFPROP-headers': checked out '828e8741af0697dc35f9447b1b66ec2aa11a881a'
alikarimi@Alis-MacBook-Pro ~ % cd REFPROP-cmake
alikarimi@Alis-MacBook-Pro REFPROP-cmake % mkdir build
alikarimi@Alis-MacBook-Pro REFPROP-cmake % cd build
alikarimi@Alis-MacBook-Pro build % cmake .. -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The Fortran compiler identification is GNU 12.1.0
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/local/bin/gfortran - skipped
-- Found PythonInterp: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 (found version "3.10.4")
-- DEFSYM_FLAG:
-- darwin
Traceback (most recent call last):
File "/Users/alikarimi/REFPROP-cmake/generate_aliases.py", line 22, in tokenize
for line in open(os.path.join(path_to_FORTRAN,"PASS_FTN.FOR"), 'r').readlines():
FileNotFoundError: [Errno 2] No such file or directory: '/Users/alikarimi/REFPROP-cmake/FORTRAN/PASS_FTN.FOR'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/alikarimi/REFPROP-cmake/generate_aliases.py", line 129, in <module>
tokens = tokenize(header_path, FORTRAN_path)
File "/Users/alikarimi/REFPROP-cmake/generate_aliases.py", line 25, in tokenize
for line in open(os.path.join(path_to_FORTRAN,"DLLFILES","PASS_FTN.FOR"), 'r').readlines():
FileNotFoundError: [Errno 2] No such file or directory: '/Users/alikarimi/REFPROP-cmake/FORTRAN/DLLFILES/PASS_FTN.FOR'
CMake Error at CMakeLists.txt:153 (file):
file failed to open for reading (No such file or directory):
/Users/alikarimi/REFPROP-cmake/build/aliases_string.txt
-- Path to libquadmath.a:/usr/local/gfortran/lib/gcc/x86_64-apple-darwin21/12.1.0/../../../libquadmath.a
-- Copied libquadmath.a here.
-- Configuring incomplete, errors occurred!
See also "/Users/alikarimi/REFPROP-cmake/build/CMakeFiles/CMakeOutput.log".
See also "/Users/alikarimi/REFPROP-cmake/build/CMakeFiles/CMakeError.log".
alikarimi@Alis-MacBook-Pro build % cmake .. -DCMAKE_BUILD_TYPE=Release
-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The Fortran compiler identification is GNU 12.1.0
-- Checking whether Fortran compiler has -isysroot
-- Checking whether Fortran compiler has -isysroot - yes
-- Checking whether Fortran compiler supports OSX deployment target flag
-- Checking whether Fortran compiler supports OSX deployment target flag - yes
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/local/bin/gfortran - skipped
-- Found PythonInterp: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 (found version "3.10.4")
-- DEFSYM_FLAG:
-- darwin
Missing from PASS_CMN_tokens: ['ABFLSHdll', 'ABFLASHdll', 'ALLPROPS0dll', 'ALLPROPS1dll', 'ALLPROPS20dll', 'ALLPROPSdll',
'CRTPNTdll', 'DEFL1dll', 'DERVPVTdll', 'DHFL1dll', 'DSD1dll', 'ERRMSGdll', 'FLAGSdll', 'GERG08dll', 'GETENUMdll', 'GETMODdll',
'GETREFDIRdll', 'HEATFRMdll', 'HMXORDERdll', 'HSFL1dll', 'MASSFLUXdll', 'MELTKdll', 'PASSCMNdll', 'PEFL1dll', 'PHI0dll',
'PHIDERVdll', 'PHIHMXdll', 'PHIKdll', 'PHIMIXdll', 'RDXHMXdll', 'REFPROP1dll', 'REFPROP2dll', 'REFPROPdll', 'RIEMdll', 'SATESTdll',
'SATGUESSdll', 'SETFLUIDSdll', 'SETMIXTUREdll', 'SETREFDIRdll', 'STNdll', 'TEFL1dll', 'THFL1dll', 'TSATPdll', 'TSFL1dll',
'VIRBCDdll', 'VIRBCD12dll', 'VIRTAUdll', 'WMOLIdll']
Missing from REFPROP_lib.h: ['DPDDKdll', 'DPDTKdll', 'ACTVYdll', 'DOTFILLdll', 'OMEGAdll', 'ETAK0dll', 'ETAK1dll', 'ETAKRdll',
'ETAKBdll', 'TCXK0dll', 'TCXKBdll', 'TCXKCdll']
-- Path to libquadmath.a:/usr/local/gfortran/lib/gcc/x86_64-apple-darwin21/12.1.0/../../../libquadmath.a
-- Copied libquadmath.a here.
-- REFPROP version <= 9.1 identified by presence of include "'commons.for'"; copying locally and fixing include statement
-- Fixing of FORTRAN files complete. Compilation ready.
-- Set REFPROP_FORTRAN_PATH to /Users/alikarimi/REFPROP-cmake/build/FORTRAN_temp
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/alikarimi/REFPROP-cmake/build
alikarimi@Alis-MacBook-Pro build % cmake --build .
Scanning dependencies of target refprop
[ 3%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_ANC.FOR.o
[ 6%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_BWR.FOR.o
[ 10%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_CPP.FOR.o
[ 13%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_DE.FOR.o
[ 17%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_ECS.FOR.o
[ 20%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_FEQ.FOR.o
[ 24%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_MLT.FOR.o
[ 27%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_PH0.FOR.o
[ 31%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_PR.FOR.o
[ 34%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_QUI.FOR.o
[ 37%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/CORE_STN.FOR.o
[ 41%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/FLASH2.FOR.o
[ 44%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/FLSH_SUB.FOR.o
[ 48%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/IDEALGAS.FOR.o
[ 51%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/MIX_AGA8.FOR.o
[ 55%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/MIX_HMX.FOR.o
[ 58%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/PASS_FTN.FOR.o
[ 62%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/PROP_SUB.FOR.o
[ 65%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/REALGAS.FOR.o
[ 68%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/SAT_SUB.FOR.o
[ 72%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/SETUP.FOR.o
[ 75%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/SETUP2.FOR.o
[ 79%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/TRNSP.FOR.o
[ 82%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/TRNS_ECS.FOR.o
[ 86%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/TRNS_TCX.FOR.o
[ 89%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/TRNS_VIS.FOR.o
[ 93%] Building Fortran object CMakeFiles/refprop.dir/FORTRAN_temp/UTILITY.FOR.o
[ 96%] Linking Fortran shared library librefprop.dylib
gfortran: error: conflicting code generation switches
make[2]: *** [librefprop.dylib] Error 1
make[1]: *** [CMakeFiles/refprop.dir/all] Error 2
make: *** [all] Error 2
alikarimi@Alis-MacBook-Pro build % cmake --build .
Please see open issues regarding Apple arm chips
Thank you for replying but I use Intel chips.
What version of Intel chip? It's the same problem, from the other side, since compilers need to know what to compile for.