Skip to content

pkg: disable compiler warning for jerryscript and nimble#10503

Merged
kaspar030 merged 2 commits intoRIOT-OS:masterfrom
smlng:pr/pkg/jerryscript_wconversion
Nov 29, 2018
Merged

pkg: disable compiler warning for jerryscript and nimble#10503
kaspar030 merged 2 commits intoRIOT-OS:masterfrom
smlng:pr/pkg/jerryscript_wconversion

Conversation

@smlng
Copy link
Copy Markdown
Member

@smlng smlng commented Nov 29, 2018

Contribution description

This is (hopefully) a quick fix to make Murdock build jerryscript with LLVM again, since the update of the Murdock-workers to Ubuntu-Bionic all builds fail.

Added a second quick fix for the nimble package

Testing procedure

Issues/PRs references

@smlng smlng added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Nov 29, 2018
@smlng smlng requested a review from kaspar030 November 29, 2018 08:54
@smlng smlng force-pushed the pr/pkg/jerryscript_wconversion branch 2 times, most recently from d3b0a2a to 1d0384c Compare November 29, 2018 09:28
@smlng smlng changed the title pkg/jerryscript: disable -Wconversion for llvm pkg: disable compiler warning for jerryscript and nimble Nov 29, 2018
@smlng
Copy link
Copy Markdown
Member Author

smlng commented Nov 29, 2018

Please note: there might be better ways solving this but as a quick fix this should do to make Murdock happy and get other PRs tested and merged again.

# tell LLVM/clang not to be so pedantic with this.
CFLAGS += -Wno-unused-function
CFLAGS += -Wno-sometimes-uninitialized
CFLAGS += -Wno-address-of-packed-member
Copy link
Copy Markdown
Member

@miri64 miri64 Nov 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually not be deactivated, but fixed as this can lead to unexpected crashes. I'd rather deactivate building nrf52dk with LLVM (edit: as a quickfix) for now than deactivating this warning.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well example/nimble_gatt is only build for the nrf52dk with llvm anyway, so the effect of the quick fix is the same. See here https://ci.riot-os.org/RIOT-OS/RIOT/10484/262a04c9cfb390f7ae2aead657a2b62a8a6f7e16/output.html and search for nimble_gatt.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to that end I would rather disable this warning and get the example build with llvm at least once, blacklisting the nrf52dk as you suggested would lead to not compiling this with llvm at all

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but getting an application built is not the task of a CI builder. It is testing the correct build of an application. As such, even as a quick fix I don't except building with such a critical warning disabled, so that at least in a local environment people might get warned. The right way is to temporarily "drop" support and then resupport once the bug is fixed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But maybe someone else has differing opinions, so I'm not blocking because of this, but I won't ACK neither.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mhm, agree to disagree here.

The bug was only "found" because we updated the CI workers from xenial to bionic yesterday, so it was there all the time, just that the newer LLVM is a bit more strict. So its either dropping the board (and with that llvm) completely or dropping that warning and have llvm compile that thing at least once. And once fixed, re-arm the warning.

I just want to get Murdock "working" again ASAP, to get other (real) PRs merged ...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the board (and with that llvm) completely

Not true. You can disable just nrf52dk. Yes, we drop LLVM support with that for that particular board, but not for all boards (we don't build with LLVM for all boards anyway).

Copy link
Copy Markdown
Contributor

@kaspar030 kaspar030 Nov 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug is also present in the gcc build. gcc just doesn't warn.
It also doesn't matter on the nrf52dk, as Cortex M4 supports unaligned accesses (they're just a tad slower). I've checked the code, there are only unaligned accesses when some debug mode is activated, the regular case ends up using memcpy.

Thus I think enabling disabling the warning is fine...

Copy link
Copy Markdown
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK from my side, if @miri64 is also fine with the disabled warning.

@miri64
Copy link
Copy Markdown
Member

miri64 commented Nov 29, 2018

Well I guess now one of you is responsible for actually fixing the warnings, so yes of course :-)

@kaspar030
Copy link
Copy Markdown
Contributor

Well I guess now one of you is responsible for actually fixing the warnings, so yes of course :-)

Yeah, one of the downsides of maintaining the CI... :)

@smlng pls squash!

@smlng smlng force-pushed the pr/pkg/jerryscript_wconversion branch from 591c620 to 47a6626 Compare November 29, 2018 11:06
@smlng
Copy link
Copy Markdown
Member Author

smlng commented Nov 29, 2018

done

@miri64
Copy link
Copy Markdown
Member

miri64 commented Nov 29, 2018

Yeah, one of the downsides of maintaining the CI... :)

The lazy way would have been to roll back Docker ;-)

@kaspar030
Copy link
Copy Markdown
Contributor

The lazy way would have been to roll back Docker ;-)

True, and I really thought about it. 😉

Thing is, docker hub builds soooo slow, I was sure that wouldn't have been the fastest solution...

@smlng
Copy link
Copy Markdown
Member Author

smlng commented Nov 29, 2018

So all green ...

@kaspar030 kaspar030 merged commit 6d5af80 into RIOT-OS:master Nov 29, 2018
@kaspar030
Copy link
Copy Markdown
Contributor

&go.

jcarrano added a commit to jcarrano/RIOT that referenced this pull request Nov 29, 2018
Nimble contains a couple of casts that discard alignment information.
This causes a warning with clang's -Wno-address-of-packed-member.

A previous PR (RIOT-OS#10503) supressed that warning. This commit re-enables
them and provides a patch to fix the offending code.

The fix has been submitted upstream, see
apache/mynewt-nimble#252
@jcarrano
Copy link
Copy Markdown
Contributor

I provided a slowfix in #10511.

@smlng smlng deleted the pr/pkg/jerryscript_wconversion branch November 29, 2018 14:52
@aabadie aabadie added this to the Release 2019.01 milestone Dec 2, 2018
crest42 pushed a commit to crest42/RIOT that referenced this pull request Dec 18, 2018
Nimble contains a couple of casts that discard alignment information.
This causes a warning with clang's -Wno-address-of-packed-member.

A previous PR (RIOT-OS#10503) supressed that warning. This commit re-enables
them and provides a patch to fix the offending code.

The fix has been submitted upstream, see
apache/mynewt-nimble#252
BytesGalore pushed a commit to BytesGalore/RIOT that referenced this pull request Jan 29, 2019
Nimble contains a couple of casts that discard alignment information.
This causes a warning with clang's -Wno-address-of-packed-member.

A previous PR (RIOT-OS#10503) supressed that warning. This commit re-enables
them and provides a patch to fix the offending code.

The fix has been submitted upstream, see
apache/mynewt-nimble#252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants