Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error for PRO-versions #1997

Closed
if0ne opened this issue Mar 10, 2025 · 2 comments
Closed

Build error for PRO-versions #1997

if0ne opened this issue Mar 10, 2025 · 2 comments

Comments

@if0ne
Copy link

if0ne commented Mar 10, 2025

Hello there. There are errors when building for pro versions

Env:
OS: RedOS
pgrx: 0.13.1
rustc: rustc 1.85.0

PostgresPro 13

   Compiling nuid v0.5.0
   Compiling seahash v4.1.0
   Compiling async-nats v0.38.0
error[E0308]: mismatched types
   --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pgrx-pg-sys-0.13.1/src/submodules/htup.rs:128:9
    |
121 | pub unsafe fn HeapTupleHeaderGetRawXmin(tup: *const HeapTupleHeaderData) -> TransactionId {
    |                                                                             ------------- expected `u64` because of return type
...
128 |         (*tup).t_choice.t_heap.t_xmin
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `u32`
    |
help: you can convert a `u32` to a `u64`
    |
128 |         (*tup).t_choice.t_heap.t_xmin.into()
    |                                      +++++++
For more information about this error, try `rustc --explain E0308`.
warning: [email protected]: In file included from /opt/pgpro/ent-13/include/server/access/xlogreader.h:39,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/access/multixact.h:15,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/access/htup_details.h:19,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/tuptable.h:19,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/access/tupconvert.h:20,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/nodes/execnodes.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/execdesc.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/executor.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/funcapi.h:21,
warning: [email protected]:                  from /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pgrx-pg-sys-0.13.1/include/pg13.h:14,
warning: [email protected]:                  from /builds/devops/pgsql-nats/BUILD/pgsql13-nats-0.12.9/target/release/build/pgrx-pg-sys-2af4b1241d2dfd2f/out/pgrx-cshim-static.c:1,
warning: [email protected]:                  from /builds/devops/pgsql-nats/BUILD/pgsql13-nats-0.12.9/target/release/build/pgrx-pg-sys-2af4b1241d2dfd2f/out/pgrx-cshim.c:11:
warning: [email protected]: /opt/pgpro/ent-13/include/server/access/transam.h: In function 'IsAbnormalShmemVariableCacheNextXidAdvance':
warning: [email protected]: /opt/pgpro/ent-13/include/server/access/transam.h:394:67: warning: comparison of integer expressions of different signedness: 'uint64' {aka 'long unsigned int'} and 'int64' {aka 'long int'} [-Wsign-compare]
warning: [email protected]:   394 |                                         FXID_DISTANCE(next, prev) > log_next_xid_assign_threshold;
warning: [email protected]:       |                                                                   ^
warning: [email protected]: In file included from /opt/pgpro/ent-13/include/server/access/htup_details.h:23,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/tuptable.h:19,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/access/tupconvert.h:20,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/nodes/execnodes.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/execdesc.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/executor.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/funcapi.h:21,
warning: [email protected]:                  from /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pgrx-pg-sys-0.13.1/include/pg13.h:14,
warning: [email protected]:                  from /builds/devops/pgsql-nats/BUILD/pgsql13-nats-0.12.9/target/release/build/pgrx-pg-sys-2af4b1241d2dfd2f/out/pgrx-cshim-static.c:1,
warning: [email protected]:                  from /builds/devops/pgsql-nats/BUILD/pgsql13-nats-0.12.9/target/release/build/pgrx-pg-sys-2af4b1241d2dfd2f/out/pgrx-cshim.c:11:
warning: [email protected]: /opt/pgpro/ent-13/include/server/storage/bufpage.h: In function 'PageValidateSpecialPointer':
warning: [email protected]: /opt/pgpro/ent-13/include/server/storage/bufpage.h:532:33: warning: unused parameter 'page' [-Wunused-parameter]
warning: [email protected]:   532 | PageValidateSpecialPointer(Page page)
warning: [email protected]:       |                            ~~~~~^~~~
warning: [email protected]: In file included from /opt/pgpro/ent-13/include/server/storage/smgr.h:17,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/storage/bufmgr.h:22,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/access/htup_details.h:24,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/tuptable.h:19,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/access/tupconvert.h:20,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/nodes/execnodes.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/execdesc.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/executor.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/funcapi.h:21,
warning: [email protected]:                  from /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pgrx-pg-sys-0.13.1/include/pg13.h:14,
warning: [email protected]:                  from /builds/devops/pgsql-nats/BUILD/pgsql13-nats-0.12.9/target/release/build/pgrx-pg-sys-2af4b1241d2dfd2f/out/pgrx-cshim-static.c:1,
warning: [email protected]:                  from /builds/devops/pgsql-nats/BUILD/pgsql13-nats-0.12.9/target/release/build/pgrx-pg-sys-2af4b1241d2dfd2f/out/pgrx-cshim.c:11:
warning: [email protected]: /opt/pgpro/ent-13/include/server/lib/ilist.h: In function 'dlist_next_node':
warning: [email protected]: /opt/pgpro/ent-13/include/server/lib/ilist.h:421:29: warning: unused parameter 'head' [-Wunused-parameter]
warning: [email protected]:   421 | dlist_next_node(dlist_head *head, dlist_node *node)
warning: [email protected]:       |                 ~~~~~~~~~~~~^~~~
warning: [email protected]: /opt/pgpro/ent-13/include/server/lib/ilist.h: In function 'dlist_prev_node':
warning: [email protected]: /opt/pgpro/ent-13/include/server/lib/ilist.h:431:29: warning: unused parameter 'head' [-Wunused-parameter]
warning: [email protected]:   431 | dlist_prev_node(dlist_head *head, dlist_node *node)
warning: [email protected]:       |                 ~~~~~~~~~~~~^~~~
warning: [email protected]: /opt/pgpro/ent-13/include/server/lib/ilist.h: In function 'slist_next_node':
warning: [email protected]: /opt/pgpro/ent-13/include/server/lib/ilist.h:622:29: warning: unused parameter 'head' [-Wunused-parameter]
warning: [email protected]:   622 | slist_next_node(slist_head *head, slist_node *node)
warning: [email protected]:       |                 ~~~~~~~~~~~~^~~~
warning: [email protected]: In file included from /opt/pgpro/ent-13/include/server/executor/tuptable.h:19,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/access/tupconvert.h:20,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/nodes/execnodes.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/execdesc.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/executor/executor.h:18,
warning: [email protected]:                  from /opt/pgpro/ent-13/include/server/funcapi.h:21,
warning: [email protected]:                  from /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pgrx-pg-sys-0.13.1/include/pg13.h:14,
warning: [email protected]:                  from /builds/devops/pgsql-nats/BUILD/pgsql13-nats-0.12.9/target/release/build/pgrx-pg-sys-2af4b1241d2dfd2f/out/pgrx-cshim-static.c:1,
warning: [email protected]:                  from /builds/devops/pgsql-nats/BUILD/pgsql13-nats-0.12.9/target/release/build/pgrx-pg-sys-2af4b1241d2dfd2f/out/pgrx-cshim.c:11:
warning: [email protected]: /opt/pgpro/ent-13/include/server/access/htup_details.h: In function 'HeapTupleCopyXidsFromPage':
warning: [email protected]: /opt/pgpro/ent-13/include/server/access/htup_details.h:928:34: warning: unused parameter 'buffer' [-Wunused-parameter]
warning: [email protected]:   928 | HeapTupleCopyXidsFromPage(Buffer buffer, HeapTuple tup, Page page)
warning: [email protected]:       |                           ~~~~~~~^~~~~~
error: could not compile `pgrx-pg-sys` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: Bad exit status from /var/tmp/rpm-tmp.HPs277 (%install)
    Bad exit status from /var/tmp/rpm-tmp.HPs277 (%install)

PostgresPro 15

error[E0080]: evaluation of constant value failed
   --> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pgrx-0.13.1/src/lib.rs:167:5
    |
167 | /     assert!(
168 | |         same_cstr(pg_sys::FMGR_ABI_EXTRA, c"PostgreSQL"),
169 | |         "Unsupported Postgres ABI. Perhaps you need `--features unsafe-postgres`?",
170 | |     );
    | |_____^ the evaluated program panicked at 'Unsupported Postgres ABI. Perhaps you need `--features unsafe-postgres`?', /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/pgrx-0.13.1/src/lib.rs:167:5
    |
    = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0080`.
error: could not compile `pgrx` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
@if0ne
Copy link
Author

if0ne commented Mar 10, 2025

The problem with version 15 is clear, most likely there is a different value in FMGR_ABI_EXTRA there.

@eeeebbbbrrrr
Copy link
Contributor

This project and its maintainers only support, to the best of our abilities, the official Postgres versions.

While we do have a knob or two for Postgres forks in general, it is their obligation and responsibility to provide us with patches to support their forks along with the necessary testing resources and on-going support, which should include financial support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants