skip to Main Content

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

6

Answers


  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.

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
  3. Try to install apache age with postgresql 11
    and use these flags for configuration:

    ./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-glldb -ggdb -Og -g3 -fno-omit-frame-pointer"
    

    This video is the good source to install apache age on macOS.

    Login or Signup to reply.
  4. 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.

    Login or Signup to reply.
  5. I faced the exact same situation while being on Linux where the ‘pg_config’ file was in subdirectory ‘pg_config’ of directory ‘src/bin’. This issue will be resolved if you install the postgresql server-side development files using the command :

    sudo apt install postgresql-server-dev-all
    

    Then download the tar file to install postgres which will be extracted to your current directory. (Note install postgres 11 instead of 12)

    wget https://ftp.postgresql.org/pub/source/v11.18/postgresql-11.18.tar.gz && tar -xvf postgresql-11.18.tar.gz && rm -f postgresql-11.18.tar.gz
    

    After this, install psql using the ./configure command, I would recommend enabling the debugging flag. To read more on the flags, read the Doc. pwd will install postgres in the current directory. You might need to look for the exact ./configure command for macOS.

        cd postgresql-11.18
        ./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"
        make install
        cd ../../
    

    This should install postgreSQL to your system.

    I hope it helps.

    References
    Blog

    Login or Signup to reply.
  6. 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
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search