-1

I have been using Apache AGE with PostgreSQL version 11-17, installed postgres from source code, but I was informed that it is better to clone it directly. So then I followed these steps:

  1. Cloned with git clone https://git.postgresql.org/git/postgresql.git ;
  2. Changed the branch to origin/REL_12_STABLE ;
  3. Configured with ./configure -prefix=S(pwd) --enable-cassert -enable-debug CFLAGS="-glldb -Og -g3 -fno-omit-frame-pointer" ;
  4. Installed it with make install .

Then I went to where Apache AGE was installed and typed the command:

sudo make PG_CONFIG=/Users/.../postgresql/bin/pg_config install

and then I got a bunch of errors:

fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [src/backend/utils/adt/agtype.o] Error 1

I guess that this error occurs due to the fact that I changed to REL_12_STABLE and AGE works only with REL_12_ALPHA but with git branch -r it does not show the alpha version so I can change to it.

Am I following these steps correctly or am I missing something here? Is the REL_12_ALPHA only available from source code?

Matheus Farias
  • 716
  • 1
  • 10

7 Answers7

1

You should switch to the branch you want to install. For example if you need to install age version compatible with postgresql-12 you’ll need to switch branch right in the age directory like git checkout release/PG12/1.3.0, export your PG_CONFIG and run make install

Peter
  • 43
  • 4
0

You should use the branch "REL_12_STABLE" from PostgreSQL and the branch "AGE PG12.1.0 ALPHA" from Apache AGE.

Marco Souza
  • 296
  • 7
0

Try using version 11.18 of postgresql

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

and for AGE install int from the current repo git clone https://github.com/apache/age.git and for the age viewer make sure you have npm version

nvm install 14.16.0
0

install pg12 from git

git clone https://git.postgresql.org/git/postgresql.git
git checkout REL_12_STABLE

clone age repo

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

then checkout

git checkout AGE_PG12.1.0_ALPHA

then try sudo make PG_CONFIG command

0

As from the commands you shared you are using REL_12_STABLE branch of postgresql you should use the version of age that is compatible with REL_12_STABLE. For this first you can clone age repo using the command,

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

and then checkout to branch that is compatible with postgresql AGE PG12.1.0 ALPHA. And then run make install.

0

Clone the PostgreSQL repository:

git clone https://git.postgresql.org/git/postgresql.git

Checkout the stable branch for PostgreSQL 12:

git checkout REL_12_STABLE

Clone the age repository:

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

Checkout the AGE_PG12.1.0_ALPHA branch:

git checkout AGE_PG12.1.0_ALPHA

Run this command to compile and install PostgreSQL with specified PG_CONFIG:

sudo make PG_CONFIG
0

Alternatively, you can install postgres from source code like this,

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

Where v11.18 specifies the exact version you need. After which, you can enter into the newly installed postgres, run the build configurations and then make install.

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

make install

Then clone AGE directly like this, git clone https://github.com/apache/age.git.