How to get on Ubuntu 18.04 required by Cxx package?

With Julia 1.5.0-beta1 on Ubuntu 18.04.4 I’m getting:

(@v1.5) pkg> build Cxx
   Building Cxx → `~/.julia/packages/Cxx/1RaOv/deps/build.log`
┌ Error: Error building `Cxx`: 
│ ERROR: LoadError: could not load library "libLLVM-9.0.1"
│ cannot open shared object file: No such file or directory

Ubuntu 18.04 package manager doesn’t provide libLLVM-9.0.1, libLLVM-9 is the newest available. What is the solution?

I’m not sure if this helps, but did you try to install them by

sudo apt install llvm-9 llvm-9-dev

They should be available according to: but maybe you still need to wait for:

1 Like

I have installed, but Cxx requires

Should I just abandon Ubuntu and install Manjaro, which has llvm toolchain 9.0.1 available? :wink:

BTW, I have the same problem with Julia 1.4.2, which requires for Cxx package. Unobtanium for Ubuntu 18.04.4.

Or just upgrade to Ubuntu 20.04 LTS, which has LLVM up to version 10?

I noticed that. Unfortunately, I’m tied up to ROS Melodic, which is not available for Ubuntu 20.04. Constraint satisfaction failed! :unamused:

I am not a user of ROS, but if I understand correctly you can just compile whatever version you need from sources:

so you may get Melodic working on 20.04. YMMV.

Theoretically yes, but it is huge collection of modules and I’ve heard many horror stories about building ROS from source gone wrong. I also have other dependencies. I’m trying to find an easy way before I do something more dramatic. I’m tempted to give Manjaro a try. Ubuntu restrictions on available package versions are pretty annoying.

I’m having the same problem with Julia docker image:

paul@desktop:~$ docker run -it --rm julia
(@v1.4) pkg> add Cxx
   Building Cxx → `~/.julia/packages/Cxx/1RaOv/deps/build.log`
┌ Error: Error building `Cxx`: 
│ ERROR: LoadError: could not load library "libLLVM-8.0.1"

Any suggestions for this environment?

I believe there is something wrong in Cxx.jl, you shouldn’t install libLLVM, it comes bundled with Julia. @Gnimuc

1 Like

Ok, Cxx.jl only works for Julia up to v1.3:

1 Like

Out of curiosity I tried julia:1.0 docker image and no cigar either:

paul@desktop:~$ docker run -it --rm julia:1.0
   _       _ _(_)_     |  Documentation:
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.5 (2019-09-09)
 _/ |\__'_|_|_|\__'_|  |  Official release
|__/                   |

(v1.0) pkg> add Cxx
   Cloning default registries into /root/.julia/registries
   Cloning registry General from ""
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Cxx [a0b5b9ef]:
 Cxx [a0b5b9ef] log:
 ├─possible versions are: [0.3.0-0.3.4, 0.4.0] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.3.0-0.3.4, 0.4.0]
 └─restricted by julia compatibility requirements to versions: uninstalled — no versions left

There was never any version of Cxx that supported Julia 1.0. You would have better chances with 1.1-1.3.

I was looking for version 1.3, but official Julia docker images give me only 1.0.5 or 1.4.2 options and nothing in between.

I just did that. The same problem on Ubuntu 20.04.1, unfortunately. Installing llvm-9 and llvm-9-dev does not help. What kind of Linux is actually compatible with Cxx? Is the difference between LLVM 9.0 and 9.0.1 so ground-breaking to justify incompatibility with the most popular Linux distribution?

The problem is actually Julia’s version. Cxx.jl only works for Julia up to v1.3, at least for now. I tried to make it work on v1.4/v1.5 but failed.