| 19 Aug 2021 |
Mic92 | we chatted a bit yesterday so | 11:08:58 |
Sandro | ah okay. I think it was something with network throughput in the microvm kernel or something. Can't remember | 11:13:13 |
Mic92 | If one wants to get decent throughput with VMs than SR-IOV is the way to go | 11:16:29 |
Mic92 | Used 10Gbit/s/40Gbit/s NICs became quite affordable now and support this | 11:17:41 |
symphorien | I'm trying to cross compile ocaml with host=build=x86 and target=musl (for pkgsStatic) and when trying to link the stdlib ocaml tries to use the prefixed compiler for target, which is not in $PATH | 18:56:25 |
symphorien | how do I add it to the $PATH ? | 18:56:38 |
sterni | My intuition would be that you need pkgsBuildTarget.targetPackages.stdenv.cc | 18:57:55 |
symphorien | do I add it to the path with export or in buildInputs or ??? | 18:58:49 |
sterni | would belong in nativeBuildInputs | 18:59:17 |
symphorien | ah right, for $PATH | 18:59:33 |
sterni | I'd recommend though that you try to make a ocaml cross compiler for something which isn't the same arch as you are building on first | 18:59:59 |
sterni | because implementing cross compilation with pkgsStatic lets you get away with things you wouldn't in that case | 19:00:28 |
sterni | for example you can run something from the target platform in the case of pkgsStatic | 19:00:47 |
symphorien | well for now I don't even get away with pkgsStatic so... | 19:01:02 |
symphorien | why the targetPackages in pkgsBuildTarget.targetPackages.stdenv.cc ? | 19:01:33 |
Alyssa Ross | doing it for a different architecture can make it much more obvious why things aren't working | 19:01:44 |
symphorien | also ocaml is not designed for cross at all so I suspect pkgsStatic is the only case that will work at all | 19:02:02 |
symphorien | the configure script only considers one toolchain | 19:02:20 |
sterni | In reply to @symphorien:xlumurb.eu why the targetPackages in pkgsBuildTarget.targetPackages.stdenv.cc ? pkgsBuildTarget.stdenv.cc is build -> build since stdenv is always the compiler used to build the package set | 19:06:55 |
sterni | so you need to use targetPackages if you want to get the “default” compiler of that package set | 19:07:13 |
Alyssa Ross | that's the same as just nativeBuildInputs = [ targetPackages.stdenv.cc ]; when using callPackage though, right? thanks to splicing? | 19:08:33 |
symphorien | weird because the manual says targetPackages is a synonym for pkgsTargetTarget so the cc from targetPackage should never be cross ??? | 19:08:35 |
symphorien | ah you said "cc is the cc used to build the set" | 19:09:30 |
symphorien | so cc does not really "belong" to the set | 19:09:39 |
Alyssa Ross | yeah stdenv is sort of one level back in the chain | 19:09:52 |
symphorien | ok I think I understand | 19:10:04 |
Alyssa Ross | when you cross compile, there are three package sets involved | 19:10:24 |
Alyssa Ross | (build, build, build) -> (build, build, target) -> (build, target, target) | 19:11:06 |
Alyssa Ross | stdenv.cc is the compiler from the middle package set | 19:11:29 |
sterni | In reply to @symphorien:xlumurb.eu weird because the manual says targetPackages is a synonym for pkgsTargetTarget so the cc from targetPackage should never be cross ??? note also that targetPackages and buildPackages are relative terms i. e. for a given set, set.buildPackages is the “previous” set used to build the set and targetPackages is the “next” set built using the set | 19:24:27 |