Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Fix OpenMP Linkage #29

Merged
merged 2 commits into from
Mar 14, 2024
Merged

Windows: Fix OpenMP Linkage #29

merged 2 commits into from
Mar 14, 2024

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Mar 12, 2024

Windows shows unknown OpenMP types at link type if used in public symbols.

Checklist

  • Used a personal fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

@ax3l ax3l added the bug Something isn't working label Mar 12, 2024
@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Unknown OpenMP types at link type if used in public symbols.
@ax3l ax3l force-pushed the fix-lld-link-omp branch from 51756a4 to ce62fc9 Compare March 12, 2024 02:30
recipe/bld.bat Outdated
@@ -5,6 +5,10 @@
if not exist %LIBRARY_PREFIX%\bin md %LIBRARY_PREFIX%\bin
if errorlevel 1 exit 1

:: OpenMP flags
set "CXXFLAGS=%CXXFLAGS% -openmp"
set "LDFLAGS=%LDFLAGS% -openmp"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not seem to know about the -openmp flag.

Should we try something like -DCMAKE_EXE_LINKER_FLAGS="-fopenmp" suggested here, https://discourse.cmake.org/t/openmp-linking-errors-on-windows-using-ninja-and-clang/7246

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should end up in LDFLAGS as well though...
https://cmake.org/cmake/help/latest/variable/CMAKE_EXE_LINKER_FLAGS.html

On my laptop:

$ lld-link -openmp
lld-link: warning: ignoring unknown argument '-openmp'
lld-link: error: no input files

$ lld-link -fopenmp
lld-link: warning: ignoring unknown argument '-fopenmp'
lld-link: error: no input files

@ax3l
Copy link
Member Author

ax3l commented Mar 14, 2024

Merging for now to fix BLAST-ImpactX/impactx#550

@ax3l ax3l merged commit a229844 into conda-forge:main Mar 14, 2024
26 of 32 checks passed
@ax3l ax3l deleted the fix-lld-link-omp branch March 14, 2024 01:40
@ax3l
Copy link
Member Author

ax3l commented Mar 14, 2024

Ouch, merging this was a mistake. Reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants