Nix Cross Compiling | 580 Members | |
| 128 Servers |
| Sender | Message | Time |
|---|---|---|
| 10 Aug 2021 | ||
| although I could try just setting int64_t there or int32_t depending on platform.bits | 21:03:31 | |
okay I'd need to find out how big long long is in any case | 21:07:31 | |
also stuff like ECL_STACK_DIR seems ominous | 21:07:38 | |
| 15 Aug 2021 | ||
| 04:41:03 | ||
i'm trying to cross-compile some packages for aarch64-apple-ios. my host system is aarch64-apple-darwin20.6.0 | 04:41:35 | |
| i have this shell.nix:
| 04:42:05 | |
this works, and there is a aarch64-apple-ios-clang inside the shell, but it doesn't seem functional (it cannot find stdarg.h or other standard headers) | 04:42:50 | |
| if i uncomment
| 04:44:28 | |
| other packages fail with different errors, but mostly always related to standard headers | 04:44:48 | |
| 06:47:09 | ||
| 06:48:07 | ||
| 06:48:38 | ||
| 06:51:13 | ||
In reply to @jbg:matrix.orgyou should use $CC, this way there is no doubt about what to use | 08:24:10 | |
yes, i'm using $CC (which is aarch64-apple-ios-clang) — the problem is that the wrapper doesn't seem to be providing all needed args for it to find system headers | 08:43:16 | |
would be interested whether someone with x86_64-darwin host system can reproduce it (just take the above shell.nix and uncomment glib in buildInputs). if it works on x86_64-darwin then i guess it's an issue with aarch64-darwin host | 08:44:26 | |
it's not specific to glib, either — put just about anything in buildInputs and it will fail to build, since all the standard headers are missing | 08:45:14 | |
| ah, sorry. There is a bug where clang-7 works but not clang or the other way around, and I thought that was an instance of it | 08:47:54 | |
ah right. the iphone64 cross system is supposed to use Xcode's prebuilt clang; you have to manually download Xcode.app and add it to the store before it will work. so it's clang 11 or 12 or whatever is being shipped by Xcode these days. that part seems to be working fine, but it just doesn't seem to set up the sysroots or whatever properly | 08:49:40 | |
aarch64-apple-ios-clang seems to be a shell script that adds the needed arguments pointing to paths in the nix store, but it's not clear to me which part of that is not working correctly | 08:50:44 | |
| 17 Aug 2021 | ||
| 02:47:59 | ||
| I need a riscv-gcc but with a different
| 13:04:12 | |
It works, but I need a second nixpkgs import. Is there a way around that? | 13:04:35 | |
it's not possible as pkgsCross uses nixpkgsFun which is then nixpkgs self import partially applied, but it is only accessible internally unfortunately | 13:08:57 | |
| but in essence pkgsCross also internally just reimports nixpkgs, so there's not much difference | 13:09:14 | |
I guess you should use super.path instead of <nixpkgs> though to make this more protable | 13:09:30 | |
* I guess you should use super.path instead of <nixpkgs> though to make this more portable | 13:09:35 | |
In reply to @sternenseemann:systemli.orgThat sounds great. Actually my problem is not the double import, but having to pass a pinned nixpkgs down to the overlay | 13:10:43 | |
yeah self.path should fix that | 13:11:05 | |
| is probably a bit cleaner, but would be the same anyways | 13:11:14 | |