sierkov / daedalus-turbo

Daedalus Turbo: 10-times-quicker bulk synchronization for Cardano
Apache License 2.0
21 stars 3 forks source link

Building DT on Mac OS ARM #2

Closed abailly-iohk closed 7 months ago

abailly-iohk commented 7 months ago

I am trying to build DT code locally, on a darwin-aarch64 machine. Is this possible? Configuring with cmake -B cmake-build-release works once I have installed all dependencies but I got a lot of errors when building with cmake --build cmake-build-release -j3 -t dt, for example:

In file included from /Users/arnaud/projects/daedalus-turbo/lib/dt/lib.cpp:5:
In file included from /Users/arnaud/projects/daedalus-turbo/lib/./dt/file.hpp:10:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/filesystem:435:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__filesystem/directory_entry.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__filesystem/filesystem_error.h:15:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__filesystem/path.h:20:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/string:560:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__memory_resource/polymorphic_allocator.h:20:
/Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/tuple:1802:7: error: no matching constructor for initialization of 'daedalus_turbo::cardano::amount'
      second(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
      ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Any clues?

sierkov commented 7 months ago

Hi Arnaud,

It has been tested on Mac OS Sonoma 14.2.1 and compiled with Clang 17.0.6, a newer Clang version than the default one that was installed with brew. I suppose that the older compiler version is the cause of the errors.

Cheers, Alex

On Tue, Feb 27, 2024 at 8:56 AM Arnaud Bailly @.***> wrote:

I am trying to build DT code locally, on a darwin-aarch64 machine. Is this possible? Configuring with cmake -B cmake-build-release works once I have installed all dependencies but I got a lot of errors when building with cmake --build cmake-build-release -j3 -t dt, for example:

In file included from /Users/arnaud/projects/daedalus-turbo/lib/dt/lib.cpp:5: In file included from /Users/arnaud/projects/daedalus-turbo/lib/./dt/file.hpp:10: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/filesystem:435: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/filesystem/directory_entry.h:20: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__filesystem/filesystem_error.h:15: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/filesystem/path.h:20: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/string:560: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/__memory_resource/polymorphic_allocator.h:20: /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/c++/v1/tuple:1802:7: error: no matching constructor for initialization of 'daedalus_turbo::cardano::amount' second(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...) ^ ~~~~~~~~~~~~~~

Any clues?

— Reply to this email directly, view it on GitHub https://github.com/sierkov/daedalus-turbo/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHPTPCDWRQOQ2EOYR5QZ56LYVWGRZAVCNFSM6AAAAABD3TGNN2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2TKOJQGY3DGMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

abailly-iohk commented 7 months ago

I was able to build it with the following few commands:

brew install cmake fmt boost spdlog sodium llvm@17
cmake -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm@17/bin/clang  --build cmake-build-release -j3 -t dt
cmake --build cmake-build-release -j3 -t dt