pgstats icon indicating copy to clipboard operation
pgstats copied to clipboard

PostgreSQL 14 support

Open devrimgunduz opened this issue 4 years ago • 11 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); | ^~~~~~~~~~~~~

devrimgunduz avatar Jun 04 '21 14:06 devrimgunduz

That's weird. I thought I already fixed that. Let me check.

gleu avatar Jun 04 '21 15:06 gleu

So I did work on that on April 5th (d446b39e765e6988c04ad98833b63aa1cf58a63d). 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?

gleu avatar Jun 04 '21 15:06 gleu

Hi @gleu ,

No rush. I'll package it when you release new version.

Cheers, Devrim

devrimgunduz avatar Jun 07 '21 15:06 devrimgunduz

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.

gleu avatar Jun 07 '21 19:06 gleu

You now have a new release (1.2.0) and a new tag (REL1_2_0). I guess you have everything ;)

gleu avatar Jun 18 '21 11:06 gleu

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

devrimgunduz avatar Jul 08 '21 23:07 devrimgunduz

Hey @devrimgunduz, Would you mind telling me which PostgreSQL and libpq release? Thanks.

gleu avatar Jul 23 '21 10:07 gleu

@gleu PostgreSQL 14 (beta3), and libpq from PG 13.

devrimgunduz avatar Sep 13 '21 22:09 devrimgunduz

@gleu any updates?

devrimgunduz-edb avatar Sep 21 '21 16:09 devrimgunduz-edb

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?

gleu avatar Sep 25 '21 09:09 gleu

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)

gleu avatar Jan 03 '23 10:01 gleu