can't build on debian host
craigcomstock opened this issue · comments
After I fixed the bearssl include problem with
I get
craig@other:~/src/solokeys-openpgp$ make
g++ -std=c++17 -Os -Wall -g3 -I. -Ipc/ -Isrc/ -Ilibs/mbedtls/ -Ilibs/mbedtls/mbedtls/crypto/include/ -Ilibs/stm32fs/ -Ilibs/bearssl/ -c -o obj/opgpdevice.o ./pc/opgpdevice.cpp
./pc/opgpdevice.cpp:31:10: fatal error: spiffs.h: No such file or directory
#include <spiffs.h>
^~~~~~~~~~
compilation terminated.
make: *** [Makefile:28: obj/opgpdevice.o] Error 1
workaround is to remove the 'pc' directory so I just build for the solokeys hacker device
craig@other:~/src/solokeys-openpgp$ git diff
diff --git a/Makefile b/Makefile
index a37b4ea..0a8c2af 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,7 @@ RM = rm -rf
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
OBJ_DIR := ./obj
-SRC_DIRS := ./pc \
- ./src \
+SRC_DIRS := ./src \
./src/applications \
./src/applications/openpgp \
./libs/stm32fs
but that leaves me with the next error:
c/cryptolib.cpp
./src/cryptolib.cpp:15:10: fatal error: device.h: No such file or directory
#include "device.h"
^~~~~~~~~~
compilation terminated.
make: *** [Makefile:27: obj/cryptolib.o] Error 1
I will continue working through these errors and see if I can fix things up and submit a PR.
I copied a few header files from https://github.com/solokeys/solo/tree/master/fido2 but can't find cbor.h
Something like this?
https://github.com/ssilverman/libCBOR
p.s. I tried making sure submodules were present and didn't see any mention of any.
Am I not doing something right? The README just says git clone --recurse
and then make
Oh! I see that -Ilibs/mbedtls/ -Ilibs/mbedtls/mbedtls/crypto/include/
are not present in my checked out tree. So maybe that is what is missing.
I tried git submodule add https://github.com/ARMmbed/mbedtls
but still cbor.h is not found. Will check back again later for any feedback and try some more. Thanks.
Maybe this? https://github.com/PJK/libcbor looks like the right sort of thing.
Rather, sudo apt install libcbor-dev
fixed cbor.
I see in this commit that libsalty was added
But I can't figure out where that library comes from.
https://github.com/intel/tinycbor
it includes from the main solo repository
@merlokk ack. Thanks for merging my PR. I see this now in the main solo repo:
craig@other:~/src/solokeys-solo$ git submodule
-d04dd318609733d809904d4f2973597240655cde crypto/cifra
-601bd11062c551b108adbb43ba99f199b840777c crypto/micro-ecc
-4b97e75fb96c08f026d545f7f8905b5daa14e9e8 crypto/tiny-AES-c
-878eb01b96c573e353b217439c0f418f69c2ca04 tinycbor
So any thoughts on where to find libsalty?
I'll post another PR with my other changes.
#21 too much( needs to rewrite /pc directory sources to use bearssl and stm32fs
So any thoughts on where to find libsalty?
https://github.com/ycrypto/salty, in particular https://github.com/ycrypto/salty/blob/main/c-api/Makefile#L2
This is a Rust/assembly implementation (with C API wrapper) of ed255 signatures we will be using with SoloKeys for our v2 key.