Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933348 - media-video/vlc-3.0.20-r11: fails to build on clang+arm64 with undefined symbol: __aarch64_ldadd4_acq_rel
Summary: media-video/vlc-3.0.20-r11: fails to build on clang+arm64 with undefined symb...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-01 08:58 UTC by kit
Modified: 2024-06-02 19:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (build.log.gz,662.09 KB, application/gzip)
2024-06-01 08:58 UTC, kit
Details
emerge --info (file_933348.txt,7.29 KB, text/plain)
2024-06-01 09:00 UTC, kit
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kit 2024-06-01 08:58:39 UTC
Created attachment 894770 [details]
build.log.gz

Trying to build vlc on a clang arm64 system fails with

ld.lld: error: undefined symbol: __aarch64_ldadd4_acq_rel
>>> referenced by dialogs_provider.cpp
>>>               gui/qt/.libs/libqt_plugin_la-dialogs_provider.o:(DialogsProvider::getOpenURL(QWidget*, QString const&, QUrl const&, QString const&, QString*))
>>> referenced by dialogs_provider.cpp
>>>               gui/qt/.libs/libqt_plugin_la-dialogs_provider.o:(DialogsProvider::getOpenURL(QWidget*, QString const&, QUrl const&, QString const&, QString*))
>>> referenced by dialogs_provider.cpp
>>>               gui/qt/.libs/libqt_plugin_la-dialogs_provider.o:(DialogsProvider::getOpenURL(QWidget*, QString const&, QUrl const&, QString const&, QString*))
>>> referenced 5498 more times
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

As far as I can tell, this error happens during linking of a shared library and for whatever reason libtool sticks a -nostdlib flag in there, which causes clang to not link against libclang_rt where the symbol is located.

This issue seems to be somewhat known as there's this commit that adds a patch in vlc https://code.videolan.org/videolan/vlc/-/commit/5c7092dfe6ee45f38c9ff7063678956ace155815. The commit message has a good description of the underlying issue.
Applying libtool-2.4.6-clang-libs.patch (or rather its updated version https://code.videolan.org/videolan/vlc/-/blob/3.0.20/extras/tools/libtool-2.4.6-clang-libs.patch) to vlc does not help. It seems that it gets overridden.
Applying it to gentoo's dev-build/libtool does help, however.
Comment 1 kit 2024-06-01 09:00:42 UTC
Created attachment 894771 [details]
emerge --info