tikv / jemallocator

Rust allocator using jemalloc as a backend
Other
332 stars 52 forks source link

Cross-compilation from Linux to MacOS #57

Open serjflint opened 1 year ago

serjflint commented 1 year ago

Hi! I am trying to cross-compile ruff manually. It succeeds for target x86_64-unknown-linux-gnu but fails for target x86_64-apple-darwin. It fails when compiling dependency tikv-jemalloc-sys with an error:

In file included from include/jemalloc/internal/jemalloc_preamble.h:5:
  include/jemalloc/internal/jemalloc_internal_decls.h:23:14: fatal error: 'sys/syscall.h' file not found

Did anyone encounter a similar problem? I am not good with compiler's configuration and need help here. Related issue: https://github.com/astral-sh/ruff/issues/5226

serjflint commented 1 year ago

Providing macOS SDK helped, but is it the only way to cross-compile jemalloc?