Bug #53240 | parallel windows compile flakey on sql_yacc.cc | ||
---|---|---|---|
Submitted: | 28 Apr 2010 9:04 | Modified: | 16 Jan 2014 12:40 |
Reporter: | Bernd Ocklin | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | mysql-5.1 ff | OS: | Any |
Assigned to: | Bernd Ocklin | CPU Architecture: | Any |
[28 Apr 2010 9:04]
Bernd Ocklin
[29 Apr 2010 7:44]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/106896 3581 Bernd Ocklin 2010-04-29 Bug#53240: introduce bison target for fixing compile dependencies
[29 Apr 2010 7:50]
Bernd Ocklin
Lars, feel free set proper lead. We would really like to get this into 5.1 mainline.
[29 Apr 2010 9:06]
Vladislav Vaintroub
@Bernd, can you attach the full log to the bug report? I never have seen this (I routinely compile on 4 and 8 cores), so I'm trying to understand what is going on in parallel.
[29 Apr 2010 9:08]
Vladislav Vaintroub
And depending on the file is just fine. CMake is smart enough to recognize that if file is missing and there is a rule to generate it, it is generated before target is built. If it were not so, you would get a missing sql_yacc.cc, which is not the case here.
[29 Apr 2010 10:25]
Vladislav Vaintroub
Ok, I can guess what happens here. Say embedded and sql are compiled in parallel. a ) embedded depends on GenServerSource which depends on sql_yacc.cc, and now bison starts generating its output. b ) sql starts compiling, sees sql_yacc.cc is already there and there is no need to generate it. Tries to compile sql_yacc.cc . However bison is not yet finished, so sql_yacc.cc is locked. If you want to fix it cleanly, there is no need to create an extra sql_yacc target. Instead, make sql depend on GenerateServerSource using ADD_DEPENDENCIES. It will prevent parallel execution. Also it will ensure that other generated files cannot be created and used at the same time.