Skip to content

Running built S-function FAST_SFunc gives undefined symbols error #1704

@reos-rcrozier

Description

@reos-rcrozier

Bug description

In a build from the 3.5.0 branch or the 'main' branch, the Matlab S-function FAST_SFunc is built, but attempting to run the function in a simulation results in the following error:

Invalid MEX-file '/home/rcrozier/src/openfast-reos-git/build/glue-codes/simulink/FAST_SFunc.mexa64':
        /home/rcrozier/src/openfast-reos-git/build/glue-codes/simulink/FAST_SFunc.mexa64: undefined symbol:
        __polynomialroots_MOD_quarticroots

To Reproduce

Steps to reproduce the behavior:

  1. Compile with
cmake ~/src/openfast-official-git \
  -DBUILD_FASTFARM=ON \
  -DBUILD_OPENFAST_CPP_API=ON \
  -DBUILD_OPENFAST_SIMULINK_API=ON \
  -DBUILD_SHARED_LIBS=OFF \
  -DCMAKE_INSTALL_PREFIX=/usr/local \
  -DDOUBLE_PRECISION=ON \
  -DOPENMP=OFF -DUSE_LOCAL_STATIC_LAPACK=OFF
make
  1. Add mex function to the matlab path
  2. Run OpenLoop example provided in glue-codes/simulink/examples/Run_OpenLoop.m
  3. See the error

Expected behavior
Simulation runs without error.

OpenFAST Version
I built from both the main brance and the 3.5.0 branch with the same result. I also added a test for this to the github CI with the following PR: #1703

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions