Обсуждение: [HACKERS] Build failure on thrips

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

[HACKERS] Build failure on thrips

От
Michael Meskes
Дата:
The bug fix I committed for fixing setlocale in ECPG test cases on Windows
seems to work nicely on all buildfarm animals except thrips. Could anyone with
access to a similar systems please check what's going on or send the
precompiled file that creates the compilation errors? 

Thanks.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL



Re: [HACKERS] Build failure on thrips

От
Tom Lane
Дата:
Michael Meskes <meskes@postgresql.org> writes:
> The bug fix I committed for fixing setlocale in ECPG test cases on Windows
> seems to work nicely on all buildfarm animals except thrips. Could anyone with
> access to a similar systems please check what's going on or send the
> precompiled file that creates the compilation errors?

It's not just thrips.  Of the Windows machines that have reported in since
that commit, only currawong and baiji passed.  Although lorikeet,
woodlouse, bowerbird, and brolga are showing green, this proves nothing
because they're all configured to skip the ecpg check (... I wonder why).

In the rest, we have

frogmouth:
thread_implicit.pgc: In function 'test_thread':
thread_implicit.pgc:104:2: warning: implicit declaration of function '_configthreadlocale'
thread_implicit.pgc:104:22: error: '_ENABLE_PER_THREAD_LOCALE' undeclared (first use in this function)

jacana:
Aug 26 09:06:40 thread_implicit.o: In function `test_thread':
Aug 26 09:06:40
c:\mingw\msys\1.0\home\pgrunner\bf\root\HEAD\pgsql.build\src\interfaces\ecpg\test\thread/thread_implicit.pgc:104:
undefinedreference to `_configthreadlocale' 

thrips is showing some weird syntax errors that I suspect mean it's
misinterpreting "_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);"
as a declaration.

So what it looks like to me is that either that function isn't
available on all Windows versions, or there's some other header
you need to include to get it on some versions.
        regards, tom lane



Re: [HACKERS] Build failure on thrips

От
Tom Lane
Дата:
I wrote:
> thrips is showing some weird syntax errors that I suspect mean it's
> misinterpreting "_configthreadlocale(_ENABLE_PER_THREAD_LOCALE);"
> as a declaration.

Actually, looking closer, isn't the problem that you've stuck a
function call into the midst of declarations?  Some compilers
will allow that, but it's not valid C90.  You probably just need
to move the call down past "EXEC SQL END DECLARE SECTION".

> So what it looks like to me is that either that function isn't
> available on all Windows versions, or there's some other header
> you need to include to get it on some versions.

Microsoft's own documentation contradicts that:
https://msdn.microsoft.com/en-us/library/26c0tb7x(v=vs.80).aspx

So I'm not sure why the undefined-function results on frogmouth
and jacana, although I notice they are using gcc not MSVC.
Unless someone has a better idea, I'd suggest working around
that like so:

#ifdef WIN32
#ifdef _MSC_VER                /* requires MSVC */  _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
#endif
#endif
        regards, tom lane



Re: [HACKERS] Build failure on thrips

От
Michael Meskes
Дата:
> It's not just thrips.  Of the Windows machines that have reported in
> since
> that commit, only currawong and baiji passed.  Although lorikeet,
> woodlouse, bowerbird, and brolga are showing green, this proves
> nothing
> because they're all configured to skip the ecpg check (... I wonder
> why).

I would assume it works on woodlouse as the patch has been submitted by
woodlouse's owner.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL



Re: [HACKERS] Build failure on thrips

От
Christian Ullrich
Дата:
* Michael Meskes wrote:

>> It's not just thrips.  Of the Windows machines that have reported in
>> since
>> that commit, only currawong and baiji passed.  Although lorikeet,
>> woodlouse, bowerbird, and brolga are showing green, this proves
>> nothing
>> because they're all configured to skip the ecpg check (... I wonder
>> why).
>
> I would assume it works on woodlouse as the patch has been submitted by
> woodlouse's owner.

woodlouse does not do ecpg-check, and Tom is right anyway. I need to get a large sign nailed to my forehead that says
"Postgresis C, and declarations must come first." 

I'm not sure, and not able to find out right this moment, why thrips' compiler does not accept this code now, because I
testedit on thrips (and woodlouse, IIRC) before I sent it in.  

--
Christian


Re: [HACKERS] Build failure on thrips

От
Michael Meskes
Дата:
> Unless someone has a better idea, I'd suggest working around
> that like so:
> 
> #ifdef WIN32
> #ifdef _MSC_VER                /* requires MSVC */
>    _configthreadlocale(_ENABLE_PER_THREAD_LOCALE);
> #endif
> #endif

Let's try, committed, thanks again Tom.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL



Re: [HACKERS] Build failure on thrips

От
Michael Meskes
Дата:
> woodlouse does not do ecpg-check, and Tom is right anyway. I need to 
> get a large sign nailed to my forehead that says "Postgres is C, and
> declarations must come first."

I didn't notice either. I guess /me is getting rusty, sigh.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL