Обсуждение: Build-Problem with pgc.c on OSX 10.4

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

Build-Problem with pgc.c on OSX 10.4

От
"Florian G. Pflug"
Дата:
Hi

When I try to build CVS HEAD on OSX 10.4, compiling
src/interfaces/ecpg/preproc/preproc.c fails with:
In file included from preproc.y:6951:
pgc.l:3:20: error: config.h: No such file or directory
In file included from pgc.l:28,                 from preproc.y:6951:
preproc.h:996: error: conflicting types for 'base_yylloc'
y.tab.c:18673: error: previous declaration of 'base_yylloc' was here
In file included from preproc.y:6951:
pgc.l:43: error: 'MAX_PARSE_BUFFER' undeclared here (not in a function)

If I delete pgc.c, it is rebuilt automatically, and then
preproc.c compiles just fine.

I'm using gcc 4.0.1, flex 2.5.4 and bison 2.3

greetings, Florian Pflug


Re: Build-Problem with pgc.c on OSX 10.4

От
Tom Lane
Дата:
"Florian G. Pflug" <fgp@phlo.org> writes:
> When I try to build CVS HEAD on OSX 10.4, compiling
> src/interfaces/ecpg/preproc/preproc.c fails with:
> ...
> If I delete pgc.c, it is rebuilt automatically, and then
> preproc.c compiles just fine.
> ...
> I'm using gcc 4.0.1, flex 2.5.4 and bison 2.3

Perhaps you changed bison versions and didn't force a rebuild?
Those line numbers don't seem to sync up with my copies of the
derived files.
        regards, tom lane


Re: Build-Problem with pgc.c on OSX 10.4

От
"Florian G. Pflug"
Дата:
Tom Lane wrote:
> "Florian G. Pflug" <fgp@phlo.org> writes:
>> When I try to build CVS HEAD on OSX 10.4, compiling
>> src/interfaces/ecpg/preproc/preproc.c fails with:
>> ...
>> If I delete pgc.c, it is rebuilt automatically, and then
>> preproc.c compiles just fine.
>> ...
>> I'm using gcc 4.0.1, flex 2.5.4 and bison 2.3
> 
> Perhaps you changed bison versions and didn't force a rebuild?
> Those line numbers don't seem to sync up with my copies of the
> derived files.

I just realized that this file isn't even in the postgresql CVS
repo. But it _is_ part of the SVN mirror at
https://projects.commandprompt.com/public/pgsql/repo.

The version that shows up in the trunk of the SVN repo is
the revision 1.5 from CVS

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/Attic/pgc.c?rev=1.5;content-type=text%2Fplain;hideattic=0)

This is the same as
https://projects.commandprompt.com/public/pgsql/repo/trunk/pgsql/src/interfaces/ecpg/preproc/pgc.c
modulo the expansion of the $Header macro.

Seems to be a bug in the CVS->SVN conversion process...

greetings, Florian Pflug



Re: Build-Problem with pgc.c on OSX 10.4

От
Alvaro Herrera
Дата:
Florian G. Pflug wrote:
> Tom Lane wrote:
> >"Florian G. Pflug" <fgp@phlo.org> writes:
> >>When I try to build CVS HEAD on OSX 10.4, compiling
> >>src/interfaces/ecpg/preproc/preproc.c fails with:
> >>...
> >>If I delete pgc.c, it is rebuilt automatically, and then
> >>preproc.c compiles just fine.
> >>...
> >>I'm using gcc 4.0.1, flex 2.5.4 and bison 2.3
> >
> >Perhaps you changed bison versions and didn't force a rebuild?
> >Those line numbers don't seem to sync up with my copies of the
> >derived files.
> 
> I just realized that this file isn't even in the postgresql CVS
> repo. But it _is_ part of the SVN mirror at
> https://projects.commandprompt.com/public/pgsql/repo.
> 
> The version that shows up in the trunk of the SVN repo is
> the revision 1.5 from CVS
>
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/Attic/pgc.c?rev=1.5;content-type=text%2Fplain;hideattic=0)
> 
> This is the same as
> https://projects.commandprompt.com/public/pgsql/repo/trunk/pgsql/src/interfaces/ecpg/preproc/pgc.c
> modulo the expansion of the $Header macro.
> 
> Seems to be a bug in the CVS->SVN conversion process...

Ah, it seems the SVN repo just got its first user ;-)  Congratulations.
Ask Joshua to send you a Command Prompt tee shirt, maybe he is excited
enough.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


Re: Build-Problem with pgc.c on OSX 10.4

От
"Florian G. Pflug"
Дата:
Alvaro Herrera wrote:
> Ah, it seems the SVN repo just got its first user ;-)  Congratulations.
> Ask Joshua to send you a Command Prompt tee shirt, maybe he is excited
> enough.

I hope the fact that I use the SVN repo just to get the changes into
git doesn't reduce my chances of getting that t-shirt ;-)

greetings, Florian Pflug


Re: Build-Problem with pgc.c on OSX 10.4

От
Alvaro Herrera
Дата:
Florian G. Pflug wrote:
> Alvaro Herrera wrote:
> >Ah, it seems the SVN repo just got its first user ;-)  Congratulations.
> >Ask Joshua to send you a Command Prompt tee shirt, maybe he is excited
> >enough.
> 
> I hope the fact that I use the SVN repo just to get the changes into
> git doesn't reduce my chances of getting that t-shirt ;-)

Hum, why don't you just use the CVS directly then?  That'd avoid this
sort of infelicities.

Me, I have never even seen such a t-shirt, so maybe they don't exist.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: Build-Problem with pgc.c on OSX 10.4

От
"Florian G. Pflug"
Дата:
Alvaro Herrera wrote:
> Florian G. Pflug wrote:
>> Alvaro Herrera wrote:
>>> Ah, it seems the SVN repo just got its first user ;-)  Congratulations.
>>> Ask Joshua to send you a Command Prompt tee shirt, maybe he is excited
>>> enough.
>> I hope the fact that I use the SVN repo just to get the changes into
>> git doesn't reduce my chances of getting that t-shirt ;-)
> 
> Hum, why don't you just use the CVS directly then?  That'd avoid this
> sort of infelicities.

git-cvsimport didn't work for me - neither with the main CVS repo, nor
with a rsync'ed copy.
It complained about all sorts of problems - I don't have enough CVS knowhow
to judge if those were actual problems with the repo, or just deficiencies
of git-cvsimport. Plus I didn't find a way to import the current version of
HEAD as one revision, any only go incrementally from there. It always wanted
to mirror the whole history stores in the CVS in my git repo, which is
overkill.

For SVN, there is git-svn, which does just what I want - I started with some
revision a few days ago, and it just incrementally imports updates from there
into a special branch of my git repo, and doesn't care about what happened
before that revision.

It's all not perfect, but I think for me it works better than just doing my
changes in a CVS checkout.

greetings, Florian Pflug


Re: Build-Problem with pgc.c on OSX 10.4

От
Neil Conway
Дата:
On Mon, 2007-04-16 at 03:48 +0200, Florian G. Pflug wrote:
> I just realized that this file isn't even in the postgresql CVS
> repo. But it _is_ part of the SVN mirror at
> https://projects.commandprompt.com/public/pgsql/repo.
[...]
> Seems to be a bug in the CVS->SVN conversion process...

The root problem is that the CVS repository is in a strange state, I
believe. The RCS file Attic/pgc.c,v has following metadata for the most
recent revision of the file:

1.5
date    99.06.29.04.54.48;  author vadim;   state Exp;
branches   1.5.2.1;
next    1.4;

AFAICS this is wrong: the file should be deleted and is in Attic/, so it
should have "state dead;" (which is the state that most of the deleted
files have for their last revision). preproc.c,v has the same error --
you could check for other files with the same problem by diff'ing a
fresh checkout from SVN with the same result from CVS. (Was this never
done?)

I think the right fix is for someone with shell access to the CVS master
to manually move ecpg/Attic/pgc.c,v to ecpg/pgc.c,v, do a fresh CVS
checkout/update, and then "cvs delete pgc.c". Similarly for preproc.c,v.

-Neil