markwkm/pg_top

make fails with error libpq-fe.h

Closed this issue · 4 comments

Hi,
I have downloaded pg_top and ran the configure and then tried to run the "make", but it is failing with the below errors.

$ make
make all-am
make[1]: Entering directory /opt/postgres/pg_top-3.7.0' gcc -DHAVE_CONFIG_H -I. -I/usr/pgsql-9.6/include -Wall -g -MT color.o -MD -MP -MF .deps/color.Tpo -c -o color.o color.c In file included from machine.h:16, from display.h:7, from color.c:33: pg.h:6:22: error: libpq-fe.h: No such file or directory In file included from machine.h:16, from display.h:7, from color.c:33: pg.h:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token pg.h:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token pg.h:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token pg.h:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token make[1]: *** [color.o] Error 1 make[1]: Leaving directory /opt/postgres/pg_top-3.7.0'
make: *** [all] Error 2

I am running postgres on Red-hat linux with postgres 9.6

I appreciate your help.
Thanks!

The libpq-fe.h header file is part of the postgresql-devel package. Let us know if installing that clears it up.

HI, I face the problem too when i "make install"

[root@szypg pg_top-72088ce]# make install [ 7%] Building C object CMakeFiles/pg_top.dir/color.c.o In file included from /home/postgres/soft/pg_top-72088ce/machine.h:15, from /home/postgres/soft/pg_top-72088ce/display.h:7, from /home/postgres/soft/pg_top-72088ce/color.c:33: /home/postgres/soft/pg_top-72088ce/pg.h:6:22: error: libpq-fe.h: No such file or directory In file included from /home/postgres/soft/pg_top-72088ce/machine.h:15, from /home/postgres/soft/pg_top-72088ce/display.h:7, from /home/postgres/soft/pg_top-72088ce/color.c:33: /home/postgres/soft/pg_top-72088ce/pg.h:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token /home/postgres/soft/pg_top-72088ce/pg.h:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token /home/postgres/soft/pg_top-72088ce/pg.h:61: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token /home/postgres/soft/pg_top-72088ce/pg.h:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token make[2]: *** [CMakeFiles/pg_top.dir/color.c.o] Error 1 make[1]: *** [CMakeFiles/pg_top.dir/all] Error 2 make: *** [all] Error 2

my postgresql is also make install。 so how to let the pg_top know postgresql

mw2q commented

HI, I face the problem too when i "make install"

[root@szypg pg_top-72088ce]# make install [ 7%] Building C object CMakeFiles/pg_top.dir/color.c.o In file included from /home/postgres/soft/pg_top-72088ce/machine.h:15, from /home/postgres/soft/pg_top-72088ce/display.h:7, from /home/postgres/soft/pg_top-72088ce/color.c:33: /home/postgres/soft/pg_top-72088ce/pg.h:6:22: error: libpq-fe.h: No such file or directory In file included from /home/postgres/soft/pg_top-72088ce/machine.h:15, from /home/postgres/soft/pg_top-72088ce/display.h:7, from /home/postgres/soft/pg_top-72088ce/color.c:33: /home/postgres/soft/pg_top-72088ce/pg.h:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token /home/postgres/soft/pg_top-72088ce/pg.h:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token /home/postgres/soft/pg_top-72088ce/pg.h:61: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token /home/postgres/soft/pg_top-72088ce/pg.h:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token make[2]: *** [CMakeFiles/pg_top.dir/color.c.o] Error 1 make[1]: *** [CMakeFiles/pg_top.dir/all] Error 2 make: *** [all] Error 2

my postgresql is also make install。 so how to let the pg_top know postgresql

Which distro are you running, and can you copy the exact commands used to configure and build?

HI, I face the problem too when i "make install"
[root@szypg pg_top-72088ce]# make install [ 7%] Building C object CMakeFiles/pg_top.dir/color.c.o In file included from /home/postgres/soft/pg_top-72088ce/machine.h:15, from /home/postgres/soft/pg_top-72088ce/display.h:7, from /home/postgres/soft/pg_top-72088ce/color.c:33: /home/postgres/soft/pg_top-72088ce/pg.h:6:22: error: libpq-fe.h: No such file or directory In file included from /home/postgres/soft/pg_top-72088ce/machine.h:15, from /home/postgres/soft/pg_top-72088ce/display.h:7, from /home/postgres/soft/pg_top-72088ce/color.c:33: /home/postgres/soft/pg_top-72088ce/pg.h:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token /home/postgres/soft/pg_top-72088ce/pg.h:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token /home/postgres/soft/pg_top-72088ce/pg.h:61: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token /home/postgres/soft/pg_top-72088ce/pg.h:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token make[2]: *** [CMakeFiles/pg_top.dir/color.c.o] Error 1 make[1]: *** [CMakeFiles/pg_top.dir/all] Error 2 make: *** [all] Error 2
my postgresql is also make install。 so how to let the pg_top know postgresql

Which distro are you running, and can you copy the exact commands used to configure and build?

finally I download pg_top rpm package in https://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/。using rpm -ivh pg_top_[version] , sloved my problem。