hoytech / strfry

a nostr relay
GNU General Public License v3.0
498 stars 98 forks source link

Compilation error: "src/events.h:4:10: fatal error: secp256k1_schnorrsig.h: No such file or directory" #3

Open ghobs91 opened 1 year ago

ghobs91 commented 1 year ago

When I run the make -j4 command, this is the full output I get, even after doing a git pull with the latest update you pushed.

g++ -std=c++2a -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/quadrable/include -MMD -MP -MT src/RelayWebsocket.o -MF src/RelayWebsocket.d -c src/RelayWebsocket.cpp -o src/RelayWebsocket.o

g++ -std=c++2a -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/quadrable/include -MMD -MP -MT src/RelayIngester.o -MF src/RelayIngester.d -c src/RelayIngester.cpp -o src/RelayIngester.o

g++ -std=c++2a -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/quadrable/include -MMD -MP -MT src/cmd_sync.o -MF src/cmd_sync.d -c src/cmd_sync.cpp -o src/cmd_sync.o

g++ -std=c++2a -O3 -g -Wall -fPIC  -DDOCOPT_HEADER_ONLY -Iinclude -Ibuild -Isrc -Igolpe/external -Igolpe/external/config/include -Igolpe/external/json/include -Igolpe/external/PEGTL/include -Igolpe/external/hoytech-cpp -Igolpe/external/docopt.cpp -Igolpe/external/loguru -Igolpe/external/quadrable/include -MMD -MP -MT src/RelayReqWorker.o -MF src/RelayReqWorker.d -c src/RelayReqWorker.cpp -o src/RelayReqWorker.o

In file included from src/WriterPipeline.h:7,
                 from src/cmd_sync.cpp:9:
src/events.h:4:10: fatal error: secp256k1_schnorrsig.h: No such file or directory
    4 | #include <secp256k1_schnorrsig.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [golpe/rules.mk:26: src/cmd_sync.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from src/RelayServer.h:19,
                 from src/RelayIngester.cpp:1:
src/events.h:4:10: fatal error: secp256k1_schnorrsig.h: No such file or directory
    4 | #include <secp256k1_schnorrsig.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [golpe/rules.mk:26: src/RelayIngester.o] Error 1
In file included from src/RelayServer.h:19,
                 from src/RelayWebsocket.cpp:1:
src/events.h:4:10: fatal error: secp256k1_schnorrsig.h: No such file or directory
    4 | #include <secp256k1_schnorrsig.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [golpe/rules.mk:26: src/RelayWebsocket.o] Error 1
In file included from src/RelayServer.h:19,
                 from src/RelayReqWorker.cpp:1:
src/events.h:4:10: fatal error: secp256k1_schnorrsig.h: No such file or directory
    4 | #include <secp256k1_schnorrsig.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [golpe/rules.mk:26: src/RelayReqWorker.o] Error 1
hoytech commented 1 year ago

This probably means you don't have the libsecp256k1 library and its header files installed. Are you on debian/ubuntu? If so, make sure the libsecp256k1-dev package is installed. Otherwise, your platform may have a differently named package. Alternatively you'll have to install from source here: https://github.com/bitcoin-core/secp256k1

scsibug commented 1 year ago

On Fedora, I had to install by source. I don't think the distro-provided lib provides schnorr signatures.

Procedure is basically;

peterzion45 commented 1 year ago

c9fa49650c11b0aeca2d4becc3bfe901df4d2e636375a33685619855c16fb793

peterzion45 commented 1 year ago

What is a libsec256k1?

bortloff commented 1 year ago

If you're on Arch, you'll need to get the libsecp256k1-git package from the AUR before it'll compile.