🌐 AI搜索 & 代理 主页
Skip to content

Compilation error with mimalloc 2.2.3 #132

@LesnyRumcajs

Description

@LesnyRumcajs

With mimalloc 2.2.3 provided by Fedora package, this project no longer compiles.

   Compiling libmimalloc-sys v0.1.25 (/home/rumcajs/prj/bytehound/mimalloc_rust/libmimalloc-sys)
The following warnings were emitted during compilation:

warning: In file included from c_src/mimalloc/include/mimalloc-types.h:13,
warning:                  from c_src/mimalloc/include/mimalloc-internal.h:11,
warning:                  from c_src/mimalloc/src/static.c:17:
warning: c_src/mimalloc/src/os.c: In function ‘mi_os_resetx’:
warning: c_src/mimalloc/include/mimalloc-atomic.h:42:33: error: implicit declaration of function ‘ATOMIC_VAR_INIT’; did you mean ‘ATOMIC_FLAG_INIT’? [-Wimplicit-function-declaration]
warning:    42 | #define  MI_ATOMIC_VAR_INIT(x)  ATOMIC_VAR_INIT(x)
warning:       |                                 ^~~~~~~~~~~~~~~
warning: c_src/mimalloc/src/os.c:1015:35: note: in expansion of macro ‘MI_ATOMIC_VAR_INIT’
warning:  1015 |   static _Atomic(size_t) advice = MI_ATOMIC_VAR_INIT(MADV_FREE);
warning:       |                                   ^~~~~~~~~~~~~~~~~~

...
...
...
  error occurred: Command "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64" "-I" "c_src/mimalloc/include" "-I" "c_src/mimalloc/src" "-Wall" "-Wextra" "-ftls-model=initial-exec" "-DMI_DEBUG=0" "-o" "/home/rumcajs/prj/bytehound/target/release/build/libmimalloc-sys-bd1db5b7b2544884/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).

This is caused by the old https://github.com/koute/bytehound/tree/master/mimalloc_rust version = "0.1.29" used as a dependency. I checked on a fresh project and it fails with same error for that exact version from an official crate https://crates.io/crates/libmimalloc-sys and it succeeds for the recent one v0.1.43.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions