age icon indicating copy to clipboard operation
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

Open mohamedawnallah opened this issue 2 years ago • 8 comments

I'm getting the following errors when I run: make install

Screen Shot 2022-09-15 at 1 44 07 PM

mohamedawnallah avatar Sep 15 '22 11:09 mohamedawnallah

What version of Postgres and what branch of AGE are you using?

JoshInnis avatar Sep 15 '22 14:09 JoshInnis

I'm currently using PostgreSQL 14 version and master branch

mohamedawnallah avatar Sep 15 '22 15:09 mohamedawnallah

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: @.***>

muhammadshoaib avatar Sep 15 '22 15:09 muhammadshoaib

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?

mohamedawnallah avatar Sep 15 '22 17:09 mohamedawnallah

I'm currently using Mac arm 64 I don't know if it is applicable to run the project ?

mohamedawnallah avatar Sep 15 '22 17:09 mohamedawnallah

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.

jrgemignani avatar Sep 15 '22 19:09 jrgemignani

I'm using the master branch for my PostgreSQL version 11.17

mohamedawnallah avatar Sep 15 '22 20:09 mohamedawnallah

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.

jrgemignani avatar Sep 15 '22 22:09 jrgemignani

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 .

sep2 avatar Nov 22 '22 16:11 sep2

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).

dgroomes avatar Jan 08 '23 04:01 dgroomes