Closed gchallen closed 7 years ago
I tried this, and maybe we should document this somehow @marxriedl ?
Installing part (@gchallen I was missing "libclang-dev" at first, maybe that is what you are missing too?)
docker run -it --rm ubuntu:xenial bash
apt-get update
apt-get install llvm clang libclang-dev git wget
wget https://storage.googleapis.com/golang/go1.7.5.linux-amd64.tar.gz
tar xvfz go1.7.5.linux-amd64.tar.gz -C /usr/local
export PATH=/usr/local/go/bin:$PATH
export GOPATH=/root/go
Environment
go version
go version go1.7.5 linux/amd64
clang -v
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
llvm-config --libdir
/usr/lib/llvm-3.8/lib
ls -l /usr/lib/llvm-3.8/lib/libclang*so
lrwxrwxrwx 1 root root 15 Jul 12 2016 /usr/lib/llvm-3.8/lib/libclang-3.8.0.so -> libclang-3.8.so
lrwxrwxrwx 1 root root 40 Jul 12 2016 /usr/lib/llvm-3.8/lib/libclang-3.8.so -> ../../x86_64-linux-gnu/libclang-3.8.so.1
lrwxrwxrwx 1 root root 40 Jul 12 2016 /usr/lib/llvm-3.8/lib/libclang.so -> ../../x86_64-linux-gnu/libclang-3.8.so.1
Installing go-clang (I had to add at least CC)
CC=clang CXX=clang++ CGO_LDFLAGS="-L`llvm-config --libdir`" go get -u github.com/go-clang/v3.8/...
EDIT: So basically I think you are missing the libclang.so symlink which comes with the libclang-dev package if I am not mistaken.
Possibly. You automated most of the stuff for setting up versions, which is somewhat document-ish, e.g., https://github.com/go-clang/gen/blob/master/scripts/switch-clang-version.sh
I usually also forget how to set up versions until I look into the scripts :D
Doh—of course this works. And I feel like an idiot. Thanks for the help!
I'm sure I'm doing something incredibly braindead here, but would still appreciate some help. (I'm on xenial.)