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

Build error when compiling for multiple targets platforms #2595

Closed
pepepr08 opened this issue Aug 16, 2024 · 0 comments · Fixed by #2596
Closed

Build error when compiling for multiple targets platforms #2595

pepepr08 opened this issue Aug 16, 2024 · 0 comments · Fixed by #2596
Assignees

Comments

@pepepr08
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Have multiple targets in targets.cmake. e.g.:
# Set targets to build base on TARGET env variable (set by Makefile)
if($ENV{TARGET} STREQUAL "all")
  message(STATUS "All targets selected")
  SET(MISSION_CPUNAMES pclinux devboard)
else()
  SET(MISSION_CPUNAMES $ENV{TARGET})
endif()

SET(COMMON_LAB_APPS ci_lab to_lab sch_lab)

SET(pclinux_PROCESSORID 1)
SET(pclinux_APPLIST ${COMMON_LAB_APPS})
SET(pclinux_FILELIST cfe_es_startup.scr)
SET(pclinux_SYSTEM pc-linux)

SET(devboard_PROCESSORID 1)
SET(devboard_APPLIST ${COMMON_LAB_APPS} snafu_lib cdh_lib spw)
SET(devboard_FILELIST cfe_es_startup.scr)
SET(devboard_SYSTEM leon3-gaisler-rtems5)

  1. Compile using the following command: make SIMULATION=native ENABLE_UNIT_TESTS=true -j install

  2. See error:

/home/gitlab-runner/builds/glrt-hNz/0/DS_SW/ds_cfs/build/src/cfe_platform_list.c:6:37: error: ISO C does not allow extra ‘;’ outside of a function [-Werror=pedantic]
    6 | CFE_PLATFORM(native_default_pclinux);CFE_PLATFORM(native_default_devboard)
      |                                     ^
/home/gitlab-runner/builds/glrt-hNz/0/DS_SW/ds_cfs/build/src/cfe_platform_list.c:12:37: error: expected expression before ‘;’ token
   12 | CFE_PLATFORM(native_default_pclinux);CFE_PLATFORM(native_default_devboard)
      |                                     ^
cc1: all warnings being treated as errors
make[4]: *** [cfeconfig_platformdata_tool/CMakeFiles/cfeconfig_platformdata_tool.dir/build.make:89: cfeconfig_platformdata_tool/CMakeFiles/cfeconfig_platformdata_tool.dir/__/src/cfe_platform_list.c.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [CMakeFiles/Makefile2:1133: cfeconfig_platformdata_tool/CMakeFiles/cfeconfig_platformdata_tool.dir/all] Error 2
make[3]: *** Waiting for unfinished jobs....
[ 58%] Linking C executable elf2cfetbl
[ 58%] Built target elf2cfetbl
[ 58%] Built target cfe-module-version
make[2]: *** [CMakeFiles/Makefile2:510: CMakeFiles/mission-install.dir/rule] Error 2
make[1]: *** [Makefile:227: mission-install] Error 2

Expected behavior
A clear and concise description of what you expected to happen.

Code snips
If applicable, add references to the software.

System observed on:

  • OS: compiling on Ubuntu 20.04
  • Versions latest in main as of today

Additional context
Add any other context about the problem here.

Reporter Info
Jose F Martinez Pedraza GSFC 582

@pepepr08 pepepr08 self-assigned this Aug 16, 2024
dzbaker added a commit that referenced this issue Aug 29, 2024
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

Successfully merging a pull request may close this issue.

1 participant