PostgreSQL 14 support
devrimgunduz opened this issue · comments
Hi,
pgstats fails to build against v14. Below is the logs. Can you please take a look? Regards, Devrim
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection pgdisplay.o -L/usr/pgsql-14/lib -lpgcommon -lpgport -L/usr/pgsql-14/lib -lpq -L/usr/pgsql-14/lib -L/usr/lib64 -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-14/lib',--enable-new-dtags -lpgfeutils -lm -o pgdisplay
/usr/bin/ld: cannot find -lpgfeutils
/usr/bin/ld: cannot find -lpgfeutils
/usr/bin/ld: cannot find -lpgfeutils
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:19: pgwaitevent] Error 1
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: cannot find -lpgfeutils
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:19: pgcsvstat] Error 1
make[1]: *** [Makefile:19: pgdisplay] Error 1
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:19: pgstat] Error 1
pgreport.c: In function 'sql_conn':
pgreport.c:363:25: warning: implicit declaration of function 'simple_prompt' [-Wimplicit-function-declaration]
363 | simple_prompt("Password: ", password, 100, false);
| ^~~~~~~~~~~~~
That's weird. I thought I already fixed that. Let me check.
So I did work on that on April 5th (d446b39). I didn't do a release yet, so I'm guessing that's what you need. I can't do it right now as I'm on a bike trip, but I'll do that on Sunday evening. Is that ok for you?
Hi @devrimgunduz,
From what I've seen in v14, there are a lot of changes in the monitoring views. So I'll first fix my tools to use these new columns before releasing a new version. There's good chance I could work on that next week.
Thanks.
Cheers.
You now have a new release (1.2.0) and a new tag (REL1_2_0). I guess you have everything ;)
Hi @gleu ,
Getting this error
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection pgdisplay.o -L/usr/pgsql-14/lib -lpgcommon -lpgport -L/usr/pgsql-14/lib -lpq -L/usr/pgsql-14/lib -L/usr/lib64 -L/usr/lib64 -Wl,--as-needed -Wl,-rpath,'/usr/pgsql-14/lib',--enable-new-dtags -lpgfeutils -lm -o pgdisplay
/usr/bin/ld: cannot find -lpgfeutils
collect2: error: ld returned 1 exit status
Hey @devrimgunduz, Would you mind telling me which PostgreSQL and libpq release? Thanks.
@gleu PostgreSQL 14 (beta3), and libpq from PG 13.
@gleu any updates?
I don't have the issue on my laptop. The only difference I can see is that I don't mix PostgreSQL and libpq versions, but I don't see how it could make any troubles. It seems from your error message that it cannot find the pgfeutils library, but it's available on all the versions I have on my laptop (from 9.6 till 15dev).
Did you try to look for it?
I've been working again today on this issue because one of my coworkers had the same issue and I managed to reproduce it. The file simply doesn't exist on the v14 and v15 RPMs, and the reason is that the spec file deletes it. From rpm/redhat/15/postgresql-15/EL-9/postgresql-15.spec :
# These file(s) should not be packaged:
%{__rm} %{buildroot}%{pgbaseinstdir}/lib/libpgfeutils.a
That explains why you can't compile pgstats which definitely needs libpgfeutils.a. The question is why you think this library shouldn't be packaged?
PS: same issue on v14 (rpm/redhat/14/postgresql-14/EL-9/postgresql-14.spec)