eulerto / pgquarrel

pgquarrel compares PostgreSQL database schemas (DDL)
BSD 3-Clause "New" or "Revised" License
388 stars 42 forks source link

Installation Issues #25

Closed John-Solomon closed 7 years ago

John-Solomon commented 7 years ago

Hi Euler,

We are working on installation of pgquarrel on postgresql-9.5 using rpm installation(Centos7) .

We exported include directory, pg_config, LD_LIBRARY_PATH etc.

We are getting a fatal error(i.e <c.h> no such a directory or file) while running command "make" . There are all the required devel packages are installed on Machine.

Please let us know what is the best procedure to install pgquarrel on postgres(which is installed using rpms or yum).

Just to let you know, we were able to install pgquarrel on SOURCES installed postgresql95.

Thanks, John

eulerto commented 7 years ago

@John-Solomon In the official repository, postgresql-devel contains c.h. If you are using PGDG repository, install postgresql95-devel.

John-Solomon commented 7 years ago

Hi Euler,

Please see below.

[root@localhost pgquarrel-pgquarrel_0_2_0]# yum list installed|grep postgres postgresql.x86_64 9.2.18-1.el7 @base postgresql-devel.x86_64 9.2.18-1.el7 @base postgresql-libs.x86_64 9.2.18-1.el7 @base postgresql95.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql95-contrib.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql95-debuginfo.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql95-devel.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql95-docs.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql95-libs.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql95-odbc.x86_64 09.05.0400-1PGDG.rhel7 @pgdg95 postgresql95-odbc-debuginfo.x86_64 09.03.0400-1PGDG.rhel7 @pgdg95 postgresql95-pglogical.x86_64 1.2.1-1_2ndQuadrant.el7.centos @pglogical postgresql95-plperl.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql95-plpython.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql95-pltcl.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql95-python.x86_64 4.2-1PGDG.rhel7 @pgdg95 postgresql95-python-debuginfo.x86_64 4.2-1PGDG.rhel7 @pgdg95 postgresql95-server.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql95-tcl.x86_64 2.0.0-1.rhel7 @pgdg95 postgresql95-tcl-debuginfo.x86_64 2.0.0-1.rhel7 @pgdg95 postgresql95-test.x86_64 9.5.5-1PGDG.rhel7 @pgdg95 postgresql96.x86_64 9.6.1-1PGDG.rhel7 @pgdg96 postgresql96-contrib.x86_64 9.6.1-1PGDG.rhel7 @pgdg96 postgresql96-debuginfo.x86_64 9.6.1-1PGDG.rhel7 @pgdg96 postgresql96-devel.x86_64 9.6.1-1PGDG.rhel7 @pgdg96 postgresql96-docs.x86_64 9.6.1-1PGDG.rhel7 @pgdg96 postgresql96-libs.x86_64 9.6.1-1PGDG.rhel7 @pgdg96 postgresql96-odbc.x86_64 09.05.0400-1PGDG.rhel7 @pgdg96 postgresql96-plperl.x86_64 9.6.1-1PGDG.rhel7 @pgdg96 postgresql96-plpython.x86_64 9.6.1-1PGDG.rhel7 @pgdg96 postgresql96-pltcl.x86_64 9.6.1-1PGDG.rhel7 @pgdg96 postgresql96-server.x86_64 9.6.1-1PGDG.rhel7 @pgdg96 postgresql96-tcl.x86_64 2.1.1-1.rhel7 @pgdg96 postgresql96-tcl-debuginfo.x86_64 2.1.1-1.rhel7 @pgdg96 postgresql96-test.x86_64 9.6.1-1PGDG.rhel7 @pgdg96

[root@localhost local]# cd pgquarrel-pgquarrel_0_2_0/ [root@localhost pgquarrel-pgquarrel_0_2_0]# cmake -DCMAKE_PREFIX_PATH=/usr/pgsql-9.6 . -- The C compiler identification is GNU 4.8.5 -- Check for working C compiler: /bin/cc -- Check for working C compiler: /bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Found PostgreSQL: /usr/pgsql-9.6/lib (found version "9.6.1") -- PostgreSQL include dirs: /usr/pgsql-9.6/include;/usr/pgsql-9.6/include/server -- PostgreSQL library dirs: /usr/pgsql-9.6/lib -- PostgreSQL libraries: pq -- Configuring done -- Generating done -- Build files have been written to: /usr/local/pgquarrel-pgquarrel_0_2_0 [root@localhost pgquarrel-pgquarrel_0_2_0]# ls CMakeCache.txt CMakeFiles cmake_install.cmake CMakeLists.txt Makefile mini README.md src test [root@localhost pgquarrel-pgquarrel_0_2_0]# vi README.md [root@localhost pgquarrel-pgquarrel_0_2_0]# make Scanning dependencies of target mini [ 3%] Building C object mini/CMakeFiles/mini.dir/mini-file.c.o [ 7%] Building C object mini/CMakeFiles/mini.dir/mini-parser.c.o [ 10%] Building C object mini/CMakeFiles/mini.dir/mini-readline.c.o [ 14%] Building C object mini/CMakeFiles/mini.dir/mini-strip.c.o Linking C shared library libmini.so [ 14%] Built target mini Scanning dependencies of target pgquarrel [ 17%] Building C object CMakeFiles/pgquarrel.dir/src/aggregate.c.o In file included from /usr/local/pgquarrel-pgquarrel_0_2_0/src/aggregate.h:4:0, from /usr/local/pgquarrel-pgquarrel_0_2_0/src/aggregate.c:1: /usr/local/pgquarrel-pgquarrel_0_2_0/src/common.h:9:41: fatal error: c.h: No such file or directory

include <c.h> / bool, true, false /

^ compilation terminated. make[2]: [CMakeFiles/pgquarrel.dir/src/aggregate.c.o] Error 1 make[1]: [CMakeFiles/pgquarrel.dir/all] Error 2 make: *** [all] Error 2

On Thu, Jan 12, 2017 at 9:27 PM, Euler Taveira de Oliveira < notifications@github.com> wrote:

@John-Solomon https://github.com/John-Solomon In the official repository, postgresql-devel contains c.h. If you are using PGDG repository, install postgresql95-devel.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eulerto/pgquarrel/issues/25#issuecomment-272201510, or mute the thread https://github.com/notifications/unsubscribe-auth/AX63vip5AWk4DArgf964cscloJBVax0Nks5rRk2FgaJpZM4Lh0uZ .

eulerto commented 7 years ago

@John-Solomon It is a bug. The temporary fix is trivial. Edit CMakeLists.txt and replace include_directories(${PostgreSQL_INCLUDE_DIR}/postgresql/server) with include_directories(${PostgreSQL_INCLUDE_DIR}/server)

I'll commit a permanent solution at master.

John-Solomon commented 7 years ago

It is working now.

Need your assistance in comparing two databases in different clusters. How do we do it. Do we need to create a configuration file ?

Thanks, John

On Fri, Jan 13, 2017 at 6:19 PM, Euler Taveira de Oliveira < notifications@github.com> wrote:

@John-Solomon https://github.com/John-Solomon It is a bug. The temporary fix is trivial. Edit CMakeLists.txt and replace include_directories(${PostgreSQL_INCLUDE_DIR}/postgresql/server) with include_directories(${PostgreSQL_INCLUDE_DIR}/server)

I'll commit a permanent solution at master.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eulerto/pgquarrel/issues/25#issuecomment-272436017, or mute the thread https://github.com/notifications/unsubscribe-auth/AX63vvBYn8t8Vy2g5C9YdoovGIckd6qqks5rR3L2gaJpZM4Lh0uZ .

eulerto commented 7 years ago

@John-Solomon See example at test/test.ini. Execute pgquarrel with the following command:

pgquarrel -c myconf.ini

John-Solomon commented 7 years ago

Thanks Euler.

I will try that at my end.

Cheers :)

John

On Mon, Jan 16, 2017 at 7:31 PM, Euler Taveira de Oliveira < notifications@github.com> wrote:

@John-Solomon https://github.com/John-Solomon See example at test/test.ini. Execute pgquarrel with the following command:

pgquarrel -c myconf.ini

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eulerto/pgquarrel/issues/25#issuecomment-272868826, or mute the thread https://github.com/notifications/unsubscribe-auth/AX63vm6k_OOQf-2wFCDY0oJPGK8phCTRks5rS3gwgaJpZM4Lh0uZ .