-
Notifications
You must be signed in to change notification settings - Fork 96
support target arm #482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support target arm #482
Conversation
Well, I think we can use |
Good suggestion. Changed it to use llibc::lchown |
Btw. As mentioned in #481 (comment) this is the only change needed in vagga repo so far (), to get debug build with "target=arm-unknown-linux-musleabihf" working on pi2 |
Merged. Thanks!
You mean that it works if compiling on PI itself. All other problems mentioned there is because of cross-compiling, right? |
No. On Pi itself all dependent crates get compiled but when cargo comes to 'vagga' the system gets overloaded. I tried but then I reseted the Pi after some hours because I was to lazy to wait. Guess linking all crates is too much for Pi.
Correct. But so far I can only workaround the qsort_r issue by patching the libgit2 code. Only working setup at moment is:
But the created vagga executable works fine. No strange issues detected so far when playing around. Of course 'container building' speed on Pi is slow. Don't know if it is as to be expected, or if it can be tuned somehow. |
Aha, okay, I don't think there are many people who build on Pi, so I don't think it matters. Can you make a pull request to libgit2? We can feature-gate libgit2 if needed but probably PR is the best. |
No. I commented a check which is no proper solution. If I make a PR I don't expect it will get merged. If I compile vagga with
crate libz-sys (needed by libgit2) fails. If I compile vagga with
linking fails because 'qsort_r' is missing (which seems to be expected for musl libgit2/libgit2#3438 (comment)) First I need to figure out if I do the wright thing, means 'Is it correct if I set CC for cargo build ?' I opened issue rust-lang/libz-sys#35 |
I guess yes. While libz-sys cargo could detect it, linker will fail in the same way when libz will successfully compile.
Looks like it's because you use gnu headers instead of musl ones by default. Here is how I can compile it: #483 (nowhere to test though) |
You are right. Source code is ready for 'arm'. Looks like issue is setting up correct header/lib path for compile/linking. Meanwhile I freed up some space on SD and mem on my Pi and retried to build on Pi itself where I expect correct settings for headers and libs. I tried :
I expected 1. to be successfull too because on my x86_64 it's sufficient to
while on Pi I need to add 'CC=musl-gcc'.
Fails for me. I left comment on other thread |
Different headers. You can also use
You can also try disable Do you think providing a package for arm is useful? |
Correct. Setting include path instead of CC is also building properly on Pi
Of course a package would make life easier. No idea how many people have a use case for vagga on their Pi (or other arm devices). On the other side if people know it's possible they will start to think about and usage will increase. As it is a matter of priority and time I would say arm package can wait (unless it's almost no effort for you to implement needed build steps). CI is more important. And maybe some hints 'howto use vagga on arm'. |
Fyi, https://gitlab.alpinelinux.org/alpine/aports/-/commit/bf5bbfdbf780092f387b7abe401fbfceda90c84d Profit. |
changed types to be compatibe with target "arm-unknown-linux-musleabihf"