Keystone Demo cmake error

131 views
Skip to first unread message

Nigel Cole

unread,
Mar 2, 2021, 6:27:21 AM3/2/21
to Keystone Enclave Forum
Hello!

I am trying to build the keystone demo using the quick-start.sh. I get the error:

keystone/sdk/build64/cmake/macros.cmake:126 (add_custom_target):
The target name "package" is reserved or not valid for certain CMake features, such as generator expressions, and may result in undefined behavior.

and other errors which seem to be the result of non-existing target "package".

In keystone, branch dev. I added riscv-pk to keystone for the hash folder("cp $KEYSTONE_DIR/riscv-pk/hash/*.h include/" in quick-start.sh).

In keystone-demo, branch dev-new-sdk. I run source source.sh and source ../keystone/source.sh, then quick-start.sh.

Is this a problem on my side? The error occurs when running cmake .. in my build directory, in keystone-demo.

Regards,

Nigel

Dayeol Lee

unread,
Mar 2, 2021, 1:17:22 PM3/2/21
to Nigel Cole, Keystone Enclave Forum
Hi Nigel,

Keystone-demo is currently obsolete because we moved from riscv-pk to opensbi-based sm.

Thanks,
Dayeol

--
You received this message because you are subscribed to the Google Groups "Keystone Enclave Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keystone-enclave-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keystone-enclave-forum/1ee05773-6c97-44e5-96ac-9b21e8c8bf44n%40googlegroups.com.

Nigel Cole

unread,
Mar 3, 2021, 3:03:48 AM3/3/21
to Keystone Enclave Forum
Okay! Thank you! :)

Regards,

Nigel

Nigel Cole

unread,
Mar 9, 2021, 7:37:38 AM3/9/21
to Keystone Enclave Forum
Hello!

I still cannot get it to work. I get the error:

keystone/sdk/build64/cmake/macros.cmake:126 (add_custom_target):
The target name "package" is reserved or not valid for certain CMake features, such as generator expressions, and may result in undefined behavior.
Call Stack (most recent call first):
  CMakeLists.txt:78 (add_keystone_package)

CMake Error at CMakeLists.txt:83 (add_dependencies):
  Cannot add target-level dependencies to non-existent target "package".

I am on dev branch in Keystone, master branch in sm(for the tools directory, the tools are not in 843d3509b8 that Keystone has) and master branch in Keystone-Demo. I am using the quick-start with the sm_hash i generated. It copies the file to /include. Do not think it is the issue but I rebuilt the SM when i moved into SM master branch. make run-tests worked though. The issue is when it runs "cmake .." in the build directory.

Am i the only one getting this error?

Regards,

Nigel

jctu...@gmail.com

unread,
Mar 9, 2021, 8:55:12 AM3/9/21
to Keystone Enclave Forum
Nigel,

If you look at the issue I have in the demo repo, I give the answer from what you're dealing with I believe.

In the Keystone Demo folder, in CmakeLists.txt, at the bottom there is a piece of code in the picture: 

Change package to packagedemo or something similar. 

Justin

Capture.PNG

Dayeol Lee

unread,
Mar 9, 2021, 12:06:55 PM3/9/21
to jctu...@gmail.com, Keystone Enclave Forum
Hi,

Thank you for reminding me, we may need to fix the target name to something other than "package".

Thanks,
Dayeol

Reply all
Reply to author
Forward
0 new messages