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

Fix #1441, patch build for old RTEMS #1442

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
Ignore the call to pthread_setname_np() on RTEMS 4.x. This becomes a no-op, and OSAL is able to build again.

Fixes #1441

Testing performed
Build on RTEMS 4.11

Expected behavior changes
Build succeeds

System(s) tested on
Debian with RTEMS 4.11 toolchain

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

Ignore the call to pthread_setname_np() on RTEMS 4.x.  This becomes
a no-op, and OSAL is able to build again.
@jphickey jphickey added the CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) label Jan 10, 2024
@skliper
Copy link
Contributor

skliper commented Jan 10, 2024

Carrying RTEMS 4.11 seems like a fair amount of overhead for just int/long testing, especially if it's really the long term solution. 64 bit linux int and long are different sizes and catches if you don't have the correct print format. If that isn't exactly the concern, what is it? This becomes even more challenging if we start to adopt more of the RTEMS POSIX implementation which arguably could reduce quite a bit of OSAL code. I'd think targeting modern OS's/HW systems would be a better expenditure of resources?

@skliper
Copy link
Contributor

skliper commented Jan 10, 2024

Is it uint32_t vs int that's getting missed? Seems like int vs long gets caught by 64-bit linux:

int_long.c:5:30: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
    5 |    printf("Int = %u, Int = %lu, long = %u, long = %lu\n", (int)5, (int)5, (long)5, (long)5);
      |                            ~~^                                    ~~~~~~
      |                              |                                    |
      |                              long unsigned int                    int
      |                            %u
int_long.c:5:41: warning: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long int' [-Wformat=]
    5 |    printf("Int = %u, Int = %lu, long = %u, long = %lu\n", (int)5, (int)5, (long)5, (long)5);
      |                                        ~^                                 ~~~~~~~
      |                                         |                                 |
      |                                         unsigned int                      long int
      |                                        %lu

@skliper
Copy link
Contributor

skliper commented Jan 10, 2024

Thoughts - the current test only does a build, but by including the OSAL and PSP it requires support for RTEMS 4.11 in those elements. What if the test was just to build everything except OSAL and PSP (cFE, apps)... no need to link it. Then we wouldn't be held back by supporting RTEMS 4.11 from the OSAL and PSP point of view, yet still catch issues with int not being the same size as int32_t (if that's the real issue)?

@skliper
Copy link
Contributor

skliper commented Jan 10, 2024

@jphickey @dzbaker - just confirmed you don't need to support RTEMS 4.11 from osal to use the RTEMS 4.11 compiler to build an app (I did DS) to confirm it reports errors for incorrect assumptions that int is the same size as int32_t. I recommend dropping support for RTEMS 4.11 in OSAL if testing the common code is the only reason we keep carrying it (just compile the common elements).

@dzbaker dzbaker added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Pull request is ready for discussion at the Configuration Control Board (CCB) labels Jan 11, 2024
dzbaker added a commit to nasa/cFS that referenced this pull request Jan 17, 2024
*Combines:*

sample_app equuleus-rc1+dev36
sch_lab equuleus-rc1+dev29
to_lab equuleus-rc1+dev38
sample_lib equuleus-rc1+dev2
tblCRCTool equuleus-rc1+dev2
cFS-GroundSystem equuleus-rc1+dev2
elf2cfetbl equuleus-rc1+dev10
cFE equuleus-rc1+dev75
PSP equuleus-rc1+dev38
osal equuleus-rc1+dev33

**Includes:**

*sample_app*
- nasa/sample_app#226

*sch_lab*
- nasa/sch_lab#161

*to_lab*
- nasa/sch_lab#186

*sample_lib*
- nasa/sample_lib#96

*tblCRCTool*
- nasa/tblCRCTool#80

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#239

*elf2cfetbl*
- nasa/elf2cfetbl#144
- nasa/elf2cfetbl#143

*cFE*
- nasa/cFE#2463
- nasa/cFE#2486
- nasa/cFE#2485
- nasa/cFE#2489

*PSP*
- nasa/PSP#422
- nasa/PSP#427

*osal*
- nasa/osal#1437
- nasa/osal#1442

Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Dylan Baker <[email protected]>
@dzbaker dzbaker mentioned this pull request Jan 17, 2024
2 tasks
dzbaker added a commit to nasa/cFS that referenced this pull request Jan 18, 2024
*Combines:*

sample_app equuleus-rc1+dev36
sch_lab equuleus-rc1+dev29
to_lab equuleus-rc1+dev38
sample_lib equuleus-rc1+dev2
tblCRCTool equuleus-rc1+dev2
cFS-GroundSystem equuleus-rc1+dev2
elf2cfetbl equuleus-rc1+dev10
cFE equuleus-rc1+dev75
PSP equuleus-rc1+dev38
osal equuleus-rc1+dev33

**Includes:**

*sample_app*
- nasa/sample_app#226

*sch_lab*
- nasa/sch_lab#161

*to_lab*
- nasa/sch_lab#186

*sample_lib*
- nasa/sample_lib#96

*tblCRCTool*
- nasa/tblCRCTool#80

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#239

*elf2cfetbl*
- nasa/elf2cfetbl#144
- nasa/elf2cfetbl#143

*cFE*
- nasa/cFE#2463
- nasa/cFE#2486
- nasa/cFE#2485
- nasa/cFE#2489

*PSP*
- nasa/PSP#422
- nasa/PSP#427

*osal*
- nasa/osal#1437
- nasa/osal#1442

Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Dylan Baker <[email protected]>
dzbaker added a commit to nasa/cFS that referenced this pull request Jan 18, 2024
*Combines:*

sample_app equuleus-rc1+dev36
sch_lab equuleus-rc1+dev29
to_lab equuleus-rc1+dev38
sample_lib equuleus-rc1+dev2
tblCRCTool equuleus-rc1+dev2
cFS-GroundSystem equuleus-rc1+dev2
elf2cfetbl equuleus-rc1+dev10
cFE equuleus-rc1+dev75
PSP equuleus-rc1+dev38
osal equuleus-rc1+dev33

**Includes:**

*sample_app*
- nasa/sample_app#226

*sch_lab*
- nasa/sch_lab#161

*to_lab*
- nasa/sch_lab#186

*sample_lib*
- nasa/sample_lib#96

*tblCRCTool*
- nasa/tblCRCTool#80

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#239

*elf2cfetbl*
- nasa/elf2cfetbl#144
- nasa/elf2cfetbl#143

*cFE*
- nasa/cFE#2463
- nasa/cFE#2486
- nasa/cFE#2485
- nasa/cFE#2489

*PSP*
- nasa/PSP#422
- nasa/PSP#427

*osal*
- nasa/osal#1437
- nasa/osal#1442

Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Dylan Baker <[email protected]>
dzbaker added a commit to nasa/cFS that referenced this pull request Jan 18, 2024
*Combines:*

sample_app equuleus-rc1+dev36
sch_lab equuleus-rc1+dev29
to_lab equuleus-rc1+dev38
sample_lib equuleus-rc1+dev2
tblCRCTool equuleus-rc1+dev2
cFS-GroundSystem equuleus-rc1+dev2
elf2cfetbl equuleus-rc1+dev10
cFE equuleus-rc1+dev75
PSP equuleus-rc1+dev38
osal equuleus-rc1+dev33

**Includes:**

*sample_app*
- nasa/sample_app#226

*sch_lab*
- nasa/sch_lab#161

*to_lab*
- nasa/sch_lab#186

*sample_lib*
- nasa/sample_lib#96

*tblCRCTool*
- nasa/tblCRCTool#80

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#239

*elf2cfetbl*
- nasa/elf2cfetbl#144
- nasa/elf2cfetbl#143

*cFE*
- nasa/cFE#2463
- nasa/cFE#2486
- nasa/cFE#2485
- nasa/cFE#2489

*PSP*
- nasa/PSP#422
- nasa/PSP#427

*osal*
- nasa/osal#1437
- nasa/osal#1442

Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Dylan Baker <[email protected]>
dzbaker added a commit to nasa/cFS that referenced this pull request Jan 18, 2024
*Combines:*

