FAMSA
FAMSA copied to clipboard
compiling error on Apple M1 Pro
Dear FAMSA team,
Check the error for apple M1 Pro (I tried both clang and home-brew gcc):
*** Detecting g++ version 8 ***
*** Apple M1 with NEON extensions ***
/Library/Developer/CommandLineTools/usr/bin/make -C libs/libdeflate
c++ -Wall -Wno-char-subscripts -Wno-attributes -O3 -march=armv8.4-a -DOLD_ATOMIC_FLAG -DSIMD=4 -std=c++2a -pthread -I libs -c src/core/profile_par.cpp -o src/core/profile_par.o
In file included from libs/../libs/atomic_wait/barrier:28,
from src/core/profile_par.cpp:39:
libs/../libs/atomic_wait/atomic_wait:355:16: error: redefinition of 'template<class _Tp> void std::atomic_notify_one(const std::atomic<_ITp>)'
355 | __ABI void atomic_notify_one(atomic<_Tp> const a) {
| ^~~~~~~~~~~~~~~~~
In file included from /opt/homebrew/Cellar/gcc/11.3.0_2/include/c++/11/stop_token:34,
from /opt/homebrew/Cellar/gcc/11.3.0_2/include/c++/11/condition_variable:47,
from /opt/homebrew/Cellar/gcc/11.3.0_2/include/c++/11/mutex:46,
from src/core/../core/../utils/memory_monotonic.h:8,
from src/core/../core/sequence.h:13,
from src/core/profile_par.cpp:12:
/opt/homebrew/Cellar/gcc/11.3.0_2/include/c++/11/atomic:1424:5: note: 'template<class _Tp> void std::atomic_notify_one(const std::atomic<_ITp>)' previously declared here
1424 | atomic_notify_one(const atomic<_Tp> __a) noexcept
| ^~~~~~~~~~~~~~~~~
In file included from libs/../libs/atomic_wait/barrier:28,
from src/core/profile_par.cpp:39:
libs/../libs/atomic_wait/atomic_wait:359:16: error: redefinition of 'template<class _Tp> void std::atomic_notify_all(const std::atomic<_ITp>)'
359 | __ABI void atomic_notify_all(atomic<_Tp> const a) {
| ^~~~~~~~~~~~~~~~~
In file included from /opt/homebrew/Cellar/gcc/11.3.0_2/include/c++/11/stop_token:34,
from /opt/homebrew/Cellar/gcc/11.3.0_2/include/c++/11/condition_variable:47,
from /opt/homebrew/Cellar/gcc/11.3.0_2/include/c++/11/mutex:46,
from src/core/../core/../utils/memory_monotonic.h:8,
from src/core/../core/sequence.h:13,
from src/core/profile_par.cpp:12:
/opt/homebrew/Cellar/gcc/11.3.0_2/include/c++/11/atomic:1429:5: note: 'template<class _Tp> void std::atomic_notify_all(const std::atomic<_ITp>)' previously declared here
1429 | atomic_notify_all(const atomic<_Tp> __a) noexcept
| ^~~~~~~~~~~~~~~~~
In file included from src/core/profile_par.cpp:39:
libs/../libs/atomic_wait/barrier: In instantiation of 'size_t barrier<CompletionF>::__get_id(barrier<CompletionF>::__phase_t, ptrdiff_t) [with CompletionF = EmptyCompletionF; size_t = long unsigned int; barrier<CompletionF>::__phase_t = unsigned char; ptrdiff_t = long int]':
libs/../libs/atomic_wait/barrier:112:18: required from 'barrier<CompletionF>::arrival_token barrier<CompletionF>::arrive(ptrdiff_t) [with CompletionF = EmptyCompletionF; barrier<CompletionF>::arrival_token = std::tuple<std::atomic
Thanks,
Jianshu
Hi @jianshu93,
I'll take a look on this issue.
Thanks, Adam
@jianshu93
Can you please check if the latest version of FAMSA compiles at your machine? The automatic detection of g++ version now works on macOS. Our tests on M1 finished successfully but it might be something related with the specific compiler revision. If you still encounter an error, could you please give us the result of g++ --version
command?