Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initdb #1

Open
lordpretzel opened this issue May 8, 2017 · 3 comments
Open

Initdb #1

lordpretzel opened this issue May 8, 2017 · 3 comments

Comments

@lordpretzel
Copy link
Contributor

fails with wrong number of index expressions

perm-installdir/bin/initdb -D ./perm-cluster/
The files belonging to this database system will be owned by user "ubuntu".
This user must also own the server process.

The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
The default text search configuration will be set to "english".

fixing permissions on existing directory ./perm-cluster ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 32MB/204800
creating configuration files ... ok
creating template1 database in ./perm-cluster/base/1 ... ok
initializing pg_authid ... FATAL:  wrong number of index expressions
STATEMENT:  CREATE TRIGGER pg_sync_pg_database   AFTER INSERT OR UPDATE OR DELETE ON pg_database   FOR EACH STATEMENT EXECUTE PROCEDURE flatfile_update_trigger();

child process exited with exit code 1
initdb: removing contents of data directory "./perm-cluster"
@lordpretzel
Copy link
Contributor Author

./configure --with-libxml --with-libxslt --enable-cassert --enable-debug --prefix=/home/ubuntu/perm-installdir/

@lordpretzel
Copy link
Contributor Author

lordpretzel commented May 8, 2017

it is a compiler bug in newer gcc versions that optimizes loops which clashes with postgres way of defining variable length structs. See here:

http://stackoverflow.com/questions/25583549/initdb-initializing-pg-authid-fatal-wrong-number-of-index-expressions

workaround:

CFLAGS='-O1'

@HoussemBL
Copy link

I faced a similar problem with the new gcc version in ubuntu 17.
To solve the problem, install an older version of gcc using the following commands:
sudo apt-get install gcc-4.7
make clean;

After that, access to repository where you have installed PERM and tape the following command:
./configure CC='gcc-4.7 -m64' --with-libxml --with-libxslt --enable-cassert --enable-debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants