# Using a binary dependency statically linked to LLVM

**URL:** <https://discourse.julialang.org/t/using-a-binary-dependency-statically-linked-to-llvm/3627>\
**Category:** General Usage\
**Created:** [May 10, 2017, 8:59am UTC](https://discourse.julialang.org/t/using-a-binary-dependency-statically-linked-to-llvm/3627 "2017-05-10T08:59:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![isuruf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/isuruf/32/106_2.png) [@isuruf](https://discourse.julialang.org/u/isuruf)\
**Post date:** [May 10, 2017, 8:59am UTC](https://discourse.julialang.org/t/using-a-binary-dependency-statically-linked-to-llvm/3627/1 "2017-05-10T08:59:42Z")

</div>

I’m trying to use a C library that is linked to LLVM static libraries in Julia. I’m using BinDeps and Conda to download the C library, but I get the following error when building the Julia package

```julia
julia> Pkg.build("SymEngine")
INFO: Building Conda
INFO: Building SymEngine
: CommandLine Error: Option 'debug-pass' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

```

If I use the C library without LLVM support it works fine. (LLVM is an optional dependency of the C library, so I can remove the LLVM dependency. I’m not using any functionality that needs LLVM from the C library, so my current workaround is to use a binary of the C library that is compiled without LLVM support)

Is there anything that I can change in the C library so that it doesn’t affect Julia? Any suggestions welcome.

---

<div class="post-metadata">

**Author:** ![vchuravy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vchuravy/32/8_2.png) [@vchuravy](https://discourse.julialang.org/u/vchuravy)\
**Post date:** [May 10, 2017, 10:42am UTC](https://discourse.julialang.org/t/using-a-binary-dependency-statically-linked-to-llvm/3627/2 "2017-05-10T10:42:02Z")

</div>

Are you sure that llvm is linked **statically**? This error normally appears when LLVM is linked dynamically and then collides with the LLVM julia uses.

Links:

- [https://github.com/JuliaLang/julia/issues/19606](https://github.com/JuliaLang/julia/issues/19606)
- [https://github.com/JuliaLang/julia/issues/12644](https://github.com/JuliaLang/julia/issues/12644)

---

<div class="post-metadata">

**Author:** ![isuruf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/isuruf/32/106_2.png) [@isuruf](https://discourse.julialang.org/u/isuruf)\
**Post date:** [May 10, 2017, 11:01am UTC](https://discourse.julialang.org/t/using-a-binary-dependency-statically-linked-to-llvm/3627/3 "2017-05-10T11:01:03Z")

</div>

Yes, I’m sure. LLVM installation had only static libraries and `ldd` on the C library doesn’t show any LLVM libraries.

```shell
isuru@isuru:~/projects/SymEngine.jl$ ldd /home/isuru/miniconda3_2/lib/libsymengine.so
        linux-vdso.so.1 => (0x00007ffc143fe000)
        libgmp.so.10 => /home/isuru/miniconda3_2/lib/./libgmp.so.10 (0x00007f4a56359000)
        libmpc.so.3 => /home/isuru/miniconda3_2/lib/./libmpc.so.3 (0x00007f4a56141000)
        libmpfr.so.4 => /home/isuru/miniconda3_2/lib/./libmpfr.so.4 (0x00007f4a55ee2000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f4a55c9f000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4a55a9a000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4a5587d000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f4a554fb000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4a551f1000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4a54fdb000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4a54c12000)
        /lib64/ld-linux-x86-64.so.2 (0x00005593ddfbe000)

```
