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

[libblocksruntime] The current version 0.4.1-2 seems to be missing export symbols #19743

Closed
2 of 7 tasks
Oleksiy-Yakovenko opened this issue Jan 13, 2024 · 14 comments
Closed
2 of 7 tasks
Labels

Comments

@Oleksiy-Yakovenko
Copy link

Description / Steps to reproduce the issue

I'm building my project via github action / workflow, and get linking errors.
No related changes on my side.

The library is definitely getting linked, but symbols are not found.

I downloaded and inspected the dll file from the package, and it doesn't seem to have those symbols exported.

clang -o "bin/release/deadbeef.exe" obj/Windows/release/deadbeef/buffered_file_writer.o obj/Windows/release/deadbeef/conf.o obj/Windows/release/deadbeef/ctmap.o obj/Windows/release/deadbeef/cueutil.o obj/Windows/release/deadbeef/decodedblock.o obj/Windows/release/deadbeef/dsp.o obj/Windows/release/deadbeef/dsppreset.o obj/Windows/release/deadbeef/escape.o obj/Windows/release/deadbeef/fft.o obj/Windows/release/deadbeef/handler.o obj/Windows/release/deadbeef/junklib.o obj/Windows/release/deadbeef/logger.o obj/Windows/release/deadbeef/main.o obj/Windows/release/deadbeef/md5.o obj/Windows/release/deadbeef/messagepump.o obj/Windows/release/deadbeef/metacache.o obj/Windows/release/deadbeef/parser.o obj/Windows/release/deadbeef/playlist.o obj/Windows/release/deadbeef/playmodes.o obj/Windows/release/deadbeef/playqueue.o obj/Windows/release/deadbeef/plmeta.o obj/Windows/release/deadbeef/pltmeta.o obj/Windows/release/deadbeef/plugins.o obj/Windows/release/deadbeef/premix.o obj/Windows/release/deadbeef/replaygain.o obj/Windows/release/deadbeef/resizable_buffer.o obj/Windows/release/deadbeef/ringbuf.o obj/Windows/release/deadbeef/sort.o obj/Windows/release/deadbeef/streamer.o obj/Windows/release/deadbeef/streamreader.o obj/Windows/release/deadbeef/tf.o obj/Windows/release/deadbeef/threading_pthread.o obj/Windows/release/deadbeef/utf8.o obj/Windows/release/deadbeef/vfs.o obj/Windows/release/deadbeef/vfs_stdio.o obj/Windows/release/deadbeef/viz.o obj/Windows/release/deadbeef/volume.o obj/Windows/release/deadbeef/wcwidth.o obj/Windows/release/deadbeef/Resources.o obj/Windows/release/deadbeef/deadbeef-icon.o   -Lstatic-deps/lib-x86-64/lib/x86_64-linux-gnu -Lstatic-deps/lib-x86-64/lib -Lxdispatch_ddb/lib -mwindows -Wl,--export-all-symbols libwin.lib -lintl -lws2_32 -lpsapi -lshlwapi -liconv -lm -lpthread -ldl -ldispatch -lBlocksRuntime
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/main.o:main.c:(.text+0x1993): undefined reference to `__imp__NSConcreteGlobalBlock'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/plugins.o:plugins.c:(.text+0x187c): undefined reference to `_Block_copy'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/plugins.o:plugins.c:(.text+0x18fb): undefined reference to `__imp__NSConcreteStackBlock'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/plugins.o:plugins.c:(.text+0x1c23): undefined reference to `_Block_release'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/plugins.o:plugins.c:(.text+0x2786): undefined reference to `__imp__Block_object_dispose'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/plugins.o:plugins.c:(.text+0x2826): undefined reference to `__imp__Block_object_dispose'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/plugins.o:plugins.c:(.text+0x28c6): undefined reference to `__imp__Block_object_dispose'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/plugins.o:plugins.c:(.text+0x2966): undefined reference to `__imp__Block_object_dispose'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/plugins.o:plugins.c:(.text+0x2a06): undefined reference to `__imp__Block_object_dispose'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/plugins.o:plugins.c:(.text+0x2aa6): more undefined references to `__imp__Block_object_dispose' follow
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/viz.o:viz.c:(.text+0xae): undefined reference to `__imp__NSConcreteStackBlock'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/viz.o:viz.c:(.text+0x15e): undefined reference to `__imp__NSConcreteStackBlock'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/viz.o:viz.c:(.text+0x21e): undefined reference to `__imp__NSConcreteStackBlock'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/viz.o:viz.c:(.text+0x2ce): undefined reference to `__imp__NSConcreteStackBlock'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/viz.o:viz.c:(.text+0x3b3): undefined reference to `__imp__NSConcreteGlobalBlock'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/viz.o:viz.c:(.text+0x3d6): undefined reference to `__imp__NSConcreteStackBlock'
D:/a/_temp/msys64/mingw64/bin/ld: obj/Windows/release/deadbeef/viz.o:viz.c:(.text+0x82c): undefined reference to `__imp__NSConcreteStackBlock'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Expected behavior

There should not be any errors

Actual behavior

I'm getting linker errors

Verification

Windows Version

Microsoft Windows Server 2022 10.0.20348

MINGW environments affected

  • MINGW64
  • MINGW32
  • UCRT64
  • CLANG64
  • CLANG32
  • CLANGARM64

Are you willing to submit a PR?

No response

@Oleksiy-Yakovenko
Copy link
Author

The first failing build occurred 3 weeks ago, which coincides with this change:
e87cac4

@ognevny
Copy link
Collaborator

ognevny commented Jan 13, 2024

The first failing build occurred 3 weeks ago, which coincides with this change: e87cac4

this change did nothing to the package. it's just metadata for website

@Oleksiy-Yakovenko
Copy link
Author

Yes, sorry, I didn't mean to imply that this change caused it. But there was a new build 3 weeks ago, and maybe some external script in some other package has changed.

I downloaded the previous build (1) and looked in the dll contents.
The latest dll doesn't contain string _Block_release, but the previous one does.

0.4.1-2:

% strings libBlocksRuntime-0.dll | grep _Block_release

0.4.1-1:

% strings libBlocksRuntime-0.dll | grep _Block_release
_Block_release

@Oleksiy-Yakovenko
Copy link
Author

FYI: we are unblocked, and can build again, by using another version of BlocksRuntime.dll
So if it's not important for mingw itself -- this issue can be closed.
Yet keep in mind, that the mingw-supplied BlocksRuntime package is not usable.

@lazka
Copy link
Member

lazka commented Jan 14, 2024

Weird that package-grokker didn't catch this

@MehdiChinoune
Copy link
Collaborator

Weird that package-grokker didn't catch this

Package-grokker catches missing symbols for reverse dependencies.

@lazka
Copy link
Member

lazka commented Jan 14, 2024

ah, right, we have no internal users.

@lazka
Copy link
Member

lazka commented Jan 21, 2024

Did #19777 improve things?

@qmfrederik
Copy link
Contributor

The _Block_release should be exported with 0.4.1-3:

$ pacman -Q mingw-w64-ucrt-x86_64-libblocksruntime
mingw-w64-ucrt-x86_64-libblocksruntime 0.4.1-3

$ nm -g /ucrt64/lib/libBlocksRuntime.dll.a | grep Block_re
0000000000000000 I __imp__Block_release
0000000000000000 T _Block_release

Also worth nothing that libobjc2 recently landed in msys2, which also includes a Blocks runtime.

@Oleksiy-Yakovenko
Copy link
Author

Did #19777 improve things?

We have already resolved the problem by switching to our own build of this library, and I will not be able to spend the time necessary to switch back.
If the symbol is now exported, the problem should be resolved, and the issue can be closed.

@qmfrederik
Copy link
Contributor

We have already resolved the problem by switching to our own build of this library

Out of curiosity, which repository are you using to get the sources for libblocksruntime?

@Oleksiy-Yakovenko
Copy link
Author

From here: https://github.com/apple/swift-corelibs-libdispatch/releases
It's part of libdispatch source tree.

@ognevny
Copy link
Collaborator

ognevny commented Feb 18, 2024

we are about to remove old libblocksruntime package. can you try new libdispatch package, please? (you can download it from artifact)

@MehdiChinoune
Copy link
Collaborator

It was removed in 7aaaa112 and It's now provided by libdispatch package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants