-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Compile error on Apple M1 Chip running as Rosetta2 x86 #1997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Facing the exact same problem. |
I'm facing a similar issue, also running Mac m1 with rosetta2. It seems that
|
this fails for compiles running on x86_64 as well on osx under lima. --with-lg-vaddr=48 works there as well. |
Some testing shows that LG_VADDR is being set to 0 on this platform by autogen.sh |
Thanks for sharing the info! @brokenjacobs : can you please help to try if the tests all pass with |
I think I found the source of the issue: I've been playing around with the check and pulled the test out like this:
Inside lima, this returns incorrectly, which lead me to the QEMU bug. NOT IN VM: Inside VM: |
It does, but this is actually a QEMU bug. |
For folks that need an immediate work around like I needed in my build environment, apply this patch before running configure:
|
Further discussion here: <jemalloc/jemalloc#1997> include/jemalloc/internal/rtree.h:118:3: error: constant expression evaluates to -12 which cannot be narrowed to type 'unsigned int' [-Wc++11-narrowing] {RTREE_NSB, RTREE_NHIB + RTREE_NSB} ^~~~~~~~~ include/jemalloc/internal/rtree.h:22:19: note: expanded from macro 'RTREE_NSB' #define RTREE_NSB (LG_VADDR - RTREE_NLIB) ^~~~~~~~~~~~~~~~~~~~~~~ include/jemalloc/internal/rtree.h:118:3: note: insert an explicit cast to silence this issue {RTREE_NSB, RTREE_NHIB + RTREE_NSB} ^~~~~~~~~ static_cast<unsigned int>( ) include/jemalloc/internal/rtree.h:22:19: note: expanded from macro 'RTREE_NSB' #define RTREE_NSB (LG_VADDR - RTREE_NLIB) ^~~~~~~~~~~~~~~~~~~~~~~
Further discussion here: <jemalloc/jemalloc#1997> include/jemalloc/internal/rtree.h:118:3: error: constant expression evaluates to -12 which cannot be narrowed to type 'unsigned int' [-Wc++11-narrowing] {RTREE_NSB, RTREE_NHIB + RTREE_NSB} ^~~~~~~~~ include/jemalloc/internal/rtree.h:22:19: note: expanded from macro 'RTREE_NSB' #define RTREE_NSB (LG_VADDR - RTREE_NLIB) ^~~~~~~~~~~~~~~~~~~~~~~ include/jemalloc/internal/rtree.h:118:3: note: insert an explicit cast to silence this issue {RTREE_NSB, RTREE_NHIB + RTREE_NSB} ^~~~~~~~~ static_cast<unsigned int>( ) include/jemalloc/internal/rtree.h:22:19: note: expanded from macro 'RTREE_NSB' #define RTREE_NSB (LG_VADDR - RTREE_NLIB) ^~~~~~~~~~~~~~~~~~~~~~~
Working towards making the build deterministic regardless of the build host Page size: jemalloc/jemalloc#467 https://sources.debian.org/src/jemalloc/5.3.0-3/debian/rules/ NixOS#380852 Darwin: Similar to NixOS#394620 LG_VADDR: jemalloc/jemalloc#1997
Working towards making the build deterministic regardless of the build host Page size: jemalloc/jemalloc#467 https://sources.debian.org/src/jemalloc/5.3.0-3/debian/rules/ NixOS#380852 Darwin: Similar to NixOS#394620 LG_VADDR: jemalloc/jemalloc#1997
Uh oh!
There was an error while loading. Please reload this page.
Sorry, I'm totally newbie to this repo and probably I event don't know what I'm talking about, but just wanted to put this log here so if anyone encounter this issue its not the only one. I tried to search about this error and nothing specific.
The device I'm using is Apple MacBook Air M1 chip, I know lots of errors on this device just it happens to be me on this specific one error.
Trying to install jemalloc package with homebrew and cause a compile error.
This log is from homebrew, you probably can reproduce the issue by running this cmd
$arch -x86_64 brew install jemalloc
The text was updated successfully, but these errors were encountered: