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

RTEMS CFE_FT_Global build failure #1780

Closed
astrogeco opened this issue Aug 9, 2021 · 0 comments · Fixed by #1781 or #1772
Closed

RTEMS CFE_FT_Global build failure #1780

astrogeco opened this issue Aug 9, 2021 · 0 comments · Fixed by #1781 or #1772
Milestone

Comments

@astrogeco
Copy link
Contributor

Describe the bug

RTEMS CI fails due to "multiple definitions" of CFE_FT_Global

[ 96%] Linking C shared module cfe_testcase.obj
/root/rtems-5/bin/i386-rtems5-ld: CMakeFiles/cfe_testcase.dir/src/cfe_test.c.o:(.bss+0x0): multiple definition of `CFE_FT_Global'; CMakeFiles/cfe_testcase.dir/src/cfe_test_table.c.o:(.data+0x0): first defined here
/root/rtems-5/bin/i386-rtems5-ld: CMakeFiles/cfe_testcase.dir/src/tbl_content_access_test.c.o:(.bss+0x0): multiple definition of `CFE_FT_Global'; CMakeFiles/cfe_testcase.dir/src/cfe_test_table.c.o:(.data+0x0): first defined here
/root/rtems-5/bin/i386-rtems5-ld: CMakeFiles/cfe_testcase.dir/src/tbl_content_mang_test.c.o:(.bss+0x0): multiple definition of `CFE_FT_Global'; CMakeFiles/cfe_testcase.dir/src/cfe_test_table.c.o:(.data+0x0): first defined here
/root/rtems-5/bin/i386-rtems5-ld: CMakeFiles/cfe_testcase.dir/src/tbl_information_test.c.o:(.bss+0x0): multiple definition of `CFE_FT_Global'; CMakeFiles/cfe_testcase.dir/src/cfe_test_table.c.o:(.data+0x0): first defined here
/root/rtems-5/bin/i386-rtems5-ld: CMakeFiles/cfe_testcase.dir/src/tbl_registration_test.c.o:(.bss+0x0): multiple definition of `CFE_FT_Global'; CMakeFiles/cfe_testcase.dir/src/cfe_test_table.c.o:(.data+0x0): first defined here

To Reproduce

Checkout cFS bundle at 871a2d7 then point cFE to 600fd7a

Expected behavior
Both Linux and RTEMS build succesfully

Code snips
Related to setting Table releated entries in global struct in modules/cfe_testcase/src/cfe_test_table.c

/* Constant Table information used by all table tests */
CFE_FT_Global_t CFE_FT_Global = {
    .TblName = "TestTable", .RegisteredTblName = "CFE_TEST_APP.TestTable", .TblFilename = "test_tbl.tbl"};

System observed on:
CI build of RTEMS 4.11 and 5.0

Additional context
Found during IC:2021-08-10 process.

See #1772 and nasa/cFS#333

@astrogeco astrogeco changed the title RTEMS Build failure on test builds RTEMS CFE_FT_Global build failure Aug 9, 2021
astrogeco added a commit to astrogeco/cFE that referenced this issue Aug 9, 2021
Fixes RTEMS compilation error.

Moves the assignment of the TBL related elements of `CFE_FT_Global` from
'cfe_test_table' to `cfe_test` to avoid duplicate definitions error.

Makes `cfe_test.c` first in CMakeLists dependency list

Co-authored-by: Niall Mullane <[email protected]>
astrogeco added a commit to astrogeco/cFE that referenced this issue Aug 9, 2021
Fixes RTEMS compilation error.

Moves the assignment of the TBL related elements of `CFE_FT_Global` from
'cfe_test_table' to `cfe_test` to avoid duplicate definitions error.

Makes `cfe_test.c` first in CMakeLists dependency list

Co-authored-by: Niall Mullane <[email protected]>
astrogeco added a commit to astrogeco/cFE that referenced this issue Aug 10, 2021
Fixes RTEMS compilation error.

Moves the assignment of the TBL related elements of `CFE_FT_Global` from
'cfe_test_table' to `cfe_test` to avoid duplicate definitions error.

Makes `cfe_test.c` first in CMakeLists dependency list

Co-authored-by: Niall Mullane <[email protected]>
astrogeco added a commit to astrogeco/cFE that referenced this issue Aug 10, 2021
- Removed multiple instantiations of CFE_FT_Global
- Moves the assignment of the TBL related elements of `CFE_FT_Global`
from 'cfe_test_table' to `cfe_test` to avoid duplicate definitions error
- Makes `cfe_test.c` first in CMakeLists dependency list

Co-authored-by: Niall Mullane <[email protected]>
astrogeco added a commit that referenced this issue Aug 10, 2021
@skliper skliper added this to the 7.0.0 milestone Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants