IRC logs for #buildstream for Saturday, 2019-02-23

*** juanalday has joined #buildstream00:35
*** nimish has joined #buildstream01:16
*** juanalday has quit IRC02:37
*** mlalkaka has joined #buildstream02:40
mlalkakaHi all, I'm trying to follow the Newcomers/BuildSystemComponent guide to build parts of GNOME using BuildStream. However, when BuildStream tries to build librsvg, it runs into an error: 'failed to select a version for the requirement `cairo-rs = "= 0.6.0"`.  candidate versions found which didn't match: 0.5.0.  location searched: directory source `/buildstream/gnome/sdk/librsvg.bst/crates` (which is replacing registry02:43
mlalkaka`https://github.com/rust-lang/crates.io-index`)'02:43
mlalkakaDoes anyone know how to fix this?02:43
mlalkaka(Wasn't sure whether this belonged in the #newcomers group or here.)02:43
*** mlalkaka has quit IRC03:12
*** mlalkaka has joined #buildstream03:13
*** nimish has quit IRC03:17
*** juanalday has joined #buildstream05:35
*** juanalday has quit IRC05:38
*** tristan has joined #buildstream06:26
*** mlalkaka has quit IRC07:48
gitlab-br-bottristanvb opened issue #929 (Spurious blockingio error) on buildstream https://gitlab.com/BuildStream/buildstream/issues/92907:51
*** tristan has quit IRC09:16
*** tristan has joined #buildstream09:25
juergbitristan: I'm considering replacing the file list parameter of copy_files/link_files/Directory.import_files with a filter function parameter10:52
juergbii.e., instead of using list_relative_paths(), optionally creating a subset of that file list and then passing that to copy_files(), the code would directly pass a suitable filter function (e.g., doing the split match()) and copy_files() would iterate over the directory10:55
juergbiI think this would be more efficient, especially in the CAS-based directory case (allow recursive operation without having to scan the file list multiple times), but probably also in the regular filesystem case10:56
juergbiside-note, it may actually be possible to merge _process_list() with Directory.import_files(), having the replace logic etc. only in one place, but we should do this step by step10:58
juergbiany thoughts on this?11:04
*** nanonyme has joined #buildstream11:46
*** nanonyme has left #buildstream11:46
doras[m]I'm getting different cache keys on my x86_64 machine than the ones that are in the cache server, even though the build products of both the cache server and my own machine are expected to be the same; I set the same target_arch and bootstrap_build_arch options as the ones set in the aarch64 CI that pushed them to the cache server.11:47
doras[m]Is there a way for me to figure out why those keys are different, or exactly how they are calculated?11:47
juergbidoras[m]: same buildstream version? (1.2.4, I presume)11:48
juergbidoras[m]: ah, 1.2 doesn't support the `build-arch` config key yet11:50
juergbidue to that, buildstream 1.2 generates different cache keys depending on the host architecture11:51
juergbithis is fixed in buildstream master by allowing a project to set `build-arch` in `sandbox`, which may depend on a project option, of course11:52
doras[m]juergbi: yes, 1.2.4. Why does BuildStream 1.2 assume that the host arch is the arch of the build products as well? Sounds like a wrong assumption to make.11:53
juergbiin which case, buildstream will use that architecture for cache key generation instead of the host's11:53
juergbiit doesn't exactly assume that11:53
juergbiit assumes that the execution environment (i.e., the build architecture) is the same as the host11:53
juergbiwhich is typically true, if you use local execution and don't use qemu-user11:54
juergbias mentioned, this limitation is already lifted, but only in master11:54
doras[m]juergbi: does BuildStream 1.2 expose the host arch in some way to elements?11:55
juergbithere is no configuration or variable for it in 1.2, if that's what you mean11:56
doras[m]Then wouldn't it be correct to assume that the host arch doesn't affect the execution environment in any way?11:57
doras[m]In which case, taking into account the host arch in cache key calculation is done for no actual benefit.11:58
doras[m]juergbi: if the above is correct, I'd like to submit a MR for 1.2 to remove the host arch from cache key calculation.12:03
juergbidoras[m]: the host arch can affect the execution12:11
juergbie.g., `uname -m`12:11
juergbiand, of course, if the staged binaries are not supported by the host arch (and no qemu-user is installed), the build would fail12:12
juergbi(and we support caching failures)12:12
doras[m]uname is just an executable, isn't it? It comes from the execution environment. If my execution environment is aarch64, it would be aarch64. If it's x86_64, it would be x86_64.12:13
juergbiit's about the output that differs12:13
juergbian element may do things differently depending on what `uname -m` says12:14
juergbie.g., autotools does that12:14
doras[m]I meant that the output is aarch64 in my aarch64 execution environment and x86_64 in my x86_64 execution environment.12:14
juergbiyes, exactly12:14
doras[m]At least this is what my testing shows.12:14
doras[m]So it doesn't have anything to do with the host.12:15
doras[m]Or did I miss anything?12:15
juergbiif the underlying syscall is called, the kernel will return the host arch12:15
juergbiqemu-user intercepts that, of course12:16
juergbihowever, with mixed arch environments you can get issues12:16
juergbie.g., you could have a x86-32 bootstrap12:17
juergbiif you run that on a x86-64 system, the x86-32 `uname -m` would still return x86_64 because that's what the kernel returns12:17
juergbii.e., if you run ./configure using the x86-32 bootstrap, you get a different build depending on whether you run that on a x86-64 or a x86-32 system12:18
juergbi(the latter can be simulated using `linux32`)12:18
doras[m]So x86-64 and x86-32 are a special case because the kernel can support both execution environments at the same time.12:19
juergbiyou could also have Itanium and x86-3212:19
juergbior aarch64 and aarch3212:19
juergbiand with qemu-user you can have similar issues, depending on how you mix binaries12:20
doras[m]aarch64 can run aarch32 machine code?12:20
juergbiaarch64 kernels can be configured to support aarch32 userspace12:20
juergbiif the hardware supports it12:20
juergbie.g., typical smartphone SoCs support that12:20
juergbisome server CPUs don't12:20
doras[m]How did you avoid these issues in BuildStream master?12:21
juergbiwe allow the project/element to set `build-arch` (in `sandbox` config group)12:21
juergbiand use that value instead of the host arch12:21
juergbi(default is the host arch)12:22
doras[m]Do you intercept syscalls to avoid uname issues?12:22
juergbiif you specify build-arch: x86-32, we also automatically run the sandbox via `linux32`12:22
juergbiand if you specify an incompatible build-arch, you currently get an error, iirc12:23
juergbithis would have to be extended to allow operation with qemu-user12:24
doras[m]But what about uname? Will I still get x86-64 on a x86-64 host even if I set "build-arch" to x86-32?12:25
juergbino, you get i686 thanks to linux3212:25
juergbiunfortunately, there is no such approach to override it across incompatible architecture, afaik12:26
juergbiwe might have to use seccomp/ptrace to fully support this12:27
doras[m]So can 1.2 be made to configure its sandbox similarly to master and avoid these issues?12:27
doras[m]Or are there significant dependencies that are missing?12:27
juergbiwe normally don't backport format enhancements12:28
juergbifreedesktop-sdk would also have to use it, and thus depend on that new version12:28
doras[m]We already depend on 1.2.4 :)12:29
juergbione option could be to add an unsupported environment variable that can be used to override the host arch12:33
*** nimish has joined #buildstream13:40
*** nimish has quit IRC15:12
*** juanalday has joined #buildstream17:31
*** juanalday has quit IRC17:45
*** juanalday has joined #buildstream17:46
*** juanalday has quit IRC17:50
*** juanalday has joined #buildstream17:53
*** juanalday has quit IRC20:07
*** tristan has quit IRC20:12
*** juanalday has joined #buildstream20:12
*** juanalday has quit IRC21:13
*** mlalkaka has joined #buildstream21:42
doras[m]juergbi: I've added the environment variable, and it seems to work well. I've been able to pull from the cache server and build using the pulled artifacts. Pretty much covers my cross-building use case. Should submit a MR for bst-1.2?23:09

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!