-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Cross-compiling for ARMv6 #10488
Comments
GitHub issues are not for questions, but for bug reports. I see you have also sent a message to the julia-dev mailing list, thus I'm closing this issue in favor of the latter. If you find actionable items that deserve a bug report, feel free to reopen it. |
I guess this is kind of an issue in the sense that we may need to figure out if this works, and if so, document it. In general, we do not have cross-compilation instructions. |
There are cross-compile instructions in the windows readme. However, I guess this is kind of an issue in the sense that we may need to figure — |
set |
Here are some of the flags that I modified in Make.inc for the cross-compile: And in deps/Makefile: Now,its picking up the arm-buildroot-linux-uclibcgnueabi toolchain successfully.
Making all in support Looks like some flags are missing in fftw configure,I tried adding but couldn't resolve.. |
I would just do |
@staticfloat Do you think we can have nightly dev PPAs for arm? They don't yet pass all tests, but people want to experiment - and this would be generally useful. Also, I am wondering if we should cross build for arm on travis and run a simple test suite just to get things started. |
I enabled |
@staticfloat Should we continue the PPA nightlies discussion in #8359 ? @vishnusuganth Can you submit a PR? Many of these things can go into the existing ARM.inc, and can be enabled with a flag like |
@ViralBShah If I enable "USE_SYSTEM_XXX=1" flag ,should I build those libraries separately and add the path of the libXXX.so to LDFLAGS ? |
Usually, you would have them provided by the system - through apt-get or something similar. If they are on the system path, the julia build will pick them up. |
The other way to get around this is probably to remove the mention of |
I am trying to port Julia into an embedded system which has no access to internet or whatsoever and I am pretty sure it does not have any of Julia dependencies in it already. |
@vishnusuganth if you manually build dependencies separately, you will need to install them into a place where the Julia build process can find them. Examples that are searched by default are places like |
@ViralBShah I skipped FFTW and continued the build.It broke at this point with some error. CC src/support/strtod.o define bswap_64(x) __bswap_64 (x)^ |
This is perhaps some ARMV6 peculiarity that doesn't materialize on ARMV7 that we have tested on so far. Cc: @ihnorton |
Seems more of a peculiarity of the embedded linux than ARMV6 - perhaps a missing header or something. |
I replaced #if !defined(OS_WINDOWS) in strtod.c with #ifdef USE_XLOCALE and continued the build.
[pao: quoting] |
llvm-config and flisp are binaries that get built for the host architecture, so this is where cross-compiling is going to hit trouble. Is there a way, perhaps via qemu, that you can execute arm-compiled binaries on the build system? |
@tkelman Yea I get it.I will try it and give an update.....Btw,I have few doubts.
|
Depends what you ask for. On Linux the default is gcc. With
No, we don't use autotools for base Julia. We may eventually switch from hand-written makefiles to CMake, but that's probably a long way off. You can set |
If I was to buy an ARM computer to be able to look into these issues better, is there some platform that is better than another for that purpose? RasPi, RasPi2, BeagleBones, or such? |
Meanwhile,could anyone help me to solve this error ?
|
looks like llvm might be trying to use the x86 |
All other deps are using |
Dunno, something wrong in their autotools, or the way we're calling them maybe? |
Well they do work for the cross compile we officially support (Windows). Pull requests are welcome! I've tried this last night and ran in to several similar issues, the biggest ones being libuv's IPv6 dependency (not available in the toolchain I was using), and the fact that LLVM's install target assumes it is running on host. Using binfmts with qemu could help there but I didn't get the config correct yet. |
Except that the new GC doesn't work under wine last I checked, but that's beside the point. Definitely worth patching a few places to make this easier, when |
@nalimilan I dint go that far.Since I had problems with sysimg bootstrap. |
@ViralBShah |
Does it matter? CLAGS and CXXFLAGS are reserved for the user. |
Appending flags like that to |
We certainly do not send CFLAGS and CXXFLAGs to every dependency. |
Any idea about this ?
|
Seems like you need to install ncurses-dev or something. |
@ViralBShah Thanks.I solved that.
|
Since you are not using USE_SYSTEM_LIBM right now, perhaps try with that instead. You may want to clean out the old sys.* files. I think there is some other bug elsewhere. |
|
I have not cross-compiled LIBM for my target separately and also the target
|
@pao The LLVM_FLAGS are used in the llvm ./configure script. But when I But still same error! I guess there is a bug at some other point
|
There are two separate issues that are here, which is causing some confusion:
|
Yea fine . We could discuss there. Not a problem. But I have already sent a
|
Could you please link to that thread, @vishnusuganth? |
https://groups.google.com/forum/m/?hl=en#!topic/julia-dev/EL7dwdF1Cds
|
those do look like impressive specs, which would be nice. once i got julia working, my next step would likely seem to be making julia interact with the I/O, so the dev boards seem better for that. but maybe i should just collect them all; it's not like they are very expensive. |
I have been using a Samsung Chromebook for ARM testing, which has worked out quite well, and Julia starts up just fine on it. |
What doesn't work is |
@pao I have a working LLVM/Clang for my target (ARMv6) after cross-compilation Is there any way to run the sysimg bootstrap alone on my target now ? Will that be meaningful ? Sorry I am not much aware of this sysimg bootstrap process |
That should be fine; the additional flags are tuning. I'm not sure what the state of the art is on running the bootstrap--someone else will need to chime in on that. |
that should be one of the processors supported natively by llvm (http://llvm.org/docs/doxygen/html/Host_8cpp_source.html#l00647) unfortunately, that list is extremely small. and some of the information it maps to is invalid/incomplete (in the ProcessorModel list in lib/Targets/ARM/ARM.td) there are mind-boggling number of configuration options ( |
It seems like we should have a conservative set of defaults that are likely to work for most common use cases. Is it fair to say that targeting generic with |
Interestingly, the llvm ARM binaries seem to be doing something along those lines, since people have reported success building julia with those. |
'generic(hard-float)+vfp' and 'generic(hard-float)-vfp' are the most conservative options (which would also disable neon, and uses the aapcs abi). it is necessary to provide both (they are not compatible). it's maybe unlikely anyone is trying to run julia on a 'generic(soft-float)-vfp' machine, but that would be a third, common, incompatible option. most of the other calling conventions are special-purpose or old -- i'm not even sure if llvm supports all of them. |
I believe #10917 should fix this. The CPU used there |
I am trying to cross-build Julia for ARMv6 with arm-buildroot-linux-uclibcgnueabi toolchain on a Intel-PC(x86) as a build machine.
What are the Makefile config parameters to be changed for such a cross-compilation ?
The text was updated successfully, but these errors were encountered: