Skip to content

OpenMP linking errors on Windows using Ninja and clang #1129

@KrisThielemans

Description

@KrisThielemans

#1127 attempts to use Ninja on Appveyor (among trying to use sccache). It fails due to (unrelated) linking errors with OpenMP. Apparently the linker doesn't get passed the correct flag. This is likely caused by switching to Ninja, which I had to do as the VS Generator ignores the *COMPILER_LAUNCHER (I guess I could try nmake). But this is using the clang compiler as opposed to cl. so lots of things change.

errors like

lld-link: error: undefined symbol: __kmpc_dispatch_init_8
>>> referenced by iterative_KOSMAPOSL.lib(KOSMAPOSLReconstruction.cxx.obj):(.omp_outlined.)
>>> referenced by iterative_KOSMAPOSL.lib(KOSMAPOSLReconstruction.cxx.obj):(.omp_outlined..1)

and

lld-link: error: undefined symbol: omp_get_num_threads
>>> referenced by recon_buildblock.lib(PoissonLogLikelihoodWithLinearModelForMeanAndProjData.cxx.obj):(.omp_outlined.)
>>> referenced by recon_buildblock.lib(PoissonLogLikelihoodWithLinearModelForMeanAndProjData.cxx.obj):(.omp_outlined..1)

I don't think this is our problem, but CMake's FindOpenMP.

Originally posted by @KrisThielemans in #1127 (comment)

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