-2

I am trying to install AGE on my system running macOS 12.6.3 using this guide. I am getting an error on the step I try to make PG_CONFIG=/path/to/postgres/bin/pg_config install and am unsure how to get it fixed.

Here are the series of Terminal lines:

kenwoon@Kens-MacBook-Pro age-1.1.0-rc0 % make PG_CONFIG=/Users/kenwoon/Downloads/postgresql-12.14/src/bin/pg_config/pg_config install

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -I.//src/include -I.//src/include/parser -I. -I./ -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk    -c -o src/backend/age.o src/backend/age.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -I.//src/include -I.//src/include/parser -I. -I./ -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk    -c -o src/backend/catalog/ag_catalog.o src/backend/catalog/ag_catalog.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -O2  -I.//src/include -I.//src/include/parser -I. -I./ -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk    -c -o src/backend/catalog/ag_graph.o src/backend/catalog/ag_graph.c
src/backend/catalog/ag_graph.c:67:15: error: assigning to 'Oid' (aka 'unsigned int') from incompatible type 'void'
    graph_oid = CatalogTupleInsert(ag_graph, tuple);
              ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [src/backend/catalog/ag_graph.o] Error 1
Ken W.
  • 397
  • 1
  • 13

4 Answers4

1

Follow below steps to install age correctly on macbook pro m1 or any other mac:

  1. Create a folder where you want to store all source code. In this folder, you need 3 source code such as: (i) postgresql version 11/12 source code (ii) age source code
  2. (i) download postgresql from this link and store it on that folder.
  3. (ii) download age from this link and store on that folder
  4. goto postgresql folder & open terminal on it & run command like as:
  1. ./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-glldb -ggdb -Og -g3 -fno-omit-frame-pointer"
  2. make install

those two commend install postgresql.

  1. after that goto age folder & open terminal on it & run command like as:
  1. sudo make PG_CONFIG=~/Your_base_folder_path/postgresql/bin/pg_config install
  2. make PG_CONFIG=~/Your_base_folder_path/postgresql/bin/pg_config installcheck
  1. goto postgresql folder & open terminal on it & run command like as:

bin/initdb demo

  1. goto demo folder inside postgresql folder and open postgresql.conf file & we need add three words here such as:
  1. port = 5432 /remove # from port number/
  2. #search_path = 'ag_catalog,"$user", public' // addding 'ag_catalog' to this path
  3. #shared_preload_libraries = 'age' //add age in inverted commas.
  1. Now start the server and make a database named demodb

bin/pg_ctl -D demo -l logfile start
bin/createdb demodb

  1. AGE added to pg successfully. Now we can enter in to pg_sql console to start testing.

bin/psql demodb

thats the process.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Maruf31
  • 17
  • 8
1

In order to install the extension for PostgreSQL 12 you will need to checkout branch AGE_PG12.1.0_ALPHA and then run the installer

marodin
  • 41
  • 2
1

The issue is with the master branch of age, I think some development code was merged by mistake. To be absolutely sure that you are trying to install working age extension, use the release source code.

Sarthak
  • 380
  • 7
0

First create a dir

mkdir apache_age
cd apache_age

Download PostgreSQL 12.0

curl -O https://ftp.postgresql.org/pub/source/v12.0/postgresql-12.0.tar.gz && tar -xvf postgresql-12.0.tar.gz && rm -f postgresql-12.0.tar.gz

Install some dependencies

brew install build-essential libreadline zlib flex bison

after that run these commands

cd postgresql-12.0

configure

./configure

now install

make install

go back

cd ../../

Now clone the age repo

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

Now configure apache_age

cd age/
sudo make PG_CONFIG=/Users/moiz/Apache_age/postgres/postgresql-12.0/bin/pg_config install;
make PG_CONFIG=/Users/moiz/Apache_age/postgres/postgresql-12.0/bin/pg_config installcheck;

Database initialization: Now we will initialize our database cluster.

cd postgresql-12.0
which psql
ls /usr/local/pgsql/bin/

set the path

export PATH=/usr/local/pgsql/bin/:$PATH
export PGDATA=/usr/local/pgsql/bin/data
sudo chown -R moiz /usr/local/pgsql/
initdb

Now start postgres

pg_ctl start -l log

psql postgres