You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/02/21 02:43:39 UTC

[GitHub] [incubator-nuttx-apps] yamt opened a new pull request #81: do ARLOCK things a bit differently

yamt opened a new pull request #81: do ARLOCK things a bit differently
URL: https://github.com/apache/incubator-nuttx-apps/pull/81
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #81: do ARLOCK things a bit differently

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #81: do ARLOCK things a bit differently
URL: https://github.com/apache/incubator-nuttx-apps/pull/81#discussion_r382381881
 
 

 ##########
 File path: Make.defs
 ##########
 @@ -99,9 +99,13 @@ define REGISTER
 endef
 endif
 
-define ARLOCK
-	$(Q) flock .arlock $(call ARCHIVE, $1, $(2))
-endef
+# Workaround for concurrent execution to the same library (libapps)
+ifeq ($(CONFIG_HOST_MACOS),y)
+# macOS doesn't have flock. Use shlock instead.
+AR := $(APPDIR)/tools/flock.sh $(APPDIR)/.arlock $(AR)
+else
+AR := flock $(APPDIR)/.arlock $(AR)
 
 Review comment:
   But I think this change still hit "@ can't find", I mention here:
   https://github.com/apache/incubator-nuttx/pull/342
   since the symbol @ in side the original AR still pass to bash, but I can't understand why macOS no problem.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #81: do ARLOCK things a bit differently

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #81: do ARLOCK things a bit differently
URL: https://github.com/apache/incubator-nuttx-apps/pull/81#discussion_r382393185
 
 

 ##########
 File path: Make.defs
 ##########
 @@ -99,9 +99,13 @@ define REGISTER
 endef
 endif
 
-define ARLOCK
-	$(Q) flock .arlock $(call ARCHIVE, $1, $(2))
-endef
+# Workaround for concurrent execution to the same library (libapps)
+ifeq ($(CONFIG_HOST_MACOS),y)
+# macOS doesn't have flock. Use shlock instead.
+AR := $(APPDIR)/tools/flock.sh $(APPDIR)/.arlock $(AR)
+else
+AR := flock $(APPDIR)/.arlock $(AR)
 
 Review comment:
   Here is the case:
   https://github.com/xiaoxiang781216/nuttx/blob/song-u1/arch/ceva/src/song/Toolchain.defs
   You can see to support CEVA toolchain we have to do thing hard.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #81: do ARLOCK things a bit differently

Posted by GitBox <gi...@apache.org>.
yamt commented on a change in pull request #81: do ARLOCK things a bit differently
URL: https://github.com/apache/incubator-nuttx-apps/pull/81#discussion_r382382051
 
 

 ##########
 File path: Make.defs
 ##########
 @@ -99,9 +99,13 @@ define REGISTER
 endef
 endif
 
-define ARLOCK
-	$(Q) flock .arlock $(call ARCHIVE, $1, $(2))
-endef
+# Workaround for concurrent execution to the same library (libapps)
+ifeq ($(CONFIG_HOST_MACOS),y)
+# macOS doesn't have flock. Use shlock instead.
+AR := $(APPDIR)/tools/flock.sh $(APPDIR)/.arlock $(AR)
+else
+AR := flock $(APPDIR)/.arlock $(AR)
 
 Review comment:
   AR doesn't have @. ARCHIVE does.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #81: do ARLOCK things a bit differently

Posted by GitBox <gi...@apache.org>.
yamt commented on a change in pull request #81: do ARLOCK things a bit differently
URL: https://github.com/apache/incubator-nuttx-apps/pull/81#discussion_r382384440
 
 

 ##########
 File path: Make.defs
 ##########
 @@ -99,9 +99,13 @@ define REGISTER
 endef
 endif
 
-define ARLOCK
-	$(Q) flock .arlock $(call ARCHIVE, $1, $(2))
-endef
+# Workaround for concurrent execution to the same library (libapps)
+ifeq ($(CONFIG_HOST_MACOS),y)
+# macOS doesn't have flock. Use shlock instead.
+AR := $(APPDIR)/tools/flock.sh $(APPDIR)/.arlock $(AR)
+else
+AR := flock $(APPDIR)/.arlock $(AR)
 
 Review comment:
   i checked some of ARCHIVE but they all seem calling AR one way or another.
   you are right this doesn't work if ARCHIVE does something completely different.
   i suspect it isn't the case though.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx-apps] yamt closed pull request #81: do ARLOCK things a bit differently

Posted by GitBox <gi...@apache.org>.
yamt closed pull request #81: do ARLOCK things a bit differently
URL: https://github.com/apache/incubator-nuttx-apps/pull/81
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #81: do ARLOCK things a bit differently

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #81: do ARLOCK things a bit differently
URL: https://github.com/apache/incubator-nuttx-apps/pull/81#discussion_r382382748
 
 

 ##########
 File path: Make.defs
 ##########
 @@ -99,9 +99,13 @@ define REGISTER
 endef
 endif
 
-define ARLOCK
-	$(Q) flock .arlock $(call ARCHIVE, $1, $(2))
-endef
+# Workaround for concurrent execution to the same library (libapps)
+ifeq ($(CONFIG_HOST_MACOS),y)
+# macOS doesn't have flock. Use shlock instead.
+AR := $(APPDIR)/tools/flock.sh $(APPDIR)/.arlock $(AR)
+else
+AR := flock $(APPDIR)/.arlock $(AR)
 
 Review comment:
   But we can't bypass ARCHIVE and invoke AR directly, you can see there are mutiple ARCHIVE defintion in nuttx to fight or workaround the toolchain difference. 
   Actually, nuttx give the user freedom to provide own ARCHIVE defintion, so the ARCHIVE overload may exist more than we imagine.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx-apps] yamt commented on issue #81: do ARLOCK things a bit differently

Posted by GitBox <gi...@apache.org>.
yamt commented on issue #81: do ARLOCK things a bit differently
URL: https://github.com/apache/incubator-nuttx-apps/pull/81#issuecomment-589471719
 
 
   i only tested on macOS

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a change in pull request #81: do ARLOCK things a bit differently

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #81: do ARLOCK things a bit differently
URL: https://github.com/apache/incubator-nuttx-apps/pull/81#discussion_r382382748
 
 

 ##########
 File path: Make.defs
 ##########
 @@ -99,9 +99,13 @@ define REGISTER
 endef
 endif
 
-define ARLOCK
-	$(Q) flock .arlock $(call ARCHIVE, $1, $(2))
-endef
+# Workaround for concurrent execution to the same library (libapps)
+ifeq ($(CONFIG_HOST_MACOS),y)
+# macOS doesn't have flock. Use shlock instead.
+AR := $(APPDIR)/tools/flock.sh $(APPDIR)/.arlock $(AR)
+else
+AR := flock $(APPDIR)/.arlock $(AR)
 
 Review comment:
   But we can't bypass ARCHIVE and invoke AR directly, you can see there are mutiple ARCHIVE defintion in nuttx to fight or workaround the toolchain difference. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx-apps] yamt commented on a change in pull request #81: do ARLOCK things a bit differently

Posted by GitBox <gi...@apache.org>.
yamt commented on a change in pull request #81: do ARLOCK things a bit differently
URL: https://github.com/apache/incubator-nuttx-apps/pull/81#discussion_r382396067
 
 

 ##########
 File path: Make.defs
 ##########
 @@ -99,9 +99,13 @@ define REGISTER
 endef
 endif
 
-define ARLOCK
-	$(Q) flock .arlock $(call ARCHIVE, $1, $(2))
-endef
+# Workaround for concurrent execution to the same library (libapps)
+ifeq ($(CONFIG_HOST_MACOS),y)
+# macOS doesn't have flock. Use shlock instead.
+AR := $(APPDIR)/tools/flock.sh $(APPDIR)/.arlock $(AR)
+else
+AR := flock $(APPDIR)/.arlock $(AR)
 
 Review comment:
   ok, i'm now convinced. thank you for the pointer.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services