Thread: iso-8859-1 type name ‘pg_int64’

iso-8859-1 type name ‘pg_int64’

From
Steve Crawford
Date:
I am getting the error following errors trying to install pg_repack via
pgxn on Ubuntu server 12.04.4 with all PostgreSQL packages from pgdg:

gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Wformat-security -Werror=format-security -fPIC -pie
-fno-omit-frame-pointer -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wformat-security
-fno-strict-aliasing -fwrapv -fexcess-precision=standard -g
-I/usr/include/postgresql -DREPACK_VERSION=1.2.1 -I. -I./
-I/usr/include/postgresql/9.1/server -I/usr/include/postgresql/internal
-D_FORTIFY_SOURCE=2 -DLINUX_OOM_ADJ=0 -D_GNU_SOURCE
-I/usr/include/libxml2 -I/usr/include/tcl8.5  -c -o pg_repack.o pg_repack.c
In file included from pgut/pgut.h:21:0,
                  from pgut/pgut-fe.h:13,
                  from pg_repack.c:25:
/usr/include/postgresql/libpq-fe.h:547:1: error: unknown type name
‘pg_int64’
/usr/include/postgresql/libpq-fe.h:547:50: error: unknown type name
‘pg_int64’
/usr/include/postgresql/libpq-fe.h:551:1: error: unknown type name
‘pg_int64’
/usr/include/postgresql/libpq-fe.h:553:48: error: unknown type name
‘pg_int64’

I found mention of a similar issue relating to repmgr reported by Josh
Berkus here but no recommended solution:
https://groups.google.com/forum/#!topic/repmgr/0rSwzVFlPsM

On that thread someone requested the output of "dpkg -l | grep postgres"
so I'll preemptively post it here:
ii  pgdg-keyring 2013.2                            keyring for
apt.postgresql.org
ii  postgresql-9.1 9.1.13-1.pgdg12.4+1               object-relational
SQL database, version 9.1 server
ii  postgresql-client-9.1 9.1.13-1.pgdg12.4+1               front-end
programs for PostgreSQL 9.1
ii  postgresql-client-common 154.pgdg12.4+1                    manager
for multiple PostgreSQL client versions
ii  postgresql-common 154.pgdg12.4+1                    PostgreSQL
database-cluster manager
ii  postgresql-contrib-9.1 9.1.13-1.pgdg12.4+1               additional
facilities for PostgreSQL
ii  postgresql-doc-9.1 9.1.13-1.pgdg12.4+1               documentation
for the PostgreSQL database management system
ii  postgresql-server-dev-9.1 9.1.13-1.pgdg12.4+1
development files for PostgreSQL 9.1 server-side programming

Cheers,
Steve



Re: iso-8859-1 type name ‘pg_int64’

From
Tom Lane
Date:
Steve Crawford <scrawford@pinpointresearch.com> writes:
> I am getting the error following errors trying to install pg_repack via
> pgxn on Ubuntu server 12.04.4 with all PostgreSQL packages from pgdg:
> /usr/include/postgresql/libpq-fe.h:547:1: error: unknown type name
> �pg_int64�

That type name ought to be defined in postgres_ext.h, if it's of a similar
vintage to libpq-fe.h.  I suspect you have a mishmash of Postgres
installations of different releases and the compiler is managing to find
the wrong version of postgres_ext.h to go with the libpq-fe.h it's
finding.

> On that thread someone requested the output of "dpkg -l | grep postgres"
> so I'll preemptively post it here:
> [ lots of postgres 9.1 packages ]

Well, 9.1 didn't have pg_int64, but its libpq-fe.h didn't use that type
either.  Whatever /usr/include/postgresql/libpq-fe.h is from, it's not
one of the packages you show here.

            regards, tom lane


Re: iso-8859-1 type name ‘pg_int64’

From
Steve Crawford
Date:
On 06/11/2014 11:35 AM, Tom Lane wrote:
> Steve Crawford <scrawford@pinpointresearch.com> writes:
>> I am getting the error following errors trying to install pg_repack via
>> pgxn on Ubuntu server 12.04.4 with all PostgreSQL packages from pgdg:
>> /usr/include/postgresql/libpq-fe.h:547:1: error: unknown type name
>> ‘pg_int64’
> That type name ought to be defined in postgres_ext.h, if it's of a similar
> vintage to libpq-fe.h.  I suspect you have a mishmash of Postgres
> installations of different releases and the compiler is managing to find
> the wrong version of postgres_ext.h to go with the libpq-fe.h it's
> finding.
>
>> On that thread someone requested the output of "dpkg -l | grep postgres"
>> so I'll preemptively post it here:
>> [ lots of postgres 9.1 packages ]
> Well, 9.1 didn't have pg_int64, but its libpq-fe.h didn't use that type
> either.  Whatever /usr/include/postgresql/libpq-fe.h is from, it's not
> one of the packages you show here...
You were correct. I have:
/usr/include/postgresql/postgres_ext.h
/usr/include/postgresql/9.1/server/postgres_ext.h

Seems to be a packaging/dependency issue. I installed
postgresql-server-dev-9.1 (9.1.13-1.pgdg12.4+1) this morning which
installed, as a dependency, libpq-dev (9.3.4-1.pgdg12.4+1) which uses a
different directory convention for where to place postgres_ext.h. I
guess a forced downgrade of libpq/libpq-dev is in order.

Cheers,
Steve