Обсуждение: ecpg generated files ignorable?

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

ecpg generated files ignorable?

От
Alvaro Herrera
Дата:
Hi,

I keep seeing these files show up in the source tree in a VPATH build:

? src/interfaces/ecpg/compatlib/libecpg_compatddll.def
? src/interfaces/ecpg/ecpglib/libecpgddll.def
? src/interfaces/ecpg/pgtypeslib/libpgtypesddll.def

I am not sure if these should stay on the source dir (i.e. are they
needed in the tarball).  If they are supposed to, then I think they
should be listed in the corresponding .cvsignore file.

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


Re: ecpg generated files ignorable?

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@commandprompt.com> writes:
> I keep seeing these files show up in the source tree in a VPATH build:

> ? src/interfaces/ecpg/compatlib/libecpg_compatddll.def
> ? src/interfaces/ecpg/ecpglib/libecpgddll.def
> ? src/interfaces/ecpg/pgtypeslib/libpgtypesddll.def

> I am not sure if these should stay on the source dir (i.e. are they
> needed in the tarball).  If they are supposed to, then I think they
> should be listed in the corresponding .cvsignore file.

Makefile.shlib builds these in the distprep action, so I suppose
they're supposed to be there.  libpq .cvsignore's its equivalent
files, so I'd agree with doing that.  It looks like there should be
three such files in each directory, though, not just one?
        regards, tom lane


Re: ecpg generated files ignorable?

От
Michael Meskes
Дата:
On Wed, Jun 18, 2008 at 09:26:24PM -0400, Tom Lane wrote:
> > ? src/interfaces/ecpg/compatlib/libecpg_compatddll.def
> > ? src/interfaces/ecpg/ecpglib/libecpgddll.def
> > ? src/interfaces/ecpg/pgtypeslib/libpgtypesddll.def

IIRC these are for MS VC++.

> > I am not sure if these should stay on the source dir (i.e. are they
> > needed in the tarball).  If they are supposed to, then I think they
> > should be listed in the corresponding .cvsignore file.
> 
> Makefile.shlib builds these in the distprep action, so I suppose
> they're supposed to be there.  libpq .cvsignore's its equivalent
> files, so I'd agree with doing that.  It looks like there should be
> three such files in each directory, though, not just one?

Well, in my source tree I have two, one for MS VC++ and one for Borland
C++ Builder. And yes, I can build a third one for MS VC++ as well by
just issuing the corresponding make call. However, I have no idea
whether we need both, the only differ in the lib name:
--- libecpgddll.def     2008-06-20 12:33:29.000000000 +0200
+++ libecpgdll.def      2008-06-20 12:33:16.000000000 +0200
@@ -1,5 +1,5 @@; DEF file for MS VC++
-LIBRARY LIBECPGD
+LIBRARY LIBECPGEXPORTS      ECPGallocate_desc                @ 1      ECPGconnect                      @ 2

Maybe someone with more Windows knowledge can explain this? Magnus?

Michael

-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!


Re: ecpg generated files ignorable?

От
Alvaro Herrera
Дата:
Michael Meskes wrote:
> On Wed, Jun 18, 2008 at 09:26:24PM -0400, Tom Lane wrote:

> > Makefile.shlib builds these in the distprep action, so I suppose
> > they're supposed to be there.  libpq .cvsignore's its equivalent
> > files, so I'd agree with doing that.  It looks like there should be
> > three such files in each directory, though, not just one?

There are three -- two of them are .cvsignore'd.  Should we just
.cvsignore the third one, or remove it from the build, or ...?

libpq has the three of them in .cvsignore so I guess this is what ecpg
should do as well.


> Well, in my source tree I have two, one for MS VC++ and one for Borland
> C++ Builder. And yes, I can build a third one for MS VC++ as well by
> just issuing the corresponding make call. However, I have no idea
> whether we need both, the only differ in the lib name:
> --- libecpgddll.def     2008-06-20 12:33:29.000000000 +0200
> +++ libecpgdll.def      2008-06-20 12:33:16.000000000 +0200
> @@ -1,5 +1,5 @@
>  ; DEF file for MS VC++
> -LIBRARY LIBECPGD
> +LIBRARY LIBECPG
>  EXPORTS
>        ECPGallocate_desc                @ 1
>        ECPGconnect                      @ 2
> 
> Maybe someone with more Windows knowledge can explain this? Magnus?

The weird thing is that the three files are generated for me
unconditionally (of course, I didn't issue a specific make call).

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


Re: ecpg generated files ignorable?

От
Michael Meskes
Дата:
On Fri, Jun 27, 2008 at 08:56:11AM -0400, Alvaro Herrera wrote:
> There are three -- two of them are .cvsignore'd.  Should we just
> .cvsignore the third one, or remove it from the build, or ...?

I'd say so.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!


Re: ecpg generated files ignorable?

От
Magnus Hagander
Дата:
Alvaro Herrera wrote:
> Michael Meskes wrote:
>> Well, in my source tree I have two, one for MS VC++ and one for Borland
>> C++ Builder. And yes, I can build a third one for MS VC++ as well by
>> just issuing the corresponding make call. However, I have no idea
>> whether we need both, the only differ in the lib name:
>> --- libecpgddll.def     2008-06-20 12:33:29.000000000 +0200
>> +++ libecpgdll.def      2008-06-20 12:33:16.000000000 +0200
>> @@ -1,5 +1,5 @@
>>  ; DEF file for MS VC++
>> -LIBRARY LIBECPGD
>> +LIBRARY LIBECPG
>>  EXPORTS
>>        ECPGallocate_desc                @ 1
>>        ECPGconnect                      @ 2
>>
>> Maybe someone with more Windows knowledge can explain this? Magnus?

(without looking at the actual code :-P):

LIBRARY should match the name of the DLL file. LIBECPGD is the debugging
version, which is the one linked against the debugging version of the
runtime. It needs to exist in any case where CRT pointers (FILE*,
va_args, things like that) is passed between DLLs. If one is linked
against release and one against debug, a crash will occur, so to build
you need to have a debug-linked version of the DLL as well.

Wow. That turned into quite a messy explanation, I hope it's readable :)

//magnus


Re: ecpg generated files ignorable?

От
Alvaro Herrera
Дата:
Magnus Hagander wrote:

> LIBRARY should match the name of the DLL file. LIBECPGD is the debugging
> version, which is the one linked against the debugging version of the
> runtime. It needs to exist in any case where CRT pointers (FILE*,
> va_args, things like that) is passed between DLLs. If one is linked
> against release and one against debug, a crash will occur, so to build
> you need to have a debug-linked version of the DLL as well.
> 
> Wow. That turned into quite a messy explanation, I hope it's readable :)

I could read it ;-) so I committed the suggested fix which is to list
them in .cvsignore too along the other ones.  Thanks.

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