age
age copied to clipboard
ERROR: too few arguments to function call(queryEnv, dest, completionTag) expected 8, have 7 at line src/backend/catalog/ag_catalog.c:98:68
I'm getting the following errors when I run:
make install

What version of Postgres and what branch of AGE are you using?
I'm currently using PostgreSQL 14 version and master branch
Currently we only support PG11 and PG12. We are working on other versions as well.
On Thu, Sep 15, 2022 at 4:39 PM Mohamed Awnallah @.***> wrote:
I'm currently using PostgreSQL 14 version and master branch
— Reply to this email directly, view it on GitHub https://github.com/apache/age/issues/300#issuecomment-1248276527, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKYCL37LJ6HQMCG5QED7VLV6M7KLANCNFSM6AAAAAAQNKBL64 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Okay, I've just migrated down to an older version of PostgreSQL server in my case 11.17 and still give me the same errors stated above after running make install
?
I'm currently using Mac arm 64 I don't know if it is applicable to run the project ?
Which branch are you using for PG11? For PG11 it needs to be the master branch. Whereas, for PG12 needs to be the ALPHA branch.
I'm using the master branch for my PostgreSQL version 11.17
From the error message, you are building AGE against an incompatible version of PostgreSQL. The message states that the function prototype is expecting 8, but got only 7 parameters. That means that you are building AGE for PG11 (which passes 7 for that function) against PG12 (which expects 8). I verified that PG11.17 expects only 7 parameters. You probably still have the build pointing to the PG12 source.
For anyone interested, I had luck cross-building a linux/arm64 version of apache/age on linux/amd64. It should be possible doing so in a macbook with arm-based m1/m2 chips.
I'm following instructions here: https://docs.docker.com/build/building/multi-platform/
No modification of the apache/age source code is required, just setup buildx & qemu stuff and then hit
docker buildx build --platform linux/arm64 -t apache/age-arm64 .
I had the same compilation error described by the original issue, I am using macOS, and thanks to jrgemignani's comment about the C function signature difference between Postgres 11 vs Postgres 12, I was able to solve my problem.
Problem
I unknowingly had a HomeBrew-installed Postgres 14 on my PATH. When I execute make install
in the Apache AGE project, the compiler would find Postgres 14 code. Postgres 14 is not supported.
Workaround
Follow the helpful installation instructions in the Apache AGE README that guide you to point to a specific Postgres installation location when you run make
. Specifically, run your make install
command like this:
make PG_CONFIG=/path/to/postgres/bin/pg_config install
In my case, I had built and installed Postgres 11 from source, which installed to /usr/local/pgsql
. So, I used
make PG_CONFIG=/usr/local/pgsql/bin/pg_config install
And the project compiled. ✅ .
I suggest anyone having issues share the output of their pg_config
command. For me, this command made it clear that my environment was still pointing to Postgres 14 (despite my best efforts to install Postgres 11).