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

fails to build under Raspbian and VxWorks #33

Closed
CDKnightNASA opened this issue Jan 29, 2020 · 7 comments · Fixed by #36 or #40
Closed

fails to build under Raspbian and VxWorks #33

CDKnightNASA opened this issue Jan 29, 2020 · 7 comments · Fixed by #36 or #40
Assignees
Labels
bug Something isn't working
Milestone

Comments

@CDKnightNASA
Copy link
Contributor

Describe the bug
Building elf2cfetbl under Raspbian (the Debian variant released for the popular Raspberry Pi SBC's by the Raspberry Pi organization) it fails with a long laundry list of printf type mismatch errors.

/home/pi/cFS/tools/elf2cfetbl/elf2cfetbl.c:2211:67: error: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘size_t’ {aka ‘unsigned int’} [-Werror=format=]
             printf("strstr[%d] = %s; strlenSN = %ld; strlenON = %ld\n",i,strstr(SymbolNames[i], TblFileDef.ObjectName),
                                                                 ~~^
                                                                 %d

To Reproduce
Build elf2cfetbl under Raspbian.

Expected behavior
Should be casting types to what printf expects.

Code snips
If applicable, add references to the software.

System observed on:
Raspberry Pi Zero W.

Additional context
Add any other context about the problem here.

Reporter Info
Christopher.D.Knight@nasa.gov

@CDKnightNASA CDKnightNASA self-assigned this Jan 29, 2020
@Jkillelea
Copy link

Fails for me as well, on a Raspberry Pi Zero (non -W). Compiles without errors on an x86-64 machine.

@skliper skliper added the bug Something isn't working label Mar 26, 2020
@skliper
Copy link
Contributor

skliper commented Mar 26, 2020

Note @stanislaw developed a python alternative at https://github.com/stanislaw/bin2cfetbl, see #34.

@skliper skliper changed the title fails to build under Raspbian fails to build under Raspbian and VxWorks Apr 15, 2020
@skliper skliper assigned skliper and unassigned CDKnightNASA Apr 15, 2020
@skliper
Copy link
Contributor

skliper commented Apr 15, 2020

Also failed on VxWorks... I'll take this one.

astrogeco added a commit that referenced this issue Apr 28, 2020
Fix #33, Resolve print format mismatches on 32-bit host
@skliper skliper reopened this May 4, 2020
@skliper
Copy link
Contributor

skliper commented May 4, 2020

This was only partially fixed in #36. @CDKnightNASA could you check if this is still an issue on Raspbian?

@skliper
Copy link
Contributor

skliper commented May 4, 2020

This was only partially fixed in #36. @CDKnightNASA could you check if this is still an issue on Raspbian?

or @Jkillelea...

@skliper
Copy link
Contributor

skliper commented May 21, 2020

Ping @CDKnightNASA @Jkillelea - does this now work for you?

@Jkillelea
Copy link

Jkillelea commented May 22, 2020

Edit: disregard my previous comment (since deleted), looks like this is working for me.

I have problems with some of the other submodules, but I'll open separate issues for them.

pi@raspberrypi:~/cfs-test/build/tools/elf2cfetbl $ uname -a
Linux raspberrypi 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux
pi@raspberrypi:~/cfs-test/build/tools/elf2cfetbl $ make
[ 50%] Building C object tools/elf2cfetbl/CMakeFiles/elf2cfetbl.dir/elf2cfetbl.c.o
[100%] Linking C executable elf2cfetbl
[100%] Built target elf2cfetbl
pi@raspberrypi:~/cfs-test/build/tools/elf2cfetbl $ echo $?
0

@skliper skliper closed this as completed May 22, 2020
@astrogeco astrogeco added this to the 3.2.0 milestone Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants