meilisearch: Build fails on FreeBSD as of latest commit
Describe the bug The build fails on FreeBSD as of the latest commit (updating from 918ce1dd674f99a41545c50272507a275ca53baf to b2dee07b5e513058c58ad608a8e6880179f6759c)
To Reproduce Steps to reproduce the behavior:
git pull --ff
cargo build --release
Expected behavior Successful build
Logs
...
Compiling segment v0.2.2
The following warnings were emitted during compilation:
warning: In file included from c_src/mimalloc/src/static.c:37:
warning: In file included from c_src/mimalloc/src/prim/prim.c:22:
warning: c_src/mimalloc/src/prim/unix/prim.c:172:184: error: use of undeclared identifier 'hint'; did you mean 'link'?
warning: _mi_warning_message("unable to directly request aligned OS memory (error: %d (0x%x), size: 0x%zx bytes, alignment: 0x%zx, hint address: %p)\n", err, err, size, try_alignment, hint);
warning: ^~~~
warning: link
warning: /usr/include/unistd.h:351:6: note: 'link' declared here
warning: int link(const char *, const char *);
warning: ^
warning: 1 error generated.
error: failed to run custom build command for `libmimalloc-sys v0.1.32`
Caused by:
process didn't exit successfully: `/root/meilisearch/target/release/build/libmimalloc-sys-4080080ea4344f77/build-script-build` (exit status: 1)
--- stdout
OPT_LEVEL = Some("3")
TARGET = Some("x86_64-unknown-freebsd")
HOST = Some("x86_64-unknown-freebsd")
cargo:rerun-if-env-changed=CC_x86_64-unknown-freebsd
CC_x86_64-unknown-freebsd = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_freebsd
CC_x86_64_unknown_freebsd = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-freebsd
CFLAGS_x86_64-unknown-freebsd = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_freebsd
CFLAGS_x86_64_unknown_freebsd = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CC_x86_64-unknown-freebsd
CC_x86_64-unknown-freebsd = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_freebsd
CC_x86_64_unknown_freebsd = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-freebsd
CFLAGS_x86_64-unknown-freebsd = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_freebsd
CFLAGS_x86_64_unknown_freebsd = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "c_src/mimalloc/include" "-I" "c_src/mimalloc/src" "-Wall" "-Wextra" "-ftls-model=initial-exec" "-DMI_DEBUG=0" "-o" "/root/meilisearch/target/release/build/libmimalloc-sys-0fb61fc61da7cd89/out/c_src/mimalloc/src/static.o" "-c" "c_src/mimalloc/src/static.c"
cargo:warning=In file included from c_src/mimalloc/src/static.c:37:
cargo:warning=In file included from c_src/mimalloc/src/prim/prim.c:22:
cargo:warning=c_src/mimalloc/src/prim/unix/prim.c:172:184: error: use of undeclared identifier 'hint'; did you mean 'link'?
cargo:warning= _mi_warning_message("unable to directly request aligned OS memory (error: %d (0x%x), size: 0x%zx bytes, alignment: 0x%zx, hint address: %p)\n", err, err, size, try_alignment, hint);
cargo:warning= ^~~~
cargo:warning= link
cargo:warning=/usr/include/unistd.h:351:6: note: 'link' declared here
cargo:warning=int link(const char *, const char *);
cargo:warning= ^
cargo:warning=1 error generated.
exit status: 1
--- stderr
error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "c_src/mimalloc/include" "-I" "c_src/mimalloc/src" "-Wall" "-Wextra" "-ftls-model=initial-exec" "-DMI_DEBUG=0" "-o" "/root/meilisearch/target/release/build/libmimalloc-sys-0fb61fc61da7cd89/out/c_src/mimalloc/src/static.o" "-c" "c_src/mimalloc/src/static.c" with args "cc" did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
Meilisearch version: b2dee07b5e513058c58ad608a8e6880179f6759c
Additional context Additional information that may be relevant to the issue. FreeBSD, x86_64, Rust 1.68.2
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (10 by maintainers)
I opened this https://github.com/purpleprotocol/mimalloc_rust/issues/95
Hello @ThatOneCalculator Sorry for the inconvenience In the meantime you can use our Cloud offer to avoid any deployment/installation issues, so compilation issues like this one. The Meilisearch team will deploy a Meilisearch instance for you and you don’t have to care about the production part, only about feeding and using your Meilisearch.
@oluademola, can you take care of this please? Because @irevoire has been absent for an undetermined time 😢
@ThatOneCalculator Meilisearch uses
mimalloc v0.1.36
whilemimalloc v0.1.37
contains the fixes.Thanks @ThatOneCalculator I’m afraid taking that on is not a priority for us as a team at the moment. If anyone in the community is able to help us out it would be much appreciated.
Hey @ThatOneCalculator,
That’s because in meilisearch we’re using the rust wrapper over mimalloc: https://github.com/purpleprotocol/mimalloc_rust
It would be nice if you could open an issue on their side explaining where is the fix and once they release it we’ll be able to integrate it to meilisearch!
Thanks for your investigation.
This is the fix
https://github.com/microsoft/mimalloc/commit/bcbcc343ec658382bc6ab59615590c1cdb75ef6e