Skip to content

Missing libm linkage when building with cmake #3892

@antonio-rojas

Description

@antonio-rojas

I'm building openblas with

  cmake -B build64 -S OpenBLAS \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_SHARED_LIBS=ON \
    -DBUILD_WITHOUT_LAPACK=ON \
    -DBUILD_WITHOUT_CBLAS=ON \
    -DBUILD_TESTING=OFF \
    -DNO_AFFINITY=ON \
    -DUSE_OPENMP=1 \
    -DCORE=CORE2 \
    -DDYNAMIC_ARCH=ON \
    -DINTERFACE64=1

and the resulting libopenblas64.so library is not linked to libm.so, even though it calls libm functions, such as sqrt.
Building without -DINTERFACE64=1 produces a library which is correctly linked to libm.so

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