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

Minor improvements to README and shell.nix #37

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

delan
Copy link
Contributor

@delan delan commented Apr 26, 2024

While testing this, I ran into a few minor issues:

  • the demo can only be built in release mode, due to servo/servo#31059
  • the build takes over 11 minutes with gnumake 4.4, due to servo/mozjs#375
  • the demo panics unless I switch to Wayland, because I normally use X11 (“Failed to bootstrap native connection: NoCurrentConnection” at src/renderer.rs:267)

This patch adds Servo’s workarounds for the first two in shell.nix, and documents the third in the README.

@delan delan requested a review from vimpostor April 26, 2024 11:23
Some dependencies (e.g. mozjs_sys) need it to find clang, otherwise it
tries to use the system clang:
```
Unable to find libclang: "the `libclang` shared library at /usr/lib/libclang.so.17.0.6 could not be opened: libLLVM-17.so: cannot open shared object file: No such file or directory"
```

The relevant check happens in clang-sys [0] and unfortunately we cannot
use its llvm-config path on Nix (--prefix does not work), so we have to
resort to setting LIBCLANG_PATH directly.

We add llvm-config anyway via llvmPackages.llvm, as it is helpful to
have when used with some other options (e.g. --libdir, which **does**
work on Nix).

[0] https://github.com/KyleMayes/clang-sys/blob/99f4007e0b304631850f34cc1be89ac74f593ab8/build/common.rs#L287
@vimpostor vimpostor merged commit 05399f6 into KDABLabs:main Apr 26, 2024
@delan delan deleted the update-readme-and-nix-shell branch May 22, 2024 07:54
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