Open workingjubilee opened 3 weeks ago
I had the same issue for 0.12.1
and pg15.
@burmecia This won't be resolved unless it becomes reproducible.
To be clear, I don't really know how to resolve this because it's deeply dependent on your installation particulars. It took me a week at least of full-time work to run down things to make the build even as resilient as it is now. There's no way I'm going to manage without a reproducer.
The issue is probably that you have too many clangs installed and should uninstall all of them except one.
I didn't install multiple clangs and I can reproduce it on Arm64 platform with Ubuntu 20.04 LTS. I tested on both of my local Mac M1 (with Multipass) and Google Cloud. Here are the steps I've used:
Arch: Arm64 OS: Ubuntu 20.04 LTS vCPU: 4 Mem: 16G Storage: 60G
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
$ uname -a
Linux bo-test 5.15.0-1066-gcp #74~20.04.1-Ubuntu SMP Fri Jul 26 09:28:24 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
# install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
# install clang
sudo apt-get update
sudo apt-get install libclang-dev
# install dependencies
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc ccache pkg-config
# install pgrx and pg15
cargo install --force --locked cargo-pgrx --version 0.12.1
cargo pgrx init --pg15 download
# start a new project
cargo pgrx new my_extension
cd my_extension/
# run the project
cargo pgrx run --features pg15
and error is like below:
"I didn't install"... note the verb use there... "multiple clangs" does not mean there are not multiple clangs on your system, i.e. that multiple clangs could have been installed. This is in fact the most likely result if someone else first installed clang on that image.
Though I see you're also using Ubuntu 20.04, and also the libclang from libclangs less than 10 seems to have mysteriously regressed. Possibly one of the bindings we now include was not correctly parsed by earlier clangs.
multiple errors like this