Skip to content
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

fails to build on ARM #2058

Closed
svillemot opened this issue Jan 16, 2013 · 13 comments
Closed

fails to build on ARM #2058

svillemot opened this issue Jan 16, 2013 · 13 comments
Labels
building Build system, or building Julia or its dependencies system:arm ARMv7 and AArch64

Comments

@svillemot
Copy link
Contributor

As part of the maintenance of the Debian package for Julia, I tried to build Julia on Debian armel (ARM with soft-float). This first requires USE_SYSTEM_LIBM=1, and also the removal of GCC flag -momit-frame-leaf-pointer in Make.inc.

Then I get this error during LLVM compilation:

(test -f /home/sebastien/julia/usr/lib/arm-linux-gnueabi/julia/sys.ji || /home/sebastien/julia/usr/bin/julia-release-readline -bf sysimg.jl) && /home/sebastien/julia/usr/bin/julia-release-readline -f sysimg.jl || echo "Note: this error is usually fixed by running 'make cleanall'."
 LLVM ERROR: Not supported instr: BMOVPCRX_CALL %R3<kill>, %R0<kill>, %R1<kill>, %R2<kill>, <regmask>, %LR<imp-def,dead>, %SP<imp-use>, %SP<imp-def>, %R0<imp-def>; dbg:no file:0

Note that I am using LLVM 3.1 shipped by Debian sid.

The machine on which I am trying to compile is a Raspberry Pi. I can open shell accounts if this helps.

@ViralBShah
Copy link
Member

@JeffBezanson suggests trying to build with LLVM_ASSERTIONS=1, and see what happens.

@ViralBShah
Copy link
Member

Does it build fine on ppc now?

@JeffBezanson
Copy link
Member

LLVM might not support all ARM flavors.

@svillemot
Copy link
Contributor Author

I upgraded the Debian package to LLVM 3.2, I still get the same error (see https://buildd.debian.org/status/fetch.php?pkg=julia&arch=armhf&ver=0.0.0%2B20130107.gitd9656f41-2&stamp=1358613466 )

@JeffBezanson clang is available and can compile example C files, so LLVM supports my ARM machine
@ViralBShah on PPC it segfaults at the LLVM compile step (see https://buildd.debian.org/status/fetch.php?pkg=julia&arch=powerpc&ver=0.0.0%2B20130107.gitd9656f41-2&stamp=1358613382 )

I am currently recompiling LLVM with assertions enabled (it is taking a lot of time on my Raspberry Pi), I will give you more feedback when this is done.

@ViralBShah
Copy link
Member

We probably need to figure out where the segfault is on ppc, in building the system image.

@nolta
Copy link
Member

nolta commented Jan 20, 2013

Apparently LLVM's jit is still broken on ppc64:

$ cd deps/llvm-3.2/build/examples/
$ make
$ cd HowToUseJIT/Release/
$ g++ `../../../Release/bin/llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o  `../../../Release/bin/llvm-config --libs`
$ ./HowToUseJIT 
We just constructed this LLVM module:

; ModuleID = 'test'

define i32 @add1(i32 %AnArg) {
EntryBlock:
  %0 = add i32 1, %AnArg
  ret i32 %0
}

define i32 @foo() {
EntryBlock:
  %0 = tail call i32 @add1(i32 10)
  ret i32 %0
}


Running foo: Segmentation fault (core dumped)

@svillemot
Copy link
Contributor Author

This particular example works on my ARM machine. So I guess the PPC and ARM issues are different. I suggest that in this thread we focus on the ARM case. The PPC case seems anyways out of our control, since it is an LLVM bug.

@svillemot
Copy link
Contributor Author

Rebuilding LLVM with assertions enabled does not help. I still get the same error message.

@ViralBShah
Copy link
Member

@ViralBShah
Copy link
Member

Discussion in #3134 on the same topic can continue in there. Closing this older one as a dup.

@ViralBShah
Copy link
Member

Please follow progress in #7662.

@ViralBShah ViralBShah added the system:arm ARMv7 and AArch64 label Sep 14, 2014
@ViralBShah
Copy link
Member

@sebastien-villemot We now have master building on ARM for armv7 and better. Perhaps not worth enabling on debian until we get all tests to pass first. I guess if we get it all done by 0.4, we can enable the ARM builds on debian buildd again.

@svillemot
Copy link
Contributor Author

@ViralBShah Sure, I will try to enable ARM support as soon as Julia 0.4 is out.

For information, Debian currently has 3 ARM architectures:

  • armel: ARMv4, 32-bit, no FPU (software emulation)
  • armhf: ARMv7, 32-bit, with FPU
  • arm64: ARMv8, 64-bit (AArch64 ABI)

Clearly armel is not a target for Julia. But armhf and arm64 are clearly candidates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies system:arm ARMv7 and AArch64
Projects
None yet
Development

No branches or pull requests

4 participants