# SpecialFunctions fails to build

**URL:** https://discourse.julialang.org/t/specialfunctions-fails-to-build/14199
**Category:** New to Julia
**Created:** [August 28, 2018, 4:58pm UTC](https://discourse.julialang.org/t/specialfunctions-fails-to-build/14199 "2018-08-28T16:58:00Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![stefanocampanella](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefanocampanella/32/3038_2.png) [@stefanocampanella](https://discourse.julialang.org/u/stefanocampanella)
#### Post date: [August 28, 2018, 4:58pm UTC](https://discourse.julialang.org/t/specialfunctions-fails-to-build/14199/1 "2018-08-28T16:58:00Z")

</div>

Hi everyone!

On my system (ArchLinux, my own build Julia 1.0) the package `SpecialFunctions` fails to build. The problem seems to be the creation of `libopenspecfun.a` and the relevant part of the build log is the following (note that `/usr/lib/julia/libLLVM-6.0.so` exists)

```julia
ar: /usr/lib/julia/libLLVM-6.0.so: version `LLVM_6.0' not found (required by /usr/bin/../bin/../lib/bfd-plugins/LLVMgold.so)

```

Is this behaviour related to something I did wrong in the build/installation process or is it an actual issue?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)
#### Post date: [August 28, 2018, 4:59pm UTC](https://discourse.julialang.org/t/specialfunctions-fails-to-build/14199/2 "2018-08-28T16:59:28Z")

</div>

Looks like your linker is trying to load LLVM for LTO, but finds julia’s LLVM copy instead.

---

<div class="post-metadata">

### Author: ![stefanocampanella](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefanocampanella/32/3038_2.png) [@stefanocampanella](https://discourse.julialang.org/u/stefanocampanella)
#### Post date: [August 28, 2018, 5:54pm UTC](https://discourse.julialang.org/t/specialfunctions-fails-to-build/14199/3 "2018-08-28T17:54:02Z")

</div>

Thanks for the hint! However, I am still confused (I am not familiar with several technical details):

1. I deduce that the problem is `ld` not `ar`; I was mislead by `ar: ...`
2. `ld` tries to load julia LLVM copy instead of system one (on ArchLinux, at the time of writing, shipped with the package `llvm-libs 6.0.1-4`), why is that an issue?
3. How can I force the linker to load the right version of LLVM?

---

<div class="post-metadata">

### Author: ![stefanocampanella](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefanocampanella/32/3038_2.png) [@stefanocampanella](https://discourse.julialang.org/u/stefanocampanella)
#### Post date: [August 29, 2018, 9:21am UTC](https://discourse.julialang.org/t/specialfunctions-fails-to-build/14199/4 "2018-08-29T09:21:38Z")

</div>

After some trial and error, I discovered that `SpecialFunctions` succeeds to build if I temporary uninstall `llvm-libs`. Is it possible that the problem is the other way around, that is, that Julia loads the system LLVM copy instead of its own?

---

<div class="post-metadata">

### Author: ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)
#### Post date: [August 29, 2018, 12:06pm UTC](https://discourse.julialang.org/t/specialfunctions-fails-to-build/14199/5 "2018-08-29T12:06:23Z")

</div>

I suspect removing the system llvm also removed the linker plugin, such that it didn’t attempt to LTO upon build.

---

<div class="post-metadata">

### Author: ![stefanocampanella](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefanocampanella/32/3038_2.png) [@stefanocampanella](https://discourse.julialang.org/u/stefanocampanella)
#### Post date: [August 29, 2018, 12:20pm UTC](https://discourse.julialang.org/t/specialfunctions-fails-to-build/14199/6 "2018-08-29T12:20:34Z")

</div>

Thanks for your help. Do you think I should open an issue on GitHub?

---

<div class="post-metadata">

### Author: ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)
#### Post date: [August 29, 2018, 12:40pm UTC](https://discourse.julialang.org/t/specialfunctions-fails-to-build/14199/7 "2018-08-29T12:40:08Z")

</div>

Only if this also happens with the official binaries. Since you installed it yourself, putting in a place where it interferes with the linker is on you ;).
