Using a binary dependency statically linked to LLVM


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

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.


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.



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

isuru@isuru:~/projects/SymEngine.jl$ ldd /home/isuru/miniconda3_2/lib/ =>  (0x00007ffc143fe000) => /home/isuru/miniconda3_2/lib/./ (0x00007f4a56359000) => /home/isuru/miniconda3_2/lib/./ (0x00007f4a56141000) => /home/isuru/miniconda3_2/lib/./ (0x00007f4a55ee2000) => /lib/x86_64-linux-gnu/ (0x00007f4a55c9f000) => /lib/x86_64-linux-gnu/ (0x00007f4a55a9a000) => /lib/x86_64-linux-gnu/ (0x00007f4a5587d000) => /usr/lib/x86_64-linux-gnu/ (0x00007f4a554fb000) => /lib/x86_64-linux-gnu/ (0x00007f4a551f1000) => /lib/x86_64-linux-gnu/ (0x00007f4a54fdb000) => /lib/x86_64-linux-gnu/ (0x00007f4a54c12000)
        /lib64/ (0x00005593ddfbe000)