We still have race condition in CMAKE

Bug #1833851 reported by Nick Østergaard
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
High
Simon Richter

Bug Description

I think this is closely related to the bug:
[0] https://bugs.launchpad.net/kicad/+bug/1831643

And the other two observations on the list:
[1] https://lists.launchpad.net/kicad-developers/msg40860.html
[2] https://lists.launchpad.net/kicad-developers/msg40890.html

But I still see this building on MSYS2 for windows when I make a clean build. That is with a completely new checkout and builddir.

This seems to happen for the cmp_library_lexer.h all the time. I have attached the broken file and it looks like:

T_license T_author,
,
        T_name T_center,
,

You see that the commas and newlines are misplaced.

The error manifests itself as:
In file included from C:/Jenkins/workspace/windows-kicad-msys2-patch/src/eeschema/cmp_library_keywords.cpp:9:
C:/Jenkins/workspace/windows-kicad-msys2-patch/src/eeschema/cmp_library_lexer.h:366:2: error: #endif without #if
 #endif // CMP_LIBRARY_LEXER_H_
  ^~~~~
In file included from C:/Jenkins/workspace/windows-kicad-msys2-patch/src/eeschema/cmp_library_lexer.cpp:6:
C:/Jenkins/workspace/windows-kicad-msys2-patch/src/eeschema/cmp_library_lexer.h:366:2: error: #endif without #if
 #endif // CMP_LIBRARY_LEXER_H_
  ^~~~~

Build configuration used is:
cmake.exe -DCMAKE_BUILD_TYPE=Debug -G 'MSYS Makefiles' -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_RULE_MESSAGES:BOOL=OFF -DCMAKE_PREFIX_PATH=/mingw64 '-DCMAKE_INSTALL_PREFIX=C:\Jenkins\workspace\windows-kicad-msys2-patch/_install/msys64/mingw64' -DDEFAULT_INSTALL_PATH=/mingw64 -DOPENSSL_ROOT_DIR=/mingw64 -DKICAD_SCRIPTING=ON -DBUILD_SHARED_LIBS=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_WXPYTHON=ON -DKICAD_SCRIPTING_PYTHON3=OFF -DBUILD_SMALL_DEBUG_FILES=ON -DPYTHON_INCLUDE_DIR=/mingw64/include/python2.7 -DKICAD_USE_OCE=ON -DKICAD_USE_SCH_IO_MANAGER=OFF -DKICAD_SCRIPTING_ACTION_MENU=ON -DKICAD_SPICE=ON -DKICAD_SKIP_BOOST=ON -DCMAKE_CXX_FLAGS=-Wshadow -DCMAKE_CXX_FLAGS=-Wno-deprecated-declarations 'C:\Jenkins\workspace\windows-kicad-msys2-patch/src'

And then make:
make.exe install -j32

The latest commit where I tested this was on 251e0ca19c45330ca19930e2f09d4e7832f9dd8e from the master branch.

Tags: cmake
description: updated
Revision history for this message
Seth Hillbrand (sethh) wrote :

My goodness, this is the bug that will not die. :)

Can you point me to the build log?

Revision history for this message
Nick Østergaard (nickoe) wrote :

Sure, sorry that I forgot that, but there was food on the table :=)

It is here:
https://jenkins.simonrichter.eu/job/windows-kicad-msys2-patch/399/consoleText

Revision history for this message
Seth Hillbrand (sethh) wrote :

Can you pass the make flag "--output-sync" in your build script? I've having difficulty determining which target is triggering the second build.

Revision history for this message
Nick Østergaard (nickoe) wrote :
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 172542cfc439e0e4699216437e19baaf9128274d
https://git.launchpad.net/kicad/patch/?id=172542cfc439e0e4699216437e19baaf9128274d

Changed in kicad:
status: New → Fix Committed
assignee: nobody → Seth Hillbrand (sethh)
Revision history for this message
Nick Østergaard (nickoe) wrote :

@Seth, this is still not fixed:
https://jenkins.simonrichter.eu/job/windows-kicad-msys2-patch/404/consoleText

Checking out Revision da645c5d167a991606dbb278258f72a5efea4029 (origin/master)

Changed in kicad:
status: Fix Committed → New
Revision history for this message
Seth Hillbrand (sethh) wrote :

Now this is very strange because there are no longer two builds of cmp_library_lexer, just the one that completes correctly and doesn't get re-started before the error

Revision history for this message
Nick Østergaard (nickoe) wrote :

I have no clue how to move forward with this. It is also seen for the regular windows nightlies.

The test in #6 was with a clean workspace. Any other cmake/make debug options I can enable?

Revision history for this message
Seth Hillbrand (sethh) wrote :

I take back. There are two. I just missed the second one because it was right next to the first.

I'll track this down. It might end up being a more fundamental fix to avoid this in the future.

Revision history for this message
Nick Østergaard (nickoe) wrote :

@Seth, thank you very much for taking ownership of this one. :)

Revision history for this message
Nick Østergaard (nickoe) wrote :

@Seth, any update on this?

Revision history for this message
Seth Hillbrand (sethh) wrote :

@Simon-

It looks like you have a patch to address this. Would you like to take this report?

Revision history for this message
Simon Richter (sjr) wrote :

@Seth, sure, can do.

Changed in kicad:
assignee: Seth Hillbrand (sethh) → Simon Richter (sjr)
Changed in kicad:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision c8c3e1f96a3994a4a8a90efae857510b50031166
https://git.launchpad.net/kicad/patch/?id=c8c3e1f96a3994a4a8a90efae857510b50031166

Changed in kicad:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.