3

I'm using QT and the ed25519-donna lib to validate my signature.

Linux I'm using this lib => libssl-dev

MacOs I'm using this lib => openssl

So when I try to compile by Linux its work but when I try in MacOs the donna libs give a error:

    openssl/rand.h is not found

I've this line in my Makefile:

    LIBS = $(SUBLIBS) -L/home/laion/Desktop/lethean-gui/lethean/lib -lwallet_merged -lepee -lunbound -leasylogging -lboost_serialization -lboost_thread -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_chrono -lboost_program_options -lssl -lcrypto -Wl,-Bdynamic -Wl,-Bdynamic -lunwind -ldl -lQt5Quick -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGL -lpthread 

When you look to donna libs you can see a ed25519.c file and inside of that call the ed25519-randombytes.h, inside of this file has the openssl/rand.h include.

Inside of my .pro file I use this:

    macx {
        # mixing static and shared libs are not supported on mac
        # CONFIG(static) {
        #     message("using static libraries")
        #     LIBS+= -Wl,-Bstatic
        # }
        LIBS+= \
            -L/usr/local/lib \
            -L/usr/local/opt/openssl/lib \
            -L/usr/local/opt/boost/lib \
            -lboost_serialization \
            -lboost_thread-mt \
            -lboost_system \
            -lboost_system-mt \
            -lboost_date_time \
            -lboost_filesystem \
            -lboost_regex \
            -lboost_chrono \
            -lboost_chrono-mt \
            -lboost_program_options \
            -lssl \
            -lcrypto \
            -ldl

        INCLUDEPATH += /usr/local/opt/boost/include/

    }

So, if I add this path in INCLUDEPATH:

    /usr/local/opt/openssl/include \
    /usr/local/opt/openssl/lib

I get a different error:

    The program has unexpectedly finished.

    // every donna file get this message
    was built for newer osx version (10.13) than being linked (10.12)

For now I get this reference C++, Mac OS X, Xcode 8 : Compile Boost : Set deployment target to OS X 10.11 and I come back to let you know if works

FIXED << The problem was the version of Mac. To work with donna and openssl is necessary 10.12+ to compile

Laion Camargo
  • 145
  • 1
  • 11

0 Answers0