Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to port libsodium in Keystone #23

Open
yangshihao-arron opened this issue Oct 10, 2023 · 0 comments
Open

How to port libsodium in Keystone #23

yangshihao-arron opened this issue Oct 10, 2023 · 0 comments

Comments

@yangshihao-arron
Copy link

first I copy the directory sodium_patches into Kyestone
Second I use this command

git checkout 4917510626c55c1f199ef7383ae164cf96044aea
patch -p1 < /home/ysh/code/keystone/sodium_patches/configure.ac.patch
./autogen.sh
./configure --host=riscv64-unknown-linux-gnu --disable-ssp --disable-asm --without-pthreads
make
export LIBSODIUM_DIR=$(pwd)/src/libsodium/

it is successful
third I build the SDK
Fourth, I tested whether it was successful,I use the code below in eapp_native.c

#include "sodium.h"
int main(){
   if (sodium_init() < 0) {
       ocall_print_string("sodium failed");
    }else{
      ocall_print_string("sodium successful");
    }
}

but when I use make hello-native-package it occurs:/home/ysh/code/keystone/sdk/examples/hello-native/eapp/eapp_native.c:11:10: fatal error: sodium.h: No such file or directory
11 | #include "sodium.h"
| ^~~~~~~~~~
compilation terminated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant