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

FindSleef: Use OpenMP in static builds #12295

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

fwcd
Copy link
Member

@fwcd fwcd commented Nov 12, 2023

Linking the vcpkg-built sleef statically on Linux seems to require OpenMP (see e.g. this build):

/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux/lib/libsleefdft.a(dftcommon.c.o): in function `SleefDFT_setPlanFilePath':
dftcommon.c:(.text+0x566): undefined reference to `GOMP_critical_start'
/usr/bin/ld: dftcommon.c:(.text+0x57c): undefined reference to `GOMP_critical_end'
/usr/bin/ld: dftcommon.c:(.text+0x68e): undefined reference to `omp_init_lock'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux/lib/libsleefdft.a(dftcommon.c.o): in function `PlanManager_loadMeasurementResultsP':
dftcommon.c:(.text+0x7d8): undefined reference to `GOMP_critical_start'
/usr/bin/ld: dftcommon.c:(.text+0x7fa): undefined reference to `GOMP_critical_end'
/usr/bin/ld: dftcommon.c:(.text+0x804): undefined reference to `omp_set_lock'
/usr/bin/ld: dftcommon.c:(.text+0xa03): undefined reference to `omp_unset_lock'
/usr/bin/ld: dftcommon.c:(.text+0xa39): undefined reference to `omp_unset_lock'
/usr/bin/ld: dftcommon.c:(.text+0xa66): undefined reference to `omp_init_lock'
/usr/bin/ld: /home/runner/work/m1xxx/m1xxx/vcpkg/installed/x64-linux/lib/libsleefdft.a(dftcommon.c.o): in function `PlanManager_saveMeasurementResultsP':
dftcommon.c:(.text+0xab8): undefined reference to `GOMP_critical_start'
/usr/bin/ld: dftcommon.c:(.text+0xada): undefined reference to `GOMP_critical_end'
/usr/bin/ld: dftcommon.c:(.text+0xae4): undefined reference to `omp_set_lock'
/usr/bin/ld: dftcommon.c:(.text+0xdb6): undefined reference to `omp_init_lock'
...

@fwcd
Copy link
Member Author

fwcd commented Nov 12, 2023

Looks like we may have to do this for libsleefdft rather than libsleef (note that there is no pkgconfig for sleefdft)...

@fwcd
Copy link
Member Author

fwcd commented Nov 12, 2023

Related issue in upstream vcpkg: microsoft/vcpkg#32744

@fwcd fwcd force-pushed the linux-static-sleef-openmp branch 4 times, most recently from 8a6fdce to 941c765 Compare November 12, 2023 22:53
set_property(TARGET rubberband::rubberband APPEND PROPERTY INTERFACE_LINK_LIBRARIES
Sleef::sleef
${sleefdft_path}
Sleef::sleefdft
Copy link
Member Author

Choose a reason for hiding this comment

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

Cleaning up this logic also has the side effect of making this dependency slightly more elegant.

@fwcd fwcd force-pushed the linux-static-sleef-openmp branch from 97072e7 to 4b4ce35 Compare November 13, 2023 00:18
@fwcd fwcd marked this pull request as ready for review November 13, 2023 02:07
@fwcd
Copy link
Member Author

fwcd commented Nov 13, 2023

The build went through, so I will mark this one as ready for review too.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you.

@daschuer daschuer merged commit 04b3ebc into mixxxdj:main Nov 13, 2023
11 checks passed
@fwcd fwcd deleted the linux-static-sleef-openmp branch November 13, 2023 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants