Thread: ...

...

From
Oleg Broytmann
Date:
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name        :    Oleg Broytmann
Your email address    : phd2@earthling.net


System Configuration
---------------------
  Architecture (example: Intel Pentium)      : SUN Sparc Ultra-1

  Operating System (example: Linux 2.0.26 ELF)     : Solaris 2.5.1

  PostgreSQL version (example: PostgreSQL-6.5.1):   PostgreSQL-7.0beta5

  Compiler used (example:  gcc 2.8.0)        : gcc 2.8.1


Please enter a FULL description of your problem:
------------------------------------------------
Compilation error:

make -C libpq++ all
make[2]: Entering directory `/usr/local/src/PostgreSQL/postgresql-7.0beta5/src/interfaces/libpq++'
gcc -O2  -I../../backend -I../../include -I../../interfaces/libpq -fPIC   -c pgconnection.cc
In file included from pgconnection.cc:18:
pgconnection.h:76: syntax error before `('
pgconnection.cc:132: syntax error before `::'
pgconnection.cc:135: `buffer' was not declared in this scope
pgconnection.cc:135: `buffer' was not declared in this scope
pgconnection.cc:135: warning: ANSI C++ forbids declaration `memset' with no type or storage class
pgconnection.cc:135: `int memset' redeclared as different kind of symbol
/usr/include/string.h:56: previous declaration of `void * memset(void *, int, unsigned int)'
pgconnection.cc:135: warning: initializer list being treated as compound expression
pgconnection.cc:136: `buffer' was not declared in this scope
pgconnection.cc:136: `n' was not declared in this scope
pgconnection.cc:136: warning: ANSI C++ forbids declaration `sprintf' with no type or storage class
pgconnection.cc:136: `int sprintf' redeclared as different kind of symbol
/usr/include/stdio.h:177: previous declaration of `int sprintf(char *, const char * ...)'
pgconnection.cc:136: warning: initializer list being treated as compound expression
pgconnection.cc:137: parse error before `return'
make[2]: *** [pgconnection.o] Error 1
make[2]: Leaving directory `/usr/local/src/PostgreSQL/postgresql-7.0beta5/src/interfaces/libpq++'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/PostgreSQL/postgresql-7.0beta5/src/interfaces'
make: *** [all] Error 2

Oleg.
----
    Oleg Broytmann    http://members.xoom.com/phd2.1/    phd2@earthling.net
           Programmers don't die, they just GOSUB without RETURN.

Re:

From
Tom Lane
Date:
Oleg Broytmann <phd@sun.med.ru> writes:
> gcc -O2  -I../../backend -I../../include -I../../interfaces/libpq -fPIC   -c pgconnection.cc
> In file included from pgconnection.cc:18:
> pgconnection.h:76: syntax error before `('

Hmm.  Something broken about "string"?

My guess is that configure didn't think it should define
HAVE_CXX_STRING_HEADER, but that is actually necessary on your
machine.  Please look into it.

            regards, tom lane

Re:

From
Oleg Broytmann
Date:
On Tue, 11 Apr 2000, Tom Lane wrote:
> Oleg Broytmann <phd@sun.med.ru> writes:
> > gcc -O2  -I../../backend -I../../include -I../../interfaces/libpq -fPIC   -c pgconnection.cc
> > In file included from pgconnection.cc:18:
> > pgconnection.h:76: syntax error before `('
>
> Hmm.  Something broken about "string"?
>
> My guess is that configure didn't think it should define
> HAVE_CXX_STRING_HEADER, but that is actually necessary on your
> machine.  Please look into it.

   Thanks.
   Yes, it was undefined. I defined it in config.h - and got all sorts of
other errors. Seems I have broken or incomplete g++ installation, probably
libstd++ and/or libio++. I rarely compile C++ programs, but I cannot recall
such problem:

make[2]: Entering directory
`/usr/local/src/PostgreSQL/postgresql-7.0beta5/src/i
nterfaces/libpq++'
gcc -O2  -I../../backend -I../../include -I../../interfaces/libpq -fPIC
-c pgc
onnection.cc
In file included from /usr/local/include/g++/alloc.h:18,
                 from /usr/local/include/g++/std/bastring.h:39,
                 from /usr/local/include/g++/string:6,
                 from pgconnection.h:29,
                 from pgconnection.cc:18:
/usr/local/include/g++/stl_config.h:106: _G_config.h: No such file or
directory
In file included from /usr/local/include/g++/streambuf.h:36,
                 from /usr/local/include/g++/iostream.h:31,
                 from /usr/local/include/g++/stl_alloc.h:45,
                 from /usr/local/include/g++/alloc.h:21,
                 from /usr/local/include/g++/std/bastring.h:39,
                 from /usr/local/include/g++/string:6,
                 from pgconnection.h:29,
                 from pgconnection.cc:18:
/usr/local/include/g++/libio.h:30: _G_config.h: No such file or directory
make[2]: *** [pgconnection.o] Error 1
make[2]: Leaving directory
`/usr/local/src/PostgreSQL/postgresql-7.0beta5/src/in
terfaces/libpq++'
make[1]: *** [all] Error 2
make[1]: Leaving directory
`/usr/local/src/PostgreSQL/postgresql-7.0beta5/src/in
terfaces'
make: *** [all] Error 2

Oleg.
----
    Oleg Broytmann    http://members.xoom.com/phd2.1/    phd2@earthling.net
           Programmers don't die, they just GOSUB without RETURN.

Re:

From
"Kardos, Dr. Andreas"
Date:
This seems to be a Sun Sparc (-fPIC).

On mine (SunOS 5.4/ Solaris 2.4) isn't any <string>. Therefore libpq++ is
not compilable on this machine (native compilers).

configure sets HAVE_CXX_STRING_HEADER correctly (no).

Andreas Kardos

-----Ursprüngliche Nachricht-----
Von: Tom Lane <tgl@sss.pgh.pa.us>
An: <phd2@earthling.net>
Cc: PostgreSQL-bugs <pgsql-bugs@postgresql.org>
Gesendet: Dienstag, 11. April 2000 16:28
Betreff: Re: [BUGS]


> Oleg Broytmann <phd@sun.med.ru> writes:
> >
c -O2  -I../../backend -I../../include -I../../interfaces/libpq -fPIC   -c
pgconnection.cc
> > In file included from pgconnection.cc:18:
> > pgconnection.h:76: syntax error before `('
>
> Hmm.  Something broken about "string"?
>
> My guess is that configure didn't think it should define
> HAVE_CXX_STRING_HEADER, but that is actually necessary on your
> machine.  Please look into it.
>
> regards, tom lane
>

Re:

From
Oleg Broytmann
Date:
On Wed, 12 Apr 2000, Kardos, Dr. Andreas wrote:
> This seems to be a Sun Sparc (-fPIC).

   Sun Sparc, Solaris 2.5.1.

> On mine (SunOS 5.4/ Solaris 2.4) isn't any <string>. Therefore libpq++ is
> not compilable on this machine (native compilers).

   gcc 2.8.1

> configure sets HAVE_CXX_STRING_HEADER correctly (no).

   Yes, set to undef... and didn't compile libpq++. I think I need
./configure --disable-cxx and skip libpq++ at all...

Oleg.
----
    Oleg Broytmann    http://members.xoom.com/phd2.1/    phd2@earthling.net
           Programmers don't die, they just GOSUB without RETURN.