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

jemalloc-sys fails to compile with clang 15 #31059

Open
delan opened this issue Jan 11, 2024 · 0 comments
Open

jemalloc-sys fails to compile with clang 15 #31059

delan opened this issue Jan 11, 2024 · 0 comments

Comments

@delan
Copy link
Member

delan commented Jan 11, 2024

Reported by @mukilan with NixOS 23.05 in #31055:

error: failed to run custom build command for `jemalloc-sys v0.5.4+5.3.0-patched`
 
Caused by:
  process didn't exit successfully: `/home/mukilan/dev/servo/target/debug/build/jemalloc-sys-128f6f2e7894a2a7/build-script-build` (exit status: 101)
[...]
  src/malloc_io.c:107:9: error: incompatible pointer to integer conversion returning 'char *' from a function with result type 'int' [-Wint-conversion]
          return strerror_r(err, buf, buflen);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 warning generated.
  1 warning and 1 error generated.
  In file included from make: *** [Makefile:478: src/malloc_io.sym.o] Error 1
  make: *** Waiting for unfinished jobs....
[...]
  thread 'main' panicked at /home/mukilan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jemalloc-sys-0.5.4+5.3.0-patched/build.rs:351:9:
  command did not execute successfully: cd "/home/mukilan/dev/servo/target/debug/build/jemalloc-sys-0a3234e2aba5603a/out/build" && "make" "-j" "24"
  expected success, got: exit status: 2
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

If your distro lets you install older versions of clang with a package like clang-14, you can tell Servo to use it with:

export CC=/usr/bin/clang-14
export CXX=/usr/bin/clang++-14

Alternatively you can try our new Nix-based dev environment, which should now work on any Linux distro. Nix is a package manager with some unusual benefits. Servo can use Nix to find the correct versions of all of its compilers and build dependencies without needing you to install them or run mach bootstrap. All you need to do is install Nix, and export MACH_USE_NIX= to your environment. See the wiki for more details!

delan added a commit to delan/servo that referenced this issue Jan 11, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 11, 2024
* Nix: bump nixpkgs to nixos-unstable (except gnumake + clang)

* we can get clang 11 from nixos-unstable

* bump clang to 15

* simplify approach now that we get clang from nixos-unstable

* drop clang to version 14 (#31059)
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

No branches or pull requests

1 participant