inochisa opened a new issue, #11861:
URL: https://github.com/apache/nuttx/issues/11861
I got an error when generating build file for rv-virt:ksmp64 with cmake.
```
# cmake .. -DBOARD_CONFIG=rv-virt:ksmp64 -GNinja
-- Initializing NuttX
-- Board: rv-virt
-- Config: ksmp64
-- Appdir: /mnt/files/inochi/cache/mainline/nuttx/../apps
-- Configuring done (1.1s)
CMake Error at CMakeLists.txt:736 (add_executable):
No SOURCES given to target: nuttx_user
CMake Error at cmake/nuttx_add_library.cmake:90 (add_library):
No SOURCES given to target: arch_interface
Call Stack (most recent call first):
arch/CMakeLists.txt:29 (nuttx_add_system_library)
CMake Generate step failed. Build files cannot be regenerated correctly.
```
I have tried the following change, but get another error: `ninja: error:
'syscall/stubs/nuttx_host_tools', needed by 'syscall/stubs/STUB__assert.c',
missing and no known rule to make it`
```diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fce86072c0..730a84cedb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -732,7 +732,7 @@ endif()
# Userspace portion
##########################################################
-if(NOT CONFIG_BUILD_FLAT)
+if(NOT CONFIG_BUILD_FLAT AND CONFIG_NUTTX_USERSPACE)
add_executable(nuttx_user)
get_property(nuttx_system_libs GLOBAL PROPERTY NUTTX_SYSTEM_LIBRARIES)
diff --git a/arch/risc-v/src/common/CMakeLists.txt
b/arch/risc-v/src/common/CMakeLists.txt
index f704b210d0..91e59b83a1 100644
--- a/arch/risc-v/src/common/CMakeLists.txt
+++ b/arch/risc-v/src/common/CMakeLists.txt
@@ -100,3 +100,4 @@ if(CONFIG_ARCH_ADDRENV)
endif()
target_sources(arch PRIVATE ${SRCS})
+target_sources(arch_interface PRIVATE ${SRCS})
```
I wonder whether there is something I missed. My cmake version is 3.28.3
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]