Closed jimying closed 1 month ago
I have the same issue with Python's manylinux2014 images, which are Centos7.
The issue can be reproduced with this Dockerfile:
FROM quay.io/pypa/manylinux2014_x86_64
RUN curl -LOJ https://github.com/microsoft/mimalloc/archive/refs/tags/v2.1.4.tar.gz \
&& tar -xzf mimalloc-2.1.4.tar.gz \
&& rm mimalloc-2.1.4.tar.gz
WORKDIR /mimalloc-2.1.4
RUN mkdir -p out/release \
&& cd out/release \
&& cmake ../..
WORKDIR /mimalloc-2.1.4/out/release
CMD ["make"]
docker build --tag manylinux-mimalloc .
docker run --rm manylinux-mimalloc
Please also see the relevant discussion in this mimalloc_rust
issue:
https://github.com/purpleprotocol/mimalloc_rust/issues/111
Thanks for the repro steps -- I hope to get this resolved soon.
@daanx centos7 can use scl install gcc9
yum install centos-release-scl scl-utils devtoolset-9 -y
scl enable devtoolset-9 bash
help this can give you some help
Same issue with gcc 9 and gcc 11 on CentOS7
This seems to be incompatible with older glibc version, because of an unexpected macro expansion coming from bits/string2.h :
# ifndef _HAVE_STRING_ARCH_strdup
extern char *__strdup (const char *__string) __THROW __attribute_malloc__;
# define __strdup(s) \
(__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \
? (((const char *) (s))[0] == '\0' \
? (char *) calloc ((size_t) 1, (size_t) 1) \
: ({ size_t __len = strlen (s) + 1; \
char *__retval = (char *) malloc (__len); \
if (__retval != NULL) \
__retval = (char *) memcpy (__retval, s, __len); \
__retval; })) \
: __strdup (s)))
# if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
# define strdup(s) __strdup (s)
# endif
# endif
This may be due to strdup
being a preprocessor macro.
if it's ok, I'll submit a PR to fix this? ref: https://stackoverflow.com/questions/51233563/is-it-possible-to-overwrite-strdup-from-string-h-with-my-own
I believe it is fixed by the latest release
I try use clang17 and gcc9 build mimalloc on centos7 x86_64, same error log: