-1

I was installing Apache AGE using this guide https://age.apache.org/age-manual/master/intro/setup.html and have used sudo apt install postgresql-12 to install postgresql, but doing make install in the age git directory is fetching me the following error:

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -ggdb -Og -fno-omit-frame-pointer -fPIC -I.//src/include -I.//src/include/parser -I. -I./ -I/usr/include/postgresql/server -I/usr/include/postgresql/internal  -D_GNU_SOURCE   -c -o src/backend/catalog/ag_graph.o src/backend/catalog/ag_graph.c
src/backend/catalog/ag_graph.c: In function ‘insert_graph’:
src/backend/catalog/ag_graph.c:67:15: error: void value not ignored as it ought to be
   67 |     graph_oid = CatalogTupleInsert(ag_graph, tuple);
      |               ^
make: *** [<builtin>: src/backend/catalog/ag_graph.o] Error 1

My pg_config path is usr/include/postgresql/pg_config.h and earlier I was having the following error:

de/postgresql/internal  -D_GNU_SOURCE   -c -o src/backend/age.o src/backend/age.c
src/backend/age.c:20:10: fatal error: postgres.h: No such file or directory
   20 | #include "postgres.h"
      |          ^~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: src/backend/age.o] Error 1

which I corrected by changing the path of server from usr/include/postgresql/12/server/ to usr/include/postgresql/server as pg_config has that path as described by this How to fix 'postgres.h' file not found problem?.

I think that maybe my postgresql is not compatible with age as the CatalogTupleInsert is defined in postgres so maybe that is returning void instead of graph_oid. I have tried source code installation and it is working but I was not able to figure out why this error was there.

I am using WSL2 with Ubuntu 20.04.2 LTS and the postgresql version was 12.13

4 Answers4

0

I guess you're trying to install AGE from source code? If so, the master branch of AGE is compatible only with PostgreSQL version 12, you may need to change the branch before the make command.

Do this in the folder you wish to install Apache AGE:

git clone https://github.com/apache/age.git
git checkout AGE_PG12.1.0_ALPHA
make && make install
make installcheck

It will create a folder named "age" with the source code compatible with PG12, compile and run the tests.

Marco Souza
  • 296
  • 7
0

I was having similar problems following the installation via package management. I managed to solve this by following these steps:

  1. Make sure you use the latest AGE release compatible with PostgreSQL 12: https://github.com/apache/age/releases/tag/PG12/v1.1.1-rc1.

  2. Make sure you installed the postgresql-server-dev-12 package. This package contains some files that may be missing to install AGE.

  3. As stated in the documentation, if the path to your Postgres installation is not in the PATH variable, add the path in the arguments:

make PG_CONFIG=/path/to/postgres/bin/pg_config install

Maybe PG_CONFIG is set to the wrong directory.

Carla
  • 326
  • 1
  • 7
0

Trying installing postgresql-server-dev-12 to include the definition of the postgres.h header, and also make sure while running make install you switch to the right branch for the Postgres version you are trying to install i.e age version compatible with postgres-12

Peter
  • 43
  • 4
0

This is how i successfully did it.

Follow this. Ask if you have any question.

You should install Apache Age version Compatible with your postgres version

1.Check your postgres version installed. The 'V' is CAPITAL

psql -V

2.Clone Age Source code from Github.

git clone https://github.com/apache/age.git

3.CD into Age directory

cd age

4.Checkout to the branch of Age source corresponding to you postgres version. i.e if 12 checkout to 'PG12'

git checkout PG12

Note: There are three checkout option, make sure you spell them right. They include 'PG11' 'PG12' 'PG13' Otherwise the checkout will be invalid.

5.Install with administrative privileges using sudo

sudo make install

6.Confirm install

make installcheck

This should work