Skip to content

meson: fix build with lld on linux#183

Open
natthias wants to merge 1 commit into
latchset:masterfrom
natthias:master
Open

meson: fix build with lld on linux#183
natthias wants to merge 1 commit into
latchset:masterfrom
natthias:master

Conversation

@natthias

Copy link
Copy Markdown

Currently, building on a system with clang fails with
clang: error: unknown argument: '-export-symbols-regex=^jose_.*'
as they are not 1:1 compatible. This fixes this by explicitly checking for clang and falling back to the FreeBSD check, which also uses clang.

Not sure if this is the correct solution, but jose now successfully builds with both clang and gcc.

@hdholm

hdholm commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

It looks to me like v15 built with clang correctly (see https://github.com/latchset/jose/actions/runs/27129994139 ) Is there some detail I'm missing about the clang build on which you're seeing this?

@natthias

natthias commented Jun 13, 2026

Copy link
Copy Markdown
Author

Ahh yea, a bit too fast there. This is not the fault of clang itself, but rather using lld as the linker instead of bfd. Converting this to a draft as this is definetly not the correct solution.

edit:
Interestingly, gcc only treats ld.lld: warning: cannot find entry symbol xport-symbols-regex=^jose_.*; not setting start address as a warning, and not and error.

@natthias natthias marked this pull request as draft June 13, 2026 10:01
@natthias

Copy link
Copy Markdown
Author

Yea, so the issue seems to be exactly what the freebsd faced in #152.
Perhaps checking for lld and then falling back to the --undefined-version invocation is a more scalable solution going forward?

@natthias

Copy link
Copy Markdown
Author

Now explicitly checks for lld instead of clang.

@natthias natthias marked this pull request as ready for review June 14, 2026 23:01
@natthias natthias changed the title meson: fix build with clang on linux meson: fix build with lld on linux Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants