nasa / nasa/sample_app

sample_defs/tables source files won't compile without table header file include

Open
#83 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
67
Forks
60
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
If we want to put all tables source files in global *_defs directory in a tables dir inside *_defs they need to be able to access *_table.h which would be in the respective app's src directory.

To Reproduce
Steps to reproduce the behavior:

  1. Create directory in sample_defs called "tables"
  2. Move sample_table.c into sample_defs/tables directory
  3. Build cFS (make SIMULATION=native prep, make)
  4. Build will fail because sample_table.c can't find sample_table.h

Expected behavior
Need to be able to provide includes to sample_defs/tables. As a "hack" I add a "include_directories(fsw/src)" in CMakeLists.txt in apps/sample_app which allows sample_table.c to compile from sample_defs/tables.

System observed on:

  • Linux Ubuntu 18.04 LTS
  • Native linux cFS build
  • Versions cFE 6.7.14, OSAL 5.0.13, PSP 1.4.10

Reporter Info
Joe Mahoney - LTA Research

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the native Linux build after moving sample_table.c into sample_defs/tables, then inspect apps/sample_app/CMakeLists.txt and the locations of sample_table.c and sample_table.h. Done means sample_table.c in sample_defs/tables can find its table header and the cFS build completes without the manual include_directories workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.