Giter VIP home page Giter VIP logo

Comments (7)

hombit avatar hombit commented on June 4, 2024 1

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:
purpleprotocol/mimalloc_rust#111

from mimalloc.

tbzhang avatar tbzhang commented on June 4, 2024 1

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

from mimalloc.

daanx avatar daanx commented on June 4, 2024

Thanks for the repro steps -- I hope to get this resolved soon.

from mimalloc.

jimying avatar jimying commented on June 4, 2024

@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

from mimalloc.

keyihao avatar keyihao commented on June 4, 2024

Same issue with gcc 9 and gcc 11 on CentOS7

from mimalloc.

nautaa avatar nautaa commented on June 4, 2024

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

from mimalloc.

hombit avatar hombit commented on June 4, 2024

I believe it is fixed by the latest release

from mimalloc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.