Skip to content

Mac installation - could not load librefprop.dylib - incompatible architecture #99

@matlawicebox

Description

@matlawicebox

My cmake --build installation on Mac ran without errors, but I'm still at a loss how to get it to work with CoolProp. I moved a copy of the generated file librefprop.dylib to where I think it's supposed to go (/usr/local/bin), as well as FLUIDS folder and for good measure the REFPROP folder that was generated on my Windows machine after installation, but I get errors when I first try to use REFPROP within CoolProp (even after explicitly setting /usr/local/bin as the REFPROP path). It looks like there's something wrong with the generated librefprop.dylib file and/or path issue (I've checked and /usr/local/bin is in my path).

I'm not even sure if I have one problem (librefprop not compatible with my gcc/gfortran?) or two problems (also not finding REFPROP folder?) If it's the first, I followed the instructions using gcc/gfortran from Macports - I can't see how to change the architecture for those.

Any suggestions what to try next greatly appreciated!!

import CoolProp.CoolProp as CP
CP.set_config_string(CP.ALTERNATIVE_REFPROP_PATH, '/usr/local/bin')
testAS=CP.AbstractState('REFPROP','R1234yf&R134a'); REFPROP.set_mole_fractions([0.56,0.44])

yielding

Good news: It is possible to use REFPROP on your system! However, the library 
could not be loaded. Please make sure that REFPROP is available on your system.
Neither found in current location nor found in system PATH.
If you already obtained a copy of REFPROP from http://www.nist.gov/srd/, 
add location of REFPROP to the PATH environment variable or your library path.
In case you do not use Windows, have a look at https://github.com/jowr/librefprop.so 
to find instructions on how to compile your own version of the REFPROP library.
ALTERNATIVE_REFPROP_PATH: /usr/local/bin
ERROR: Could not load REFPROP (librefprop.dylib) due to: dlopen(/usr/local/bin/librefprop.dylib, 0x0002): tried: '/usr/local/bin/librefprop.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/bin/librefprop.dylib' (no such file), '/usr/local/bin/librefprop.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')). Make sure the library is in your system search path. In case you run 64bit Windows and you have a REFPROP license, try installing the 64bit DLL from NIST. 
Traceback (most recent call last):
  File "/Users/matlawicebox/Desktop/Python/HeatPump/venv/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3378, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-4-ee9a4c0c2915>", line 1, in <module>
    testAS=CP.AbstractState('REFPROP','R1234yf&R134a'); REFPROP.set_mole_fractions([0.56,0.44])
  File "CoolProp/AbstractState.pyx", line 32, in CoolProp.CoolProp.AbstractState.__cinit__
ValueError: You cannot use the REFPROPMixtureBackend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions