You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by GitBox <gi...@apache.org> on 2022/01/25 09:44:48 UTC

[GitHub] [buildstream] abderrahim opened a new pull request #1576: _sandboxbwrap.py: try to support architectures that don't match host

abderrahim opened a new pull request #1576:
URL: https://github.com/apache/buildstream/pull/1576


   This can be used by setting up the host to run binaries from different
   architectures via binfmt and qemu-user.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [buildstream] gtristan merged pull request #1576: _sandboxbwrap.py: try to support architectures that don't match host

Posted by GitBox <gi...@apache.org>.
gtristan merged pull request #1576:
URL: https://github.com/apache/buildstream/pull/1576


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [buildstream] gtristan commented on pull request #1576: _sandboxbwrap.py: try to support architectures that don't match host

Posted by GitBox <gi...@apache.org>.
gtristan commented on pull request #1576:
URL: https://github.com/apache/buildstream/pull/1576#issuecomment-1044121874


   I was first concerned with the additional optional dependency appearing like an API surface of sorts, i.e. "If you run BuildStream in an environment with a binary called `arch-test`, then it will be consulted for yada yada", but given that we already use `linux32` this seems to be less of a concern.
   
   That said, by applying this patch, are we setting up our users with unrealistic expectations when transitioning to BuildStream 2 ?
   
   Native building of foreign binary formats is not supported by BuildStream as far as I'm aware, and hopefully, eventually remote execution clusters could be used for that kind of thing.
   
   If we move ahead with this, we should not have the expectation that `buildbox-run` is going to behave in the same way.
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [buildstream] abderrahim commented on pull request #1576: _sandboxbwrap.py: try to support architectures that don't match host

Posted by GitBox <gi...@apache.org>.
abderrahim commented on pull request #1576:
URL: https://github.com/apache/buildstream/pull/1576#issuecomment-1044982684


   I'm going to propose a similar thing for buildbox-run (possibly a little more sophisticated, by looking at what other container tools like flatpak and docker/podman do).
   
   That said, it is easier with bst2: We can use remote execution, by running a buildbox docker image of the architecture we want to build for. There is also a workaround we can use with bst2: we can build buildbox-run for the non-native architecture. It'll then think it is running on the correct architecture.  We can't do that with bst1 since it means compiling python for the non-native architecture, which will make bst very slow.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [buildstream] gtristan commented on pull request #1576: _sandboxbwrap.py: try to support architectures that don't match host

Posted by GitBox <gi...@apache.org>.
gtristan commented on pull request #1576:
URL: https://github.com/apache/buildstream/pull/1576#issuecomment-1049458838


   Alright, I've spoken with @juergbi about this and while it is a bit uncomfortable to do this in bst-1 *before* addressing this in master, it is agreed that it will be desirable to have a solution for this in master & buildbox-run.
   
   So let's go ahead with this and roll out a new `1.6.4`


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [buildstream] nanonyme commented on a change in pull request #1576: _sandboxbwrap.py: try to support architectures that don't match host

Posted by GitBox <gi...@apache.org>.
nanonyme commented on a change in pull request #1576:
URL: https://github.com/apache/buildstream/pull/1576#discussion_r792089210



##########
File path: buildstream/sandbox/_sandboxbwrap.py
##########
@@ -58,11 +66,25 @@ def __init__(self, *args, **kwargs):
         host_os, _, _, _, host_arch = os.uname()
         config = self._get_config()
 
-        # We can't do builds for another host or architecture except 32 bit on 64 bit
+        # We can't do builds for another host OS
         if config.build_os != host_os:
             raise SandboxError("Configured and host OS don't match.")
 
         if config.build_arch != host_arch:
+            try:
+                archtest = utils.get_host_tool('arch-test')

Review comment:
       My only concern with this is availability of arch-test. I'm sort of wondering what would be the problem of just removing all this sanitation and only keeping linux32 parts. Build will fail anyway if CPU arches don't match. Why does BuildStream need to check? It's quite complex to do so.




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [buildstream] nanonyme commented on a change in pull request #1576: _sandboxbwrap.py: try to support architectures that don't match host

Posted by GitBox <gi...@apache.org>.
nanonyme commented on a change in pull request #1576:
URL: https://github.com/apache/buildstream/pull/1576#discussion_r808201691



##########
File path: buildstream/sandbox/_sandboxbwrap.py
##########
@@ -58,11 +66,25 @@ def __init__(self, *args, **kwargs):
         host_os, _, _, _, host_arch = os.uname()
         config = self._get_config()
 
-        # We can't do builds for another host or architecture except 32 bit on 64 bit
+        # We can't do builds for another host OS
         if config.build_os != host_os:
             raise SandboxError("Configured and host OS don't match.")
 
         if config.build_arch != host_arch:
+            try:
+                archtest = utils.get_host_tool('arch-test')

Review comment:
       Maybe this is fine. We can in our build images replace this with shim as well if desired




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [buildstream] nanonyme commented on a change in pull request #1576: _sandboxbwrap.py: try to support architectures that don't match host

Posted by GitBox <gi...@apache.org>.
nanonyme commented on a change in pull request #1576:
URL: https://github.com/apache/buildstream/pull/1576#discussion_r808201691



##########
File path: buildstream/sandbox/_sandboxbwrap.py
##########
@@ -58,11 +66,25 @@ def __init__(self, *args, **kwargs):
         host_os, _, _, _, host_arch = os.uname()
         config = self._get_config()
 
-        # We can't do builds for another host or architecture except 32 bit on 64 bit
+        # We can't do builds for another host OS
         if config.build_os != host_os:
             raise SandboxError("Configured and host OS don't match.")
 
         if config.build_arch != host_arch:
+            try:
+                archtest = utils.get_host_tool('arch-test')

Review comment:
       Maybe this is fine. We can in our build images replace this with shim that claims everything works




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org