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

Add special consideration for Archlinux #5673

Closed
wants to merge 4 commits into from
Closed

Conversation

kubkon
Copy link
Member

@kubkon kubkon commented Jun 23, 2020

Turns out clang-10 package doesn't ship with individually build clang libs on Archlinux. Instead, it is advised to link against libclang-cpp.so. This commit adds a special section to build instructions for Archlinux about circumventing this issue.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@kubkon
Copy link
Member Author

kubkon commented Jun 23, 2020

Hmm, the CI failure seems somewhat random. I'll try closing and reopening the PR to see if that helps.

Turns out `clang-10` package doesn't ship with individually build clang libs on Archlinux. Instead, it is advised to link against `libclang-cpp.so`. This commit adds a special section to build instructions for Archlinux about circumventing this issue.
@@ -51,6 +51,18 @@ cmake ..
make install
```

Some special considerations for specific hosts:

###### Archlinux
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

Nit: This is how Arch Linux formats its own title.

Suggested change
###### Archlinux
###### Arch Linux

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice, thanks! I'll make sure to fix that in the wiki :-)


The Clang package distributed via official Pacman sources isn't built with static libraries, therefore, it is not possible to statically link
against individual Clang libs. Instead, one should link against the shared lib `libclang-cpp.so`.
Thus, when building on Archlinux, you need to pass `ZIG_PREFER_CLANG_CPP_DYLIB` flag set to true like so:
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

Suggested change
Thus, when building on Archlinux, you need to pass `ZIG_PREFER_CLANG_CPP_DYLIB` flag set to true like so:
Thus, when building on Arch Linux, you need to pass `ZIG_PREFER_CLANG_CPP_DYLIB` flag set to true like so:

@andrewrk
Copy link
Member

Hmm, the CI failure seems somewhat random.

What happened? If there is a flaky test it need to be disabled and issue opened to track it

@andrewrk
Copy link
Member

I'd like to request that this information goes into the Wiki rather than the README. You'll be able to edit that without approval. Related articles:

Then the README can explain how it's supposed to work, any exceptions to this can be documented in the wiki, and the README can point to these articles.

@kubkon
Copy link
Member Author

kubkon commented Jun 26, 2020

Hmm, the CI failure seems somewhat random.

What happened? If there is a flaky test it need to be disabled and issue opened to track it

Oh, this was related to #5679 so all is good now :-)

@kubkon
Copy link
Member Author

kubkon commented Jun 26, 2020

I'd like to request that this information goes into the Wiki rather than the README. You'll be able to edit that without approval. Related articles:

* https://github.com/ziglang/zig/wiki/Building-Zig-on-Windows

* https://github.com/ziglang/zig/wiki/Troubleshooting-Build-Issues

Then the README can explain how it's supposed to work, any exceptions to this can be documented in the wiki, and the README can point to these articles.

Makes sense, thanks for the suggestion! I'll move it to the wiki right away then.

@kubkon kubkon closed this Jun 26, 2020
@kubkon
Copy link
Member Author

kubkon commented Jun 26, 2020

For reference, and if anyone bumps into this PR when searching for Arch Linux, here's the link to the updated wiki with Arch Linux instructions: https://github.com/ziglang/zig/wiki/Troubleshooting-Build-Issues

@kubkon kubkon deleted the patch-1 branch December 9, 2020 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants