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

Race condition with #import #2161

Open
bdbaddog opened this issue Jan 2, 2018 · 0 comments · May be fixed by #3711
Open

Race condition with #import #2161

bdbaddog opened this issue Jan 2, 2018 · 0 comments · May be fixed by #3711
Labels
Milestone

Comments

@bdbaddog
Copy link
Contributor

bdbaddog commented Jan 2, 2018

This issue was originally created at: 2008-08-04 14:23:10.
This issue was reported by: jonasolsson.
jonasolsson said at 2008-08-04 14:23:10

With Microsoft compiler when the compiler encounters a #import <foo.tlb> it will generate a foo.tlh and a foo.tli. If there are multiple compiles in parallel there is a race condition on who creates the *.tlh and you tend to get permission denied errors.

The C scanner currently finds the #import'ed files, but does not handle them any different than the #include'd files. Assuming the scanner could be either enhanced to separate the two kinds of files, or simplified to only find the #include'd files and then adding a new scanner for the #imported'ed files. Then the list of #import'ed files could be used to control what compiles can be run in parallell, by using SideEffect() or other means.

jonasolsson said at 2008-08-04 14:35:28

Add missing warning message.

jonasolsson said at 2008-08-04 14:37:59

Ignore the previous comment, it was intended for issue 2158.

gregnoel said at 2008-08-12 11:22:44

Bug party triage. SCons has SideEffect() to prevent multiple processes from opening the same file, but that would cause all compiles that refer to the same header to be run sequentially, which may prohibit any asynchronous compiles.

In the meantime, the workaround is to pick one compile to build the file and use Depends() to make that compile the producers of the file and further Depends() to make the other compiles the consumer of the file. That would make one compile synchronous, but the rest would be asynchronous.

Ask on the users' mailing list if you need help making this work.

stevenknight said at 2009-11-10 18:00:19

stevenknight => issues@scons

Votes for this issue: 1.

@bdbaddog bdbaddog added this to the future milestone Jan 2, 2018
@bdbaddog bdbaddog added MSVC Microsoft Visual C++ Support and removed P4 labels Jun 16, 2020
@mwichmann mwichmann linked a pull request Mar 28, 2021 that will close this issue
3 tasks
@mwichmann mwichmann linked a pull request Mar 28, 2021 that will close this issue
3 tasks
@mwichmann mwichmann modified the milestones: Future, Anytime May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants