On Wed, 4 Jun 2025 at 19:13, Álvaro Herrera <alvherre@kurilemu.de> wrote:
> > On Tue, 3 Jun 2025 at 23:50, David E. Wheeler <david@justatheory.com> wrote:
> > > What’s the error? Maybe we can fix it.
> >
> > As per my knowledge Postgres internal code lacks visibility annotations on
> > its symbols, which causes compilation errors when fvisibility flag is used.
>
> You're being way too vague with your responses. Please copy & paste
> command lines used and the error messages you get.
Really sorry for that.
Here's the workflow I tried to compile
$ ./configure CFLAGS="-Og -g -fvisibility=hidden"
--prefix=/home/mankirat/install/REL_17_4
$ make -j$(nproc)
........
/usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1154:
undefined reference to `PQserverVersion'
/usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1156:
undefined reference to `appendPQExpBufferChar'
/usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1155:
undefined reference to `appendPQExpBufferStr'
/usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1164:
undefined reference to `appendPQExpBufferStr'
/usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1165:
undefined reference to `appendPQExpBuffer'
/usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1169:
undefined reference to `termPQExpBuffer'
/usr/bin/ld: /home/mankirat/postgres/src/fe_utils/string_utils.c:1170:
undefined reference to `termPQExpBuffer'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:51: pg_restore] Error 1
make[3]: Leaving directory
'/home/mankirat/Desktop/OSS/abicc/try2/postgres/src/bin/pg_dump'
make[2]: *** [Makefile:45: all-pg_dump-recurse] Error 2
make[2]: Leaving directory
'/home/mankirat/Desktop/OSS/abicc/try2/postgres/src/bin'
make[1]: *** [Makefile:42: all-bin-recurse] Error 2
make[1]: Leaving directory '/home/mankirat/Desktop/OSS/abicc/try2/postgres/src'
make: *** [GNUmakefile:11: all-src-recurse] Error 2
$ make install
.........
/usr/bin/install: cannot stat './dynloader.h': No such file or directory
make[2]: *** [Makefile:50: install] Error 1
make[2]: Leaving directory '/home/mankirat/postgres/src/include'
make[1]: *** [Makefile:42: install-include-recurse] Error 2
make[1]: Leaving directory '/home/mankirat/postgres/src'
make: *** [GNUmakefile:11: install-src-recurse] Error 2
I get this error when I try using the -fvisibilty=hidden flag
Regards,
Mankirat