# Error in building Julia for Alpine Linux (ARM v7 32bits)

**URL:** https://discourse.julialang.org/t/error-in-building-julia-for-alpine-linux-arm-v7-32bits/42225
**Category:** Internals & Design
**Created:** [June 29, 2020, 4:25am UTC](https://discourse.julialang.org/t/error-in-building-julia-for-alpine-linux-arm-v7-32bits/42225 "2020-06-29T04:25:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![RGerzaguet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rgerzaguet/32/45492_2.png) [@RGerzaguet](https://discourse.julialang.org/u/RGerzaguet)
#### Post date: [June 29, 2020, 4:25am UTC](https://discourse.julialang.org/t/error-in-building-julia-for-alpine-linux-arm-v7-32bits/42225/1 "2020-06-29T04:25:11Z")

</div>

Hello folks

I try to built Julia for a custom Alpine linux armv7 on Docker. The container I use is this one ([https://github.com/balena-io-library/base-images/tree/master/balena-base-images/device-base/zc702-zynq7/alpine/3.12](https://github.com/balena-io-library/base-images/tree/master/balena-base-images/device-base/zc702-zynq7/alpine/3.12))

After some time of compilation I get the following error

```
    In file included from /home/rgerzagu/work/julia/src/processor.cpp:844:
    /home/rgerzagu/work/julia/src/processor_arm.cpp:13:31: warning: "__GLIBC_PREREQ" is not defined, evaluates to 0 [-Wundef]
       13 | #if defined(_CPU_AARCH64_) || __GLIBC_PREREQ(2, 16)
          | ^ ~~~~~~~~~~~~~
    /home/rgerzagu/work/julia/src/processor_arm.cpp:13:45: error: missing binary operator before token "("
       13 | #if defined(_CPU_AARCH64_) || __GLIBC_PREREQ(2, 16)
          | ^
    make[1]: *** [Makefile:165: processor.o] Error 1
    make[1]: *** Waiting for unfinished jobs....

```

I understand that it is link to the fact that the Linux uses musl and not libc but not sure how I can handle that (it is possible though ?)

Thanks in advance  
Robin

---

<div class="post-metadata">

### Author: ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)
#### Post date: [June 29, 2020, 7:01am UTC](https://discourse.julialang.org/t/error-in-building-julia-for-alpine-linux-arm-v7-32bits/42225/2 "2020-06-29T07:01:34Z")

</div>

I don’t know much about this but there has been a recent post with successful build for ARM:

> [@Have a try Julia v1.4.2 for arm32bit](https://discourse.julialang.org/t/have-a-try-julia-v1-4-2-for-arm32bit/40284):
>
> Since Julia for arm32bit (e.g. RaspberryPi series) reduced toTier3, [Download Julia](https://julialang.org/downloads/) does not provide, binary Julia 1.4.2. sob Good news! I’m happy to announce the release of recipe (technically Dockerfile) that builds Julia v1.4.2 for RaspberryPi series. See [GitHub - Julia-Embedded/jlcross: Dockerfiles for arm devices e.g. Raspberry Pi Series](https://github.com/Julia-Embedded/jlcross) You can enjoy Julia on your Raspberry Pi 3 or 4 even Zero smile Does Julia packages runs on Raspberry Pi ? As far as I know…

Maybe you find some help there.

---

<div class="post-metadata">

### Author: ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)
#### Post date: [June 29, 2020, 11:10am UTC](https://discourse.julialang.org/t/error-in-building-julia-for-alpine-linux-arm-v7-32bits/42225/3 "2020-06-29T11:10:30Z")

</div>

I believe it’s fixed recently.

---

<div class="post-metadata">

### Author: ![RGerzaguet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rgerzaguet/32/45492_2.png) [@RGerzaguet](https://discourse.julialang.org/u/RGerzaguet)
#### Post date: [July 5, 2020, 9:52am UTC](https://discourse.julialang.org/t/error-in-building-julia-for-alpine-linux-arm-v7-32bits/42225/4 "2020-07-05T09:52:06Z")

</div>

Thank you very much for the feedback.  
I switch to the master branch, and the error disappears… which is great and I get a new one ☝ !

```julia
[85%] Linking CXX shared library ../../lib/libLLVM-9jl.so
/usr/lib/gcc/armv7-alpine-linux-musleabihf/9.3.0/../../../../armv7-alpine-linux-musleabihf/bin/ld: ../../lib/libLLVMVectorize.a: member ../../lib/libLLVMVectorize.a(LoopVectorize.cpp.o) in archive is not an object
collect2: error: ld returned 1 exit status
make[4]: *** [tools/llvm-shlib/CMakeFiles/LLVM.dir/build.make:220: lib/libLLVM-9jl.so] Error 1
make[3]: *** [CMakeFiles/Makefile2:18887: tools/llvm-shlib/CMakeFiles/LLVM.dir/all] Error 2
make[3]: *** Waiting for unfinished jobs....
[85%] Built target llvm-exegesis
make[2]: *** [Makefile:172: all] Error 2
make[1]: *** [/home/pi/work/julia/deps/llvm.mk:4

```

Again, any clue on this would be greatly appreciated !
