Обсуждение: Cannot compile psql

Поиск
Список
Период
Сортировка

Cannot compile psql

От
Michael Meskes
Дата:
I just tried recompiling the latest source for the first time in weeks, but
it appears I cannot compile pgsql. My source should be up-to-date since I
use cvsup everytime I go online. But during compile I get:

gcc -I../../interfaces/libpq -I../../include -I../../backend   -O2 -Wall -Wmissing-prototypes   -c -o common.o
common.c
In file included from ../../include/postgres.h:41,                from ../../interfaces/libpq/pqsignal.h:20,
   from common.c:23:
 
../../include/utils/mcxt.h:25: syntax error before `MemoryContext'
make[2]: *** [common.o] Error 1

Is this a problem on my site? 

Michael 
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!


Re: [HACKERS] Cannot compile psql

От
Tatsuo Ishii
Дата:
> I just tried recompiling the latest source for the first time in weeks, but
> it appears I cannot compile pgsql. My source should be up-to-date since I
> use cvsup everytime I go online. But during compile I get:
> 
> gcc -I../../interfaces/libpq -I../../include -I../../backend   -O2 -Wall -Wmissing-prototypes   -c -o common.o
common.c
> In file included from ../../include/postgres.h:41,
>                  from ../../interfaces/libpq/pqsignal.h:20,
>                  from common.c:23:
> ../../include/utils/mcxt.h:25: syntax error before `MemoryContext'
> make[2]: *** [common.o] Error 1
> 
> Is this a problem on my site? 

I assume you have configured --with-mb=something *before*
make. --with-mb does not seem to work anymore. Try:

make distclean
./configure --enable-multibyte[=something]

Seems we have to warn if --with-mb is used, otherwise multibyte users
would complain about it.
--
Tatsuo Ishii


Re: [HACKERS] Cannot compile psql

От
Tatsuo Ishii
Дата:
> I just tried recompiling the latest source for the first time in weeks, but
> it appears I cannot compile pgsql. My source should be up-to-date since I
> use cvsup everytime I go online. But during compile I get:

Sorry, my previous mail was wrong.

You are compiling psql, right? I do not see any problem on my Linux
box (based on RH 5.2). Maybe make distclean and re-configure would
help.
--
Tatsuo Ishii



Re: [HACKERS] Cannot compile psql

От
Tom Lane
Дата:
Michael Meskes <meskes@postgresql.org> writes:
> ../../include/utils/mcxt.h:25: syntax error before `MemoryContext'

That line reads

extern DLLIMPORT MemoryContext CurrentMemoryContext;

I'll bet you are trying to compile with a Windoze-oriented config.h
that causes DLLIMPORT to expand to something nonempty.  Try
reconfiguring.
        regards, tom lane


Re: [HACKERS] Cannot compile psql

От
Michael Meskes
Дата:
On Tue, Jan 18, 2000 at 11:01:30PM +0900, Tatsuo Ishii wrote:
> You are compiling psql, right? I do not see any problem on my Linux
> box (based on RH 5.2). Maybe make distclean and re-configure would
> help.

Unfortunately no. It didn't help.

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!


Re: [HACKERS] Cannot compile psql

От
Michael Meskes
Дата:
On Tue, Jan 18, 2000 at 11:01:30PM +0900, Tatsuo Ishii wrote:
> Sorry, my previous mail was wrong.

No problem.

> You are compiling psql, right? I do not see any problem on my Linux

Yes, as part of the complete source tree.

> box (based on RH 5.2). Maybe make distclean and re-configure would
> help.

I will try it and tell you. :-)

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!


Re: [HACKERS] Cannot compile psql

От
Peter Eisentraut
Дата:
On 2000-01-18, Tatsuo Ishii mentioned:

> I assume you have configured --with-mb=something *before*
> make. --with-mb does not seem to work anymore. Try:
> 
> make distclean
> ./configure --enable-multibyte[=something]
> 
> Seems we have to warn if --with-mb is used, otherwise multibyte users
> would complain about it.

I wanted to do that, but as soon as you put that option back in it shows
up in --help output, which is against the point of it being deprecated.

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden




Re: [HACKERS] Cannot compile psql

От
Michael Meskes
Дата:
On Tue, Jan 18, 2000 at 10:51:48AM -0500, Tom Lane wrote:
> Michael Meskes <meskes@postgresql.org> writes:
> > ../../include/utils/mcxt.h:25: syntax error before `MemoryContext'
> 
> That line reads
> 
> extern DLLIMPORT MemoryContext CurrentMemoryContext;

Yes. Commenting out this line removes the message but of course gives some
compiler errors.

> I'll bet you are trying to compile with a Windoze-oriented config.h

Shouldn't have that since I only run PostgreSQL in Linux.

> that causes DLLIMPORT to expand to something nonempty.  Try
> reconfiguring.

I tried make distclean followed by a new configure to no avail.

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!


Re: [HACKERS] Cannot compile psql

От
Tom Lane
Дата:
Michael Meskes <meskes@postgreSQL.org> writes:
> On Tue, Jan 18, 2000 at 10:51:48AM -0500, Tom Lane wrote:
>> I'll bet you are trying to compile with a Windoze-oriented config.h
>> that causes DLLIMPORT to expand to something nonempty.  Try
>> reconfiguring.

> I tried make distclean followed by a new configure to no avail.

Hmm.  Look at the bottom of include/c.h --- it should be impossible
for DLLIMPORT to be nonempty unless __CYGWIN32__ is defined.  So where
is that definition coming from?
        regards, tom lane


Re: [HACKERS] Cannot compile psql

От
Michael Meskes
Дата:
On Wed, Jan 19, 2000 at 09:55:45AM -0500, Tom Lane wrote:
> Hmm.  Look at the bottom of include/c.h --- it should be impossible
> for DLLIMPORT to be nonempty unless __CYGWIN32__ is defined.  So where
> is that definition coming from?

I have no idea. But I will check. Also I think that this include file is
used elsewhere too. But the error message does come up only once.

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael@Fam-Meskes.De           | Use PostgreSQL!


Re: [HACKERS] Cannot compile psql

От
Tom Lane
Дата:
Michael Meskes <meskes@postgreSQL.org> writes:
> I have no idea. But I will check. Also I think that this include file is
> used elsewhere too. But the error message does come up only once.

Oh, that's interesting, because there are a dozen or so files that
reference DLLIMPORT.  Maybe you should be looking at what is included
by the file with the error (and not by any other files...)
        regards, tom lane