tembo-io / prometheus_fdw

Postgres Foreign Data Wrapper for Prometheus Data
PostgreSQL License
44 stars 3 forks source link

error: failed to run custom build command for `pgrx-pg-sys v0.9.7` #8

Open digoal opened 9 months ago

digoal commented 9 months ago
error: failed to run custom build command for `pgrx-pg-sys v0.9.7`

Caused by:
  process didn't exit successfully: `/tmp/prometheus_fdw/target/debug/build/pgrx-pg-sys-b437121396c4d666/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=PGRX_BUILD_VERBOSE
  cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE
  cargo:rerun-if-env-changed=PGRX_PG_CONFIG_PATH
  cargo:rerun-if-env-changed=PGRX_PG_CONFIG_AS_ENV
  cargo:rerun-if-env-changed=LLVM_CONFIG_PATH
  cargo:rerun-if-env-changed=LIBCLANG_PATH
  cargo:rerun-if-env-changed=LIBCLANG_STATIC_PATH
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE
  cargo:rerun-if-changed=include
  cargo:rerun-if-changed=cshim
  cargo:rerun-if-changed=/root/.pgrx/config.toml
  cargo:rerun-if-env-changed=PGRX_PG_SYS_GENERATE_BINDINGS_FOR_RELEASE

  --- stderr
  build_paths=BuildPaths { manifest_dir: "/root/registry/src/mirrors.ustc.edu.cn-4affec411d11e50f/pgrx-pg-sys-0.9.7", out_dir: "/tmp/prometheus_fdw/target/debug/build/pgrx-pg-sys-d897dcb8beb50da3/out", src_dir: "/root/registry/src/mirrors.ustc.edu.cn-4affec411d11e50f/pgrx-pg-sys-0.9.7/src", shim_src: "/root/registry/src/mirrors.ustc.edu.cn-4affec411d11e50f/pgrx-pg-sys-0.9.7/cshim", shim_dst: "/tmp/prometheus_fdw/target/debug/build/pgrx-pg-sys-d897dcb8beb50da3/out/cshim" }
  Error: Multiple `pg$VERSION` features found, `--no-default-features` may be required.

  Location:
      /root/registry/src/mirrors.ustc.edu.cn-4affec411d11e50f/pgrx-pg-sys-0.9.7/build.rs:149:28
warning: build failed, waiting for other jobs to finish...
Jayko001 commented 9 months ago

It looks like you are having trouble building pgrx. Could you help me reproduce this error? It may be an issue with the way pgrx is setup. Maybe try the steps listed here - https://github.com/pgcentralfoundation/pgrx?tab=readme-ov-file#getting-started

lij55 commented 8 months ago

Hi @digoal

What's your postgres version ? I hit this isse when I try to build extension for an unsupported Postgres version (16 for example) of pgrx. 0.9.7 seem an old version.

bithead2k commented 3 months ago

I was able to get past this by installing clang, gcc and g++, along with libicu. I'm not sure which package of the 4 actually solved the problem, but one of them did.

ruslantalpa commented 2 months ago

i think the problem manifests itself when one has PG installed independently of pgrx (i had mine installed through brew). after i uninstalled PG versions i had and did a cargo pgrx init, things started compiling

ruslantalpa commented 2 months ago

small update, you don't need to uninstall your pg, just "package" it like this

cargo pgrx package --no-default-features --features pg16 -c ~/.pgrx/16.4/pgrx-install/bin/pg_config