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

ci: Travis: use gcc9 with gcov job #10480

Merged
merged 2 commits into from Jul 17, 2019
Merged

ci: Travis: use gcc9 with gcov job #10480

merged 2 commits into from Jul 17, 2019

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Jul 12, 2019

  • it is useful to test with the latest gcc in general
  • it might help with gcov issues (merge mismatch)

@blueyed blueyed changed the title ci: Travis: use gcc9 with gcov job [WIP/blocked] ci: Travis: use gcc9 with gcov job Jul 12, 2019
@blueyed
Copy link
Contributor Author

blueyed commented Jul 12, 2019

Fails:

error: self-comparison always evaluates to true [-Werror=tautological-compare]

Could not reproduce this locally, so that might be something Arch's gcc has a patch for already.

Currently using gcc-9 amd64 9.1.0-2ubuntu2~16.04.

[139/262] Building C object src/nvim/CMakeFiles/nvim.dir/window.c.o
FAILED: /usr/lib/ccache/gcc-9 -DINCLUDE_GENERATED_DECLARATIONS -DMIN_LOG_LEVEL=3 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DUSE_GCOV -D_GNU_SOURCE -Iconfig -I../src -Isrc/nvim/auto -Iinclude -I/home/travis/nvim-deps/usr/include/luajit-2.0 -isystem /home/travis/nvim-deps/usr/include --coverage -g   -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -Wno-array-bounds -Werror  -Wno-conversion -MD -MT src/nvim/CMakeFiles/nvim.dir/window.c.o -MF src/nvim/CMakeFiles/nvim.dir/window.c.o.d -o src/nvim/CMakeFiles/nvim.dir/window.c.o   -c ../src/nvim/window.c
../src/nvim/window.c: In function ‘do_window’:
../src/nvim/window.c:183:33: error: self-comparison always evaluates to true [-Werror=tautological-compare]
  183 |     FOR_ALL_WINDOWS_IN_TAB(wp2, curtab) {
      |                                 ^~
../src/nvim/window.c: In function ‘win_valid’:
../src/nvim/window.c:1504:30: error: self-comparison always evaluates to true [-Werror=tautological-compare]
 1504 |   FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
      |                              ^~
../src/nvim/window.c: In function ‘win_count’:
../src/nvim/window.c:1536:30: Kerror: self-comparison always evaluates to true [-Werror=tautological-compare]
 1536 |   FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
      |                              ^~
../src/nvim/window.c: In function ‘one_window’:
../src/nvim/window.c:2244:30: error: self-comparison always evaluates to true [-Werror=tautological-compare]
 2244 |   FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
      |                              ^~
../src/nvim/window.c: In function ‘buf_jump_open_win’:
../src/nvim/window.c:4411:32: error: self-comparison always evaluates to true [-Werror=tautological-compare]
 4411 |     FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
      |                                ^~
../src/nvim/window.c: In function ‘win_size_save’:
../src/nvim/window.c:4749:30: error: self-comparison always evaluates to true [-Werror=tautological-compare]
 4749 |   FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
      |                              ^~
../src/nvim/window.c: In function ‘win_size_restore’:
../src/nvim/window.c:4768:34: error: self-comparison always evaluates to true [-Werror=tautological-compare]
 4768 |       FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
      |                                  ^~
../src/nvim/window.c: In function ‘win_setminheight’:
../src/nvim/window.c:5223:32: error: self-comparison always evaluates to true [-Werror=tautological-compare]
 5223 |     FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
      |                                ^~
../src/nvim/window.c: In function ‘only_one_window’:
../src/nvim/window.c:5995:30: error: self-comparison always evaluates to true [-Werror=tautological-compare]
 5995 |   FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
      |                              ^~
../src/nvim/window.c: In function ‘win_id2win’:
../src/nvim/window.c:6691:30: error: self-comparison always evaluates to true [-Werror=tautological-compare]
 6691 |   FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
      |                              ^~
cc1: all warnings being treated as errors
[139/262] Building C object src/nvim/C...o/msgpack_lua_c_bindings.generated.c.o
ninja: build stopped: subcommand failed.

@blueyed
Copy link
Contributor Author

blueyed commented Jul 12, 2019

Not sure though why I am not seeing this myself - appears to be legit after all, isn't it?

@blueyed
Copy link
Contributor Author

blueyed commented Jul 12, 2019

Now:

In file included from ../src/nvim/eval.c:6112:
src/nvim/auto/funcs.generated.h: In function ‘hash_internal_func_gperf’:
src/nvim/auto/funcs.generated.h:84:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
   84 |         hval += asso_values[(unsigned char)str[13]];
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/nvim/auto/funcs.generated.h:86:7: note: here
   86 |       case 13:
      |       ^~~~
src/nvim/auto/funcs.generated.h:89:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
   89 |         hval += asso_values[(unsigned char)str[10]];
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/nvim/auto/funcs.generated.h:91:7: note: here
   91 |       case 10:
      |       ^~~~
src/nvim/auto/funcs.generated.h:92:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
   92 |         hval += asso_values[(unsigned char)str[9]];
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/nvim/auto/funcs.generated.h:94:7: note: here
   94 |       case 9:
      |       ^~~~
src/nvim/auto/funcs.generated.h:97:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
   97 |         hval += asso_values[(unsigned char)str[6]];
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/nvim/auto/funcs.generated.h:99:7: note: here
   99 |       case 6:
      |       ^~~~
src/nvim/auto/funcs.generated.h:100:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
  100 |         hval += asso_values[(unsigned char)str[5]];
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/nvim/auto/funcs.generated.h:102:7: note: here
  102 |       case 5:
      |       ^~~~
src/nvim/auto/funcs.generated.h:104:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
  104 |         hval += asso_values[(unsigned char)str[3]];
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/nvim/auto/funcs.generated.h:106:7: note: here
  106 |       case 3:
      |       ^~~~
src/nvim/auto/funcs.generated.h:107:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
  107 |         hval += asso_values[(unsigned char)str[2]];
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/nvim/auto/funcs.generated.h:109:7: note: here
  109 |       case 2:
      |       ^~~~
src/nvim/auto/funcs.generated.h:110:14: error: this statement may fall through [-Werror=implicit-fallthrough=]
  110 |         hval += asso_values[(unsigned char)str[1]];
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/nvim/auto/funcs.generated.h:112:7: note: here
  112 |       case 1:
      |       ^~~~
../src/nvim/eval.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-static-in-inline’ [-Werror]
cc1: all warnings being treated as errors
[179/262] Building C object src/nvim/CMakeFiles/nvim.dir/ex_cmds.c.o
ninja: build stopped: subcommand failed.
+exit 1
The command "ci/script.sh" exited with 1.

@blueyed
Copy link
Contributor Author

blueyed commented Jul 12, 2019

The above should be handled through the PASSTHROUGH comment in the file.. looks like -Wimplicit-fallthrough=5 is used (requiring special attribute, not regexp comment).

@codecov

This comment has been minimized.

@blueyed
Copy link
Contributor Author

blueyed commented Jul 12, 2019

Looks like ccache is causing this?!

blueyed referenced this pull request Jul 16, 2019
Temporary measure to avoid QuickBuild CI failure:

    8:42:54,702 INFO  - Executing post-execute action...
    18:42:54,702 ERROR - Step 'master>buildall>build-node?testNode=freebsd-64>build-and-run-tests>build-and-run-tests-parameterized?buildType=Release>configure-neovim-and-build-nvim' is failed: Failed to run command: mkdir -p build/Release && cd build/Release && cmake -G "Unix Makefiles" -DBUSTED_OUTPUT_TYPE=TAP -DMIN_LOG_LEVEL=3 -DCMAKE_BUILD_TYPE=Release -DTRAVIS_CI_BUILD=ON ../.. && gmake VERBOSE=1 nvim unittest-prereqs functionaltest-prereqs
    Command return code: 2
    Command error output: /usr/home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/profile.c:70:27: error: implicit conversion changes signedness: 'proftime_T' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
    STRICT_ADD(os_hrtime(), nsec, &rv, int64_t);
    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
    /usr/home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/assert.h:150:26: note: expanded from macro 'STRICT_ADD'
    do { *(c) = (t)((a) + (b)); } while (0)
    ^
    1 error generated.
    gma...
@blueyed blueyed force-pushed the gcc9 branch 2 times, most recently from a4c722b to b38152e Compare July 17, 2019 00:26
blueyed added a commit to blueyed/neovim that referenced this pull request Jul 17, 2019
This is the default since ccache 3.3, but Travis has 3.2.4.

This fixes compiler warnings from macros with later clang/gcc.

Unblocks neovim#10480, and
neovim#10487.

Ref: ccache/ccache@6d9cb3dfdd9
blueyed added a commit to blueyed/neovim that referenced this pull request Jul 17, 2019
This is the default since ccache 3.3, but Travis has 3.2.4.

This fixes compiler warnings from macros with later clang/gcc.

Unblocks neovim#10480, and
neovim#10487.

Ref: ccache/ccache@6d9cb3dfdd9
@blueyed
Copy link
Contributor Author

blueyed commented Jul 17, 2019

Should be good/better after #10533.

blueyed added a commit that referenced this pull request Jul 17, 2019
This is the default since ccache 3.3, but Travis has 3.2.4.

This fixes compiler warnings from macros with later clang/gcc.

Using CCACHE_HASHDIR=1 fixes ccache v3.2.4, but CCACHE_NOHASHDIR=1 does
not break v3.7.1. The real issue/fix appears to be
ccache/ccache@284e3a0, and using the hashdir option seems to only work
around this.

Unblocks #10480, and
#10487.

Ref: ccache/ccache@6d9cb3dfdd9
Closes #10533.
@blueyed
Copy link
Contributor Author

blueyed commented Jul 17, 2019

Might be good to test latest ccache in one job (this one) still?
(similar to testing oldest CMake)

Pulled that out, but happy to create a separate PR if you find it useful.

@blueyed blueyed changed the title [WIP/blocked] ci: Travis: use gcc9 with gcov job [RFC] ci: Travis: use gcc9 with gcov job Jul 17, 2019
@marvim marvim added the RFC label Jul 17, 2019
@blueyed blueyed requested a review from justinmk July 17, 2019 22:48
This is required to avoid warnings with newer gcc/clang.

It is the correct fix - I must have messed up when bisecting.
Follow-up to: neovim#10533
@blueyed blueyed reopened this Jul 17, 2019
@blueyed blueyed changed the title [RFC] ci: Travis: use gcc9 with gcov job ci: Travis: use gcc9 with gcov job Jul 17, 2019
packages:
- ccache
- ninja

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is only moved to allow using its new anchor below.

Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

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

Ok, but I hope we don't do more of this type of thing: It forces us to spend too much time managing compiler versions. Travis should be doing that for us.

Also, adding extra apt sources was a source of pain in the past.

@blueyed
Copy link
Contributor Author

blueyed commented Jul 17, 2019

It forces us to spend too much time managing compiler versions. Travis should be doing that for us.

Yes, and it still does.
It's just that it does not use the latest (nor oldest as with CMake), and it is good to have specific jobs for this then.

Also, adding extra apt sources was a source of pain in the past.

I can imagine. Therefore I think it is good to use YAML's features in this regard. But I agree with your other comment that it should not become too complex.

@blueyed blueyed merged commit 3d356c1 into neovim:master Jul 17, 2019
@blueyed blueyed deleted the gcc9 branch July 17, 2019 23:27
timeyyy pushed a commit to timeyyy/neovim that referenced this pull request Aug 9, 2019
This is the default since ccache 3.3, but Travis has 3.2.4.

This fixes compiler warnings from macros with later clang/gcc.

Using CCACHE_HASHDIR=1 fixes ccache v3.2.4, but CCACHE_NOHASHDIR=1 does
not break v3.7.1. The real issue/fix appears to be
ccache/ccache@284e3a0, and using the hashdir option seems to only work
around this.

Unblocks neovim#10480, and
neovim#10487.

Ref: ccache/ccache@6d9cb3dfdd9
Closes neovim#10533.
timeyyy pushed a commit to timeyyy/neovim that referenced this pull request Aug 9, 2019
* ci: Travis: use gcc-9 in gcov job

* ci: Travis: use CCACHE_CPP2=1

This is required to avoid warnings with newer gcc/clang.

Follow-up to: neovim#10533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants