Skip to content
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

[macOS arm64] Build fails on Sonoma: gc_priv.h: error: define GC_THREAD_STATE_T; error: 'long long' is a C++11 extension [-Werror,-Wc++11-long-long] #107

Open
barracuda156 opened this issue Dec 22, 2023 · 1 comment

Comments

@barracuda156
Copy link

There are multiple errors on macOS 14:

:info:build [  5%] Building C object iv/lv5/third_party/gc/CMakeFiles/gcmt-dll.dir/alloc.c.o
:info:build cd /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/build/iv/lv5/third_party/gc && /usr/bin/clang -DIV_DISABLE_JIT -Dgcmt_dll_EXPORTS -I/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f -I/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/third_party -I/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/include -I/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/libatomic_ops/src -pipe -Os -DNDEBUG -I/opt/local/include -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-min=14.0 -fPIC   -D_CRT_SECURE_NO_DEPRECATE                  -DALL_INTERIOR_POINTERS -Wno-incompatible-pointer-types -Wno-deprecated-declarations -MD -MT iv/lv5/third_party/gc/CMakeFiles/gcmt-dll.dir/alloc.c.o -MF CMakeFiles/gcmt-dll.dir/alloc.c.o.d -o CMakeFiles/gcmt-dll.dir/alloc.c.o -c /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/alloc.c
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/reclaim.c:17:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/include/private/gc_priv.h:598:7: error: define GC_THREAD_STATE_T
:info:build #     error define GC_THREAD_STATE_T
:info:build       ^
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/alloc.c:18:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/include/private/gc_priv.h:598:7: error: define GC_THREAD_STATE_T
:info:build #     error define GC_THREAD_STATE_T
:info:build       ^
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/alloc.c:18:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/include/private/gc_priv.h:598:7: error: define GC_THREAD_STATE_T
:info:build #     error define GC_THREAD_STATE_T
:info:build       ^
:info:build 1 error generated.
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/alloc.c:18:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/iv/lv5/third_party/gc/include/private/gc_priv.h:598:7: error: define GC_THREAD_STATE_T
:info:build #     error define GC_THREAD_STATE_T
:info:build       ^
:info:build 1 error generated.
:info:build make[2]: *** [iv/lv5/third_party/gc/CMakeFiles/gc-lib.dir/reclaim.c.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build 1 error generated.
. . .
:info:build [  8%] Building CXX object third_party/google-benchmark/CMakeFiles/google-benchmark.dir/src/sleep.cc.o
:info:build cd /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/build/third_party/google-benchmark && /usr/bin/clang++ -DIV_DISABLE_JIT -DOS_MACOSX -I/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/third_party/google-benchmark/include -I/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/third_party/google-benchmark/src -Wall -Wno-unused-const-variable -pedantic-errors -pipe -Os -DNDEBUG -I/opt/local/include -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-min=14.0 -MD -MT third_party/google-benchmark/CMakeFiles/google-benchmark.dir/src/sleep.cc.o -MF CMakeFiles/google-benchmark.dir/src/sleep.cc.o.d -o CMakeFiles/google-benchmark.dir/src/sleep.cc.o -c /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/third_party/google-benchmark/src/sleep.cc
:info:build In file included from /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/third_party/google-benchmark/src/sleep.cc:15:
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/third_party/google-benchmark/src/sleep.h:7:37: error: 'long long' is a C++11 extension [-Werror,-Wc++11-long-long]
:info:build const int64_t kNumMillisPerSecond = 1000LL;
:info:build                                     ^
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/third_party/google-benchmark/src/sleep.h:8:36: error: 'long long' is a C++11 extension [-Werror,-Wc++11-long-long]
:info:build const int64_t kNumMicrosPerMilli = 1000LL;
:info:build                                    ^
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/third_party/google-benchmark/src/sleep.h:9:59: error: 'long long' is a C++11 extension [-Werror,-Wc++11-long-long]
:info:build const int64_t kNumMicrosPerSecond = kNumMillisPerSecond * 1000LL;
:info:build                                                           ^
:info:build /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_devel_iv/iv/work/iv-64c3a9c7c517063f29d90d449180ea8f6f4d946f/third_party/google-benchmark/src/sleep.h:10:35: error: 'long long' is a C++11 extension [-Werror,-Wc++11-long-long]
:info:build const int64_t kNumNanosPerMicro = 1000LL;
:info:build                                   ^
:info:build 4 errors generated.
. . .

iv_macos14.2.log

@barracuda156 barracuda156 changed the title [macOS] Build fails on Sonoma: gc_priv.h: error: define GC_THREAD_STATE_T; error: 'long long' is a C++11 extension [-Werror,-Wc++11-long-long] [macOS arm64] Build fails on Sonoma: gc_priv.h: error: define GC_THREAD_STATE_T; error: 'long long' is a C++11 extension [-Werror,-Wc++11-long-long] Feb 3, 2024
barracuda156 added a commit to barracuda156/iv that referenced this issue Feb 3, 2024
@barracuda156
Copy link
Author

I have fixed the build on Sonoma, but something is still missing, since running lv5 on aarch64 fails with:

GC Warning: Out of memory - trying to allocate less
Insufficient memory for GC_all_nils

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant