Bladed interface dynamic library could not be loaded (aarch64/arm64 M1)

Dear NREL Team,
I recently downloaded OpenFAST and ROSCO by following the documentation, and I am able to run OpenFAST fine as long as Bladed-style DLL is unused. When a introduce the bladed interface I get the following error:

Running ServoDyn.
Running ServoDyn Interface for Bladed Controllers (using GNU Fortran for Linux).

FAST_InitializeAll:SrvD_Init:BladedInterface_Init:The dynamic library
/Users/fredrikfleslandselheim/Library/CloudStorage/OneDrive-NTNU/MASTER_UMAINE/ROSCO-main/Examples
/rosco/lib/libdiscon.dylib could not be loaded. Check that the file exists in the specified
location and that it is compiled for 64-bit applications.

First of all, Im working on macOS M1 (aarch64), and I suspect this might be the cause of my difficulties. Also, I saw from an earlier topic that avoiding relative path could solve the issue, but it did not change any in my case.

When installing 2.1. Complete ROSCO Installation, the “pip install -e .” did not work, due to issues with “pip install wisdem” and meson.build (see error message below). However, I managed to run the setup.py, which after reading WISDEM github page was stated to be more reliable then pip install -e .

Since the error states that the libdiscon file could not be loaded, it’s likely that this originates from the compiling of the libdiscon.dylib.
image

I would really appreciate some guidance on how to overcome this issue! Thanks

Here are my compiler details:
OpenFAST-v3.5.2-dirty
OpenFAST-HEAD-HASH-NOTFOUND
Compile Info:

  • Compiler: GCC version 13.2.0
  • Architecture: 64 bit
  • Precision: single
  • OpenMP: No
  • Date: Jan 19 2024
  • Time: 03:09:38
    Execution Info:
  • Date: 02/15/2024
  • Time: 10:13:12-0500

Error message from terminal (pip install -e .)(pip install wisdem):
(base) fredrikfleslandselheim@host-0800-c4910cb0fd22 ROSCO-main % pip install -e .
Obtaining file:///Users/fredrikfleslandselheim/Library/CloudStorage/OneDrive-NTNU/MASTER_UMAINE/ROSCO-main
Installing build dependencies … done
Checking if build backend supports build_editable … done
Getting requirements to build editable … error
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 353, in
main()
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 132, in get_requires_for_build_editable
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File “/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-7jlxl5vc/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 441, in get_requires_for_build_editable
return self.get_requires_for_build_wheel(config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-7jlxl5vc/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[‘wheel’])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-7jlxl5vc/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 295, in _get_build_requires
self.run_setup()
File “/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-7jlxl5vc/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 311, in run_setup
exec(code, locals())
File “”, line 58, in
File “/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-7jlxl5vc/overlay/lib/python3.11/site-packages/cmake_build_extension/cmake_extension.py”, line 46, in init
raise ValueError(f"Directory ‘{source_dir}’ does not exist")
ValueError: Directory ‘/Users/fredrikfleslandselheim/Library/CloudStorage/OneDrive-NTNU/MASTER_UMAINE/ROSCO-main/rosco/controller’ does not exist
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
(base) fredrikfleslandselheim@host-0800-c4910cb0fd22 ROSCO-main % pip install wisdem
Collecting wisdem
Using cached wisdem-3.13.0.tar.gz (5.4 MB)
Installing build dependencies … done
Getting requirements to build wheel … error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
[‘/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-5ju55d4j/overlay/bin/meson’, ‘setup’, ‘meson_build’, ‘–wipe’, ‘–prefix=/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-install-a_om9yrk/wisdem_2c273793e3d94914af3f2f982d694a9c/meson_build’, ‘-Dpython.purelibdir=.’, ‘-Dpython.platlibdir=.’]

  ERROR: Neither source directory 'meson_build' nor build directory None contain a build file meson.build.
  
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-5ju55d4j/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-5ju55d4j/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-5ju55d4j/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 102, in <module>
    File "<string>", line 62, in run_meson_build
  OSError: [Errno ['/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-5ju55d4j/overlay/bin/meson', 'setup', 'meson_build', '--wipe', '--prefix=/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-install-a_om9yrk/wisdem_2c273793e3d94914af3f2f982d694a9c/meson_build', '-Dpython.purelibdir=.', '-Dpython.platlibdir=.']] The meson setup command failed! Check the log at meson_build/setup.log for more information.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
(base) fredrikfleslandselheim@host-0800-c4910cb0fd22 ROSCO-main %

I just now got this error message after running example 17a_zeromq_simple

OSError: dlopen(/Users/fredrikfleslandselheim/Library/CloudStorage/OneDrive-NTNU/MASTER_UMAINE/ROSCO-main/Examples/rosco/lib/libdiscon.dylib, 0x0006): tried: ‘/Users/fredrikfleslandselheim/Library/CloudStorage/OneDrive-NTNU/MASTER_UMAINE/ROSCO-main/Examples/rosco/lib/libdiscon.dylib’ (mach-o file, but is an incompatible architecture (have ‘x86_64’, need ‘arm64’)), ‘/System/Volumes/Preboot/Cryptexes/OS/Users/fredrikfleslandselheim/Library/CloudStorage/OneDrive-NTNU/MASTER_UMAINE/ROSCO-main/Examples/rosco/lib/libdiscon.dylib’ (no such file), ‘/Users/fredrikfleslandselheim/Library/CloudStorage/OneDrive-NTNU/MASTER_UMAINE/ROSCO-main/Examples/rosco/lib/libdiscon.dylib’ (mach-o file, but is an incompatible architecture (have ‘x86_64’, need ‘arm64’))

Is there a way of compiling ROSCO for arm64 architecture?

Hi Fredrik,
If you can use conda then a possible way to solve the issue could be as follows:

conda create -n ROSCO_ARMTest python=3.10
conda activate ROSCO_ARMTest
conda install wisdem
git clone https://github.com/NREL/ROSCO.git
cd ROSCO/
pip install -e .

This should create a libdiscon.dylib in ROSCO/rosco/lib/ directory.
Let me know if this works.

Hi Abhineet,
Thank you for your prompt response.

Im still experiencing same issue, unfortunately. See error message below:

(base) fredrikfleslandselheim@host-0800-c4910cb0fd22 ~ % conda activate ROSCO_ARMTest
(ROSCO_ARMTest) fredrikfleslandselheim@host-0800-c4910cb0fd22 ~ % conda install wisdem
Channels:

  • defaults
    Platform: osx-arm64
    Collecting package metadata (repodata.json): done
    Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  • wisdem

Current channels:

  • defaults

To search for alternate channels that may provide the conda package you’re
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

(ROSCO_ARMTest) fredrikfleslandselheim@host-0800-c4910cb0fd22 ~ %

(ROSCO_ARMTest) fredrikfleslandselheim@host-0800-c4910cb0fd22 ~ % cd “OneDrive - NTNU”
(ROSCO_ARMTest) fredrikfleslandselheim@host-0800-c4910cb0fd22 OneDrive - NTNU % cd “MASTER_UMAINE”
(ROSCO_ARMTest) fredrikfleslandselheim@host-0800-c4910cb0fd22 MASTER_UMAINE % cd “ROSCO-main”
(ROSCO_ARMTest) fredrikfleslandselheim@host-0800-c4910cb0fd22 ROSCO-main % pip install -e .
Obtaining file:///Users/fredrikfleslandselheim/Library/CloudStorage/OneDrive-NTNU/MASTER_UMAINE/ROSCO-main
Installing build dependencies … done
Checking if build backend supports build_editable … done
Getting requirements to build editable … error
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 353, in
main()
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 335, in main
json_out[‘return_val’] = hook(**hook_input[‘kwargs’])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py”, line 132, in get_requires_for_build_editable
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File “/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-2qjrisvk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 441, in get_requires_for_build_editable
return self.get_requires_for_build_wheel(config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-2qjrisvk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[‘wheel’])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-2qjrisvk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 295, in _get_build_requires
self.run_setup()
File “/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-2qjrisvk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py”, line 311, in run_setup
exec(code, locals())
File “”, line 58, in
File “/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-2qjrisvk/overlay/lib/python3.11/site-packages/cmake_build_extension/cmake_extension.py”, line 46, in init
raise ValueError(f"Directory ‘{source_dir}’ does not exist")
ValueError: Directory ‘/Users/fredrikfleslandselheim/Library/CloudStorage/OneDrive-NTNU/MASTER_UMAINE/ROSCO-main/rosco/controller’ does not exist
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
(ROSCO_ARMTest) fredrikfleslandselheim@host-0800-c4910cb0fd22 ROSCO-main %

Instead of conda install wisdem, could you try conda install conda-forge::wisdem?

Yes now I got it working! I kept going with these commands:
conda create -n ROSCO_ARMTest python=3.10
conda activate ROSCO_ARMTest
conda install wisdem
git clone GitHub - NREL/ROSCO: A Reference Open Source Controller for Wind Turbines
cd ROSCO/

Then:
conda install conda-forge::cmake-build-extension
python setyp.py develop

This image confirms the arm64 architecture

I now tried your line:
conda install conda-forge::wisdem
and got the following:
Channels:

  • defaults

  • conda-forge

Platform: osx-arm64

Collecting package metadata (repodata.json): done

Solving environment: done

All requested packages already installed.

(base) fredrikfleslandselheim@host-0800-c4910cb0fd22 ~ %

So it would probably fix the same thing as running the setup script.

Thank you so much for your help!

@Abhineet.Gupta I do get another error when running the example 17b_zeromq_multi_openfast, however Im not sure if it is related to my arm64 architecture. This error is related to the ZeroMQ client not being properly installed. Would you have any guidance on this?

Running ROSCO-v2.9.0
A wind turbine controller framework for public use in the scientific field
Developed in collaboration: National Renewable Energy Laboratory
Delft University of Technology, The Netherlands

Generator speed: 5.0 RPM, Pitch angle: 1.0 deg, Power: 0.0 kW, Est. wind Speed: 8.0 m/s
ROSCO:PitchControl:interp1d:PitchSaturation:interp1d:interp1d:interp1d:interp1d:interp1d:VariableSpeedControl:WindSpeedEstimator:UpdateZeroMQ: >> The ZeroMQ client has not been properly installed, please install it to use ZMQ_Mode > 0.
Generator speed: 5.0 RPM, Pitch angle: 1.0 deg, Power: 0.0 kW, Est. wind Speed: 8.0 m/s
ROSCO:PitchControl:interp1d:PitchSaturation:interp1d:interp1d:interp1d:interp1d:interp1d:VariableSpeedControl:WindSpeedEstimator:UpdateZeroMQ: >> The ZeroMQ client has not been properly installed, please install it to use ZMQ_Mode > 0.

FAST_Solution0:CalcOutputs_And_SolveForInputs:SolveOption2:SrvD_CalcOutput:DLL_controller_call:ROS
CO:PitchControl:interp1d:PitchSaturation:interp1d:interp1d:interp1d:interp1d:interp1d:VariableSpee
FAST_Solution0:CalcOutputs_And_SolveForInputs:SolveOption2:SrvD_CalcOutput:DLL_controller_call:ROS
dControl:WindSpeedEstimator:UpdateZeroMQ: >> The ZeroMQ client has not been properly installed,
CO:PitchControl:interp1d:PitchSaturation:interp1d:interp1d:interp1d:interp1d:interp1d:VariableSpee
please install it to use ZMQ_Mode > 0.
dControl:WindSpeedEstimator:UpdateZeroMQ: >> The ZeroMQ client has not been properly installed,

please install it to use ZMQ_Mode > 0.

ROSCO:UpdateZeroMQ: >> The ZeroMQ client has not been properly installed, please install it to use ZMQ_Mode > 0.
ROSCO:UpdateZeroMQ: >> The ZeroMQ client has not been properly installed, please install it to use ZMQ_Mode > 0.
OpenFAST encountered an error during simulation initialization.
OpenFAST encountered an error during simulation initialization.
Simulation error level: FATAL ERROR

Simulation error level: FATAL ERROR
Aborting OpenFAST.

Aborting OpenFAST.

OpenFAST Failed: Command ‘[‘openfast’, ‘IEA15MW_0.fst’]’ returned non-zero exit status 1.
Runtime: IEA15MW_0.fst = 5.59 s
OpenFAST Failed: Command ‘[‘openfast’, ‘IEA15MW_0.fst’]’ returned non-zero exit status 1.
OpenFAST Failed! Please check the run logs.
Runtime: IEA15MW_0.fst = 5.59 s
OpenFAST Failed! Please check the run logs.
Process Process-2:
Process Process-3:
Traceback (most recent call last):
Traceback (most recent call last):

Hi Fredrik,
Please try pip install -e . instead of python setup.py develop

Still cannot make the pip install -e . run successfully.

I now did it all from start:
First deleted the ROSCO folder, then
conda create -n ROSCO_ARMTest2 python=3.10
conda activate ROSCO_ARMTest
conda install conda-forge::wisdem
git clone
cd ROSCO/
pip install -e .

(ROSCO_ARMTest2) fredrikfleslandselheim@host-0800-c4910cb0fd22 ROSCO % pip install -e .

Collecting wisdem (from rosco==2.9.0)
Using cached wisdem-3.13.0.tar.gz (5.4 MB)
Installing build dependencies … done
Getting requirements to build wheel … error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [23 lines of output]
[‘/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-m8tciokc/overlay/bin/meson’, ‘setup’, ‘meson_build’, ‘–wipe’, ‘–prefix=/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-install-6zobmdrd/wisdem_00a5f855fc88474e9e8a66b39021d43a/meson_build’, ‘-Dpython.purelibdir=.’, ‘-Dpython.platlibdir=.’]

  ERROR: Neither source directory 'meson_build' nor build directory None contain a build file meson.build.
  
  Traceback (most recent call last):
    File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-m8tciokc/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-m8tciokc/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-m8tciokc/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 102, in <module>
    File "<string>", line 62, in run_meson_build
  OSError: [Errno ['/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-build-env-m8tciokc/overlay/bin/meson', 'setup', 'meson_build', '--wipe', '--prefix=/private/var/folders/_j/v3f4kf2n3cx74jmz1_c4q0z40000gn/T/pip-install-6zobmdrd/wisdem_00a5f855fc88474e9e8a66b39021d43a/meson_build', '-Dpython.purelibdir=.', '-Dpython.platlibdir=.']] The meson setup command failed! Check the log at meson_build/setup.log for more information.
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
(ROSCO_ARMTest2) fredrikfleslandselheim@host-0800-c4910cb0fd22 ROSCO %

You created a new environment ROSCO_ARMTest2 but activating ROSCO_ARMTest. That might be the source of the issue. Also, checkout the issue which is about the latest error you had. Feel free to continue the conversation about this error on the issue page.

Abhineet

1 Like