Skip to content

make prep broken out of the box #629

@skliper

Description

@skliper

Describe the bug
Prep fails out of the box when following README instructions:

-- Configuring for system arch: cpu1
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- OMIT_DEPRECATED=false: Deprecated elements included in build
Error: "" is not a valid BSP type
CMake Error at /export/home/jhageman/cFS/cFS-GitHub/osal/CMakeLists.txt:66 (message):
  OSAL_SYSTEM_BSPTYPE must be set to the appropriate BSP

To Reproduce
Steps to reproduce the behavior:

  1. Follow the README instructions, make prep fails.

Expected behavior
Expected it to default to pc-linux as in the past.

Code snips
The following does not set OSAL_SYSTEM_BSPTYPE since CFE_SYSTEM_PSPNAME and OSAL_SYSTEM_OSTYPE is defined...

cFE/cmake/arch_build.cmake

Lines 275 to 289 in 0648a47

# Check that PSPNAME, BSPTYPE, and OSTYPE are set properly for this arch
if (NOT CFE_SYSTEM_PSPNAME OR NOT OSAL_SYSTEM_OSTYPE)
if (CMAKE_CROSSCOMPILING)
message(FATAL_ERROR "Cross-compile toolchain ${CMAKE_TOOLCHAIN_FILE} must define CFE_SYSTEM_PSPNAME and OSAL_SYSTEM_OSTYPE")
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR
"${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
# Export the variables determined here up to the parent scope
SET(CFE_SYSTEM_PSPNAME "pc-linux" PARENT_SCOPE)
SET(OSAL_SYSTEM_BSPTYPE "pc-linux" PARENT_SCOPE)
SET(OSAL_SYSTEM_OSTYPE "posix" PARENT_SCOPE)
else ()
# Not cross compiling and host system is not recognized
message(FATAL_ERROR "Do not know how to set CFE_SYSTEM_PSPNAME and OSAL_SYSTEM_OSTYPE on ${CMAKE_SYSTEM_NAME} system")
endif()
endif (NOT CFE_SYSTEM_PSPNAME OR NOT OSAL_SYSTEM_OSTYPE)

System observed on:

  • Hardware: cFS Dev Server
  • OS: Ubuntu 18.04
  • Versions: master bundle

Additional context
Short term work around - pass in SIMULATION=native at prep, or likely can define the target system in targets.cmake (2nd approach not tested yet)

Reporter Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions