OSX C++ Client

Anyone get the C++ client to build on OSX even though it's not officially supported yet? Anyone have an ETA for OSX support on the C++ client?


  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    edited February 2014
    There's no ETA but it's coming soon, think weeks, not months.

    Edit: some have reported it working already, probably took some considerable effort.
  • giantfishgiantfish Member Posts: 15
    So close. Looks like it's going to make it, but fails on: make -j6

    I brewed the dependancies as instructed.

    ld: library not found for -lboost_thread
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make[2]: *** [libethereum/libethereum.dylib] Error 1
    make[1]: *** [libethereum/CMakeFiles/ethereum.dir/all] Error 2
    make: *** [all] Error 2
  • awrelllawrelll BucurestiMember Posts: 65 ✭✭
    have you brewed cmake? try this and after that, make -j6 again.
  • daniel_hamsdaniel_hams Member Posts: 8
    Your problem is I'm guessing due to this merge:


    It added a dependency on the boost thread library.

    In your build directory try to remove the CMakeCache.txt and re-run the cmake command from the build instructions.

    If that doesn't work, we'll need to work out why you don't have the necessary lib or why it can't find it.
  • giantfishgiantfish Member Posts: 15
    cmake is installed:

    1058392:cpp-ethereum-build joe$ brew install cmake
    Error: cmake- already installed

    I removed CMakeCache.txt and re-ran cmake and make. Failed again on make. Looking into where that library is for -lboost_thread
  • giantfishgiantfish Member Posts: 15
    I know I have boost:

    1058392:~ joe$ brew install boost --c++11
    ==> Downloading http://downloads.sourceforge.net/project/boost/boost/1.55.0/boos
    ######################################################################## 100.0%
    ==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.55.0 --libdir=/usr/local/C
    ==> ./b2 --prefix=/usr/local/Cellar/boost/1.55.0 --libdir=/usr/local/Cellar/boos
    ???? /usr/local/Cellar/boost/1.55.0: 10040 files, 506M, built in 41.8 minutes
  • daniel_hamsdaniel_hams Member Posts: 8
    Hmm. That's a little strange :-)

    Okay - could you try this to see where the boost_filesystem library it does find is:

    find /usr/local -name "libboost_filesystem.dylib" -print 2>/dev/null

    And then do the same for boost_thread:

    find /usr/local -name "libboost_thread.dylib" -print 2>/dev/null

    This should give us an idea if the library is in the appropriate place and next to one it does find.
  • giantfishgiantfish Member Posts: 15
    1058392:cpp-ethereum-build joe$ find /usr/local -name "libboost_filesystem.dylib" -print 2>/dev/null
    1058392:cpp-ethereum-build joe$ find /usr/local -name "libboost_thread.dylib" -print 2>/dev/null

    nothing found for libboost_thread.dylib?
  • giantfishgiantfish Member Posts: 15
    However there is a "libboost_thread-mt.dylib" at /usr/local/Cellar/boost/1.55.0/lib/

  • daniel_hamsdaniel_hams Member Posts: 8
    Ah, that's interesting.

    Try modifying the CMakeLists.txt in libethereum to change

    target_link_libraries(ethereum boost_thread)

    to be

    target_link_libraries(ethereum boost_thread-mt)

    After you've modified that file, you'll need to rerun the cmake and then the make (may need to remove the CMakeCache.txt as well).

    We're getting a bit nearer.
  • giantfishgiantfish Member Posts: 15
    that worked!

    however, I can't run AlethZero.app:

    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0 libsystem_kernel.dylib 0x00007fff8db77866 __pthread_kill + 10
    1 libsystem_pthread.dylib 0x00007fff8d1ce35c pthread_kill + 92
    2 libsystem_c.dylib 0x00007fff9514ebba abort + 125
    3 QtCore 0x00000001055aa969 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9
    4 QtCore 0x00000001055aaf81 QMessageLogger::fatal(char const*, ...) const + 161
    5 QtGui 0x0000000105b8565c QGuiApplicationPrivate::createPlatformIntegration() + 4268
    6 QtGui 0x0000000105b8567b QGuiApplicationPrivate::createEventDispatcher() + 27
    7 QtCore 0x00000001057996e8 QCoreApplication::init() + 104
    8 QtCore 0x0000000105799667 QCoreApplication::QCoreApplication(QCoreApplicationPrivate&) + 39
    9 QtGui 0x0000000105b8360e QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) + 14
    10 QtWidgets 0x0000000106025f4e QApplication::QApplication(int&, char**, int) + 206
    11 . 0x000000010550e0dc main + 60
    12 libdyld.dylib 0x00007fff94b0b5fd start + 1

    This might be because during the make process there were these warnings and errors:

    Generating ui_Main.h
    ERROR: Could not find bundle binary for "/Users/joe/Desktop/cpp-ethereum-build/alethzero/AlethZero.app"
    ERROR: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: can't open file: (No such file or directory)
    WARNING: Could not find any external Qt frameworks to deploy in "/Users/joe/Desktop/cpp-ethereum-build/alethzero/AlethZero.app"
    WARNING: Perhaps macdeployqt was already used on "/Users/joe/Desktop/cpp-ethereum-build/alethzero/AlethZero.app" ?
    WARNING: If so, you will need to rebuild "/Users/joe/Desktop/cpp-ethereum-build/alethzero/AlethZero.app" before trying again.
    ERROR: Could not find bundle binary for "/Users/joe/Desktop/cpp-ethereum-build/alethzero/AlethZero.app"

    I know I have QT:

    1058392:~ joe$ brew install qt5
    Warning: qt5-5.2.0 already installed
  • daniel_hamsdaniel_hams Member Posts: 8

    That's strange. Unfortunately I'm not using brew to install dependencies (I've done them by hand) so I don't see these particular errors.

    Only thing I can suggest for now is try a make clean and make again just in case something that needs to be rebuilt hasn't been.

    Otherwise, we might have to wait a little bit for the devs to release a patch.
  • giantfishgiantfish Member Posts: 15
    thanks for the help!
  • daniel_hamsdaniel_hams Member Posts: 8
    Hey giantfish, there is a newer version you can update to that includes some patches of the build process for OSX.

    If possible try a clean checkout (unless you're confident in your update and build clean again skills).

    We'll see if that makes things any better.
  • jesus666jesus666 Member Posts: 62 ✭✭
    Just wanted to leave my $0.02 on compiling the cpp client on OSX. There's a pre-packaged client built for OSX available (which... just works) but I wanted to try and build it from source anyway. Basically, I hit exactly the same issues as giantfish did (some bs about missing QT, allethzero not working etc), but "make clean" and "make" the second time around, albeit with some errors (no file at .../libethereum.dylib, no file at .../libsecp256k1.dylib), did the job. The client looks pretty functional
  • awrelllawrelll BucurestiMember Posts: 65 ✭✭
    any updates on this issue? i'm got the same problems @giantfish
  • daniel_hamsdaniel_hams Member Posts: 8
    For anyone with the same problem (dispatch queue crash), awrelll + I looked into a bit and created a github issue you can follow and/or help with:

  • awrelllawrelll BucurestiMember Posts: 65 ✭✭
  • subtlysubtly Member Posts: 7
    When building from source, 'make install' is required for the bundled app to run.
Sign In or Register to comment.