undefined reference to gzopen64

Posted on July 9th, 2019 by whinger. Filed under Uncategorized.


So building postgres v11 on an old legacy centos server produced this error:

pg_basebackup.o(.text+0xed0):postgres-11.4-build/../postgresql-11.4/src/bin/pg_basebackup/pg_basebackup.c:1019: undefined reference to `gzopen64

Turned out a new version of zlib had been manually installed in /usr/local and the included zlib.h pointed to the new version (which used gzopen64), while the old version in /usr/lib (and which had no gzopen64 symbol) was being linked. Adding LDFLAGS=-L/usr/local/lib to the configure line was enough to make it build successfully.



Trackback URI | Comments RSS

Leave a Reply


Blogroll

Categories