sample_app equuleus-rc1+dev36
sch_lab equuleus-rc1+dev29
to_lab equuleus-rc1+dev38
sample_lib equuleus-rc1+dev2
tblCRCTool equuleus-rc1+dev2
cFS-GroundSystem equuleus-rc1+dev2
elf2cfetbl equuleus-rc1+dev10
cFE equuleus-rc1+dev75
PSP equuleus-rc1+dev38
osal equuleus-rc1+dev33

**Includes:**

*sample_app*
- nasa/sample_app#226

*sch_lab*
- nasa/sch_lab#161

*to_lab*
- nasa/sch_lab#186

*sample_lib*
- nasa/sample_lib#96

*tblCRCTool*
- nasa/tblCRCTool#80

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#239

*elf2cfetbl*
- nasa/elf2cfetbl#144
- nasa/elf2cfetbl#143

*cFE*
- nasa/cFE#2463
- nasa/cFE#2486
- nasa/cFE#2485
- nasa/cFE#2489

*PSP*
- nasa/PSP#422
- nasa/PSP#427

*osal*
- nasa/osal#1437
- nasa/osal#1442

Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Dylan Baker <[email protected]>
dzbaker added a commit to nasa/cFS that referenced this pull request Jan 18, 2024
*Combines:*

sample_app equuleus-rc1+dev36
sch_lab equuleus-rc1+dev29
to_lab equuleus-rc1+dev38
sample_lib equuleus-rc1+dev2
tblCRCTool equuleus-rc1+dev2
cFS-GroundSystem equuleus-rc1+dev2
elf2cfetbl equuleus-rc1+dev10
cFE equuleus-rc1+dev75
PSP equuleus-rc1+dev38
osal equuleus-rc1+dev33

**Includes:**

*sample_app*
- nasa/sample_app#226

*sch_lab*
- nasa/sch_lab#161

*to_lab*
- nasa/sch_lab#186

*sample_lib*
- nasa/sample_lib#96

*tblCRCTool*
- nasa/tblCRCTool#80

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#239

*elf2cfetbl*
- nasa/elf2cfetbl#144
- nasa/elf2cfetbl#143

*cFE*
- nasa/cFE#2463
- nasa/cFE#2486
- nasa/cFE#2485
- nasa/cFE#2489

*PSP*
- nasa/PSP#422
- nasa/PSP#427

*osal*
- nasa/osal#1437
- nasa/osal#1442

Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Dylan Baker <[email protected]>
@dzbaker dzbaker merged commit b586499 into nasa:main Jan 18, 2024
20 checks passed
dzbaker added a commit to nasa/cFS that referenced this pull request Jan 18, 2024
*Combines:*

sample_app equuleus-rc1+dev36
sch_lab equuleus-rc1+dev29
to_lab equuleus-rc1+dev38
sample_lib equuleus-rc1+dev2
tblCRCTool equuleus-rc1+dev2
cFS-GroundSystem equuleus-rc1+dev2
elf2cfetbl equuleus-rc1+dev10
cFE equuleus-rc1+dev75
PSP equuleus-rc1+dev38
osal equuleus-rc1+dev33

**Includes:**

*sample_app*
- nasa/sample_app#226

*sch_lab*
- nasa/sch_lab#161

*to_lab*
- nasa/sch_lab#186

*sample_lib*
- nasa/sample_lib#96

*tblCRCTool*
- nasa/tblCRCTool#80

*cFS-GroundSystem*
- nasa/cFS-GroundSystem#239

*elf2cfetbl*
- nasa/elf2cfetbl#144
- nasa/elf2cfetbl#143

*cFE*
- nasa/cFE#2463
- nasa/cFE#2486
- nasa/cFE#2485
- nasa/cFE#2489

*PSP*
- nasa/PSP#422
- nasa/PSP#427

*osal*
- nasa/osal#1437
- nasa/osal#1442

Co-authored by: Joseph Hickey <[email protected]>
Co-authored by: Dylan Baker <[email protected]>
@jphickey jphickey deleted the fix-1441-rtems411-setname branch January 18, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CCB:Approved Indicates code review and approval by community CCB
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reinstate RTEMS 4.11 build
3 participants