Skip to content

Conversation

@xiaoxiang781216
Copy link
Contributor

Use flock to serialize ar steps to avoid parallel build break
sometimes.

Change-Id: I3a916b3b27422cdb6d718f7d554361565457fa08
Signed-off-by: Xiang Xiao xiaoxiang@xiaomi.com

Use flock to serialize ar steps to avoid parallel build break
sometimes.

Change-Id: I3a916b3b27422cdb6d718f7d554361565457fa08
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
@xiaoxiang781216
Copy link
Contributor Author

A general version of:
apache/nuttx#102
Before we get a better solution, this patch can fix the parallel build which is very important for the upcoming Apache Jenkins and Github Action.

@xiaoxiang781216
Copy link
Contributor Author

@masayuki2009 please associate your github account with apache account:
https://whimsy.apache.org/roster/ppmc/nuttx
so I can add you to reviewer list.

@masayuki2009
Copy link
Contributor

@masayuki2009 please associate your github account with apache account:
https://whimsy.apache.org/roster/ppmc/nuttx
so I can add you to reviewer list.

@xiaoxiang781216 I'll setup it later.

@masayuki2009
Copy link
Contributor

@xiaoxiang781216 I've just added my github account info to the apache.

@yamt
Copy link
Contributor

yamt commented Feb 20, 2020

macOS doesn't have flock.
how about using shlock instead? macOS has it.

@xiaoxiang781216
Copy link
Contributor Author

macOS doesn't have flock.
how about using shlock instead? macOS has it.

But shlock doesn't exist on cygwin and msys2, even Ubuntu need install manually with apt-get install:(.

@xiaoxiang781216
Copy link
Contributor Author

How about https://github.com/discoteq/flock:
brew tap discoteq/discoteq
brew install flock

@masayuki2009
Copy link
Contributor

@xiaoxiang781216 It looks good to me.

@patacongo
Copy link
Contributor

How about https://github.com/discoteq/flock:
brew tap discoteq/discoteq
brew install flock

This would need to be documented so macOS users would have to install flock? I will merge this PR when the documentation updates are in place. This should be covered in the top-level README.txt file.

@xiaoxiang781216
Copy link
Contributor Author

@patacongo here is the patch updating README.txt:
apache/nuttx#337

@patacongo patacongo changed the base branch from master to pr79 February 20, 2020 19:13
@patacongo patacongo merged commit 6b26e8f into apache:pr79 Feb 20, 2020
@masayuki2009
Copy link
Contributor

Hi, @xiaoxiang781216,

I found that this solution still has a problem.
Because .arlock files are created in each application directory.

I think the lock file should be in the same directory as '.a' file,
because we want to protect '
.a' file access.

Or as I tried before, the lock file could be at the top directory. (rather giant lock)

@xiaoxiang781216
Copy link
Contributor Author

Hi, @xiaoxiang781216,

I found that this solution still has a problem.
Because .arlock files are created in each application directory.

I think the lock file should be in the same directory as '.a' file, because we want to protect '.a' file access.

Or as I tried before, the lock file could be at the top directory. (rather giant lock)

Yes, I will send a new PR fix this issue.

@xiaoxiang781216
Copy link
Contributor Author

@masayuki2009 see this:
#80

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.

4 participants