jb55 / lnsocket

A minimal C & js library for sending messages to lightning nodes
Other
61 stars 9 forks source link

getting a build error running `make` #1

Closed niftynei closed 2 years ago

niftynei commented 2 years ago
ld test
cc -Wall -Os -Ideps/secp256k1/include -Ideps/libsodium/src/libsodium/include -Ideps test.o sha256.o hkdf.o hmac.o sha512.o lnsocket.o error.o handshake.o crypto.o bigsize.o commando.o bech32.o libsecp256k1.a libsodium.a lnsocket.a  -o test
/usr/bin/ld: handshake.o: in function `lnsocket_act_two':
handshake.c:(.text+0x3c3): undefined reference to `secp256k1_ecdh'
/usr/bin/ld: handshake.c:(.text+0x53a): undefined reference to `secp256k1_ecdh'
/usr/bin/ld: handshake.o: in function `act_one_initiator_prep':
handshake.c:(.text+0x6dc): undefined reference to `secp256k1_ecdh'
collect2: error: ld returned 1 exit status
make: *** [Makefile:170: test] Error 1
niftynei commented 2 years ago

Also getting this, maybe related?

sodium/utils.c:131:5: error: implicit declaration of function 'explicit_bzero' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    explicit_bzero(pnt, len);
    ^
1 error generated.
ERROR    root: compiler frontend failed to generate LLVM bitcode, halting
niftynei commented 2 years ago

idk what happened, it fixed itself.