Re: more dirmod CYGWIN (was: APR 1.0 released)

Lists: pgsql-hackerspgsql-hackers-win32pgsql-patches
From: Reini Urban <rurban(at)x-ray(dot)at>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: APR 1.0 released
Date: 2004-09-10 09:16:55
Message-ID: 41417107.2080502@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Bruce Momjian schrieb:
> Andrew Dunstan wrote:
>>Reini Urban wrote:
>>>FYI: WIN32 is also defined because <windows.h> is included.
>>>(/usr/incluse/w32api/windef.h)
>>>If you want this or that, do proper nesting, and use #else.
>>>
>>>
>>
>>Ugh, yes. A little experimentation shows that __WIN32__ is defined for
>>MinGW only, but WIN32 is for both. I wonder how we missed that in
>>various places. Maybe we need a little audit of the use of WIN32.
>
> OK, fixed. We should not be using __WIN32__, just Win32. The proper
> test is #ifndef __CYGWIN__.

very good. just think of future MSVC versions.

Just one more glitch:

#undef rename
#undef unlink

has to be defined before #include <unistd.h> on CYGWIN, because
unistd.h has the declarations for rename and unlink, which are required
inside the pg versions.
without the #undef, the macros which rename rename to pgrename, ... are
still effective, which will lead to undeclared/falsely autodeclared
rename/unlink parts.

I don't know for mingw, if they need the pgrename/pgunlink declaration.
For my CYGWIN patch I moved those two lines before #include <unistd.h>.

> ------------------------------------------------------------------------
>
> Index: src/port/dirmod.c
> ===================================================================
> RCS file: /cvsroot/pgsql-server/src/port/dirmod.c,v
> retrieving revision 1.23
> diff -c -c -r1.23 dirmod.c
> *** src/port/dirmod.c 9 Sep 2004 00:59:49 -0000 1.23
> --- src/port/dirmod.c 10 Sep 2004 02:44:19 -0000
> ***************
> *** 36,45 ****
> #undef rename
> #undef unlink
>
> ! #ifdef __WIN32__
> #include <winioctl.h>
> #else
> - /* __CYGWIN__ */
> #include <windows.h>
> #include <w32api/winioctl.h>
> #endif
> --- 36,44 ----
> #undef rename
> #undef unlink
>
> ! #ifndef __CYGWIN__
> #include <winioctl.h>
> #else
> #include <windows.h>
> #include <w32api/winioctl.h>
> #endif
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: APR 1.0 released
Date: 2004-09-10 09:52:22
Message-ID: 200409100952.i8A9qNi14859@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches


OK, moved and comment documents its location.

---------------------------------------------------------------------------

Reini Urban wrote:
> Bruce Momjian schrieb:
> > Andrew Dunstan wrote:
> >>Reini Urban wrote:
> >>>FYI: WIN32 is also defined because <windows.h> is included.
> >>>(/usr/incluse/w32api/windef.h)
> >>>If you want this or that, do proper nesting, and use #else.
> >>>
> >>>
> >>
> >>Ugh, yes. A little experimentation shows that __WIN32__ is defined for
> >>MinGW only, but WIN32 is for both. I wonder how we missed that in
> >>various places. Maybe we need a little audit of the use of WIN32.
> >
> > OK, fixed. We should not be using __WIN32__, just Win32. The proper
> > test is #ifndef __CYGWIN__.
>
> very good. just think of future MSVC versions.
>
> Just one more glitch:
>
> #undef rename
> #undef unlink
>
> has to be defined before #include <unistd.h> on CYGWIN, because
> unistd.h has the declarations for rename and unlink, which are required
> inside the pg versions.
> without the #undef, the macros which rename rename to pgrename, ... are
> still effective, which will lead to undeclared/falsely autodeclared
> rename/unlink parts.
>
> I don't know for mingw, if they need the pgrename/pgunlink declaration.
> For my CYGWIN patch I moved those two lines before #include <unistd.h>.
>
> > ------------------------------------------------------------------------
> >
> > Index: src/port/dirmod.c
> > ===================================================================
> > RCS file: /cvsroot/pgsql-server/src/port/dirmod.c,v
> > retrieving revision 1.23
> > diff -c -c -r1.23 dirmod.c
> > *** src/port/dirmod.c 9 Sep 2004 00:59:49 -0000 1.23
> > --- src/port/dirmod.c 10 Sep 2004 02:44:19 -0000
> > ***************
> > *** 36,45 ****
> > #undef rename
> > #undef unlink
> >
> > ! #ifdef __WIN32__
> > #include <winioctl.h>
> > #else
> > - /* __CYGWIN__ */
> > #include <windows.h>
> > #include <w32api/winioctl.h>
> > #endif
> > --- 36,44 ----
> > #undef rename
> > #undef unlink
> >
> > ! #ifndef __CYGWIN__
> > #include <winioctl.h>
> > #else
> > #include <windows.h>
> > #include <w32api/winioctl.h>
> > #endif
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 758 bytes

From: Reini Urban <rurban(at)x-ray(dot)at>
To: pgsql-hackers(at)postgresql(dot)org
Subject: more dirmod CYGWIN (was: APR 1.0 released)
Date: 2004-09-10 10:02:21
Message-ID: 41417BAD.7050402@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

[BTW: there's no need to cc all, I'm subscribed to most lists]

Reini Urban schrieb:
> Bruce Momjian schrieb:
>> Andrew Dunstan wrote:
>>> Reini Urban wrote:
>>>
>>>> FYI: WIN32 is also defined because <windows.h> is included.
>>>> (/usr/incluse/w32api/windef.h)
>>>> If you want this or that, do proper nesting, and use #else.
>>>
>>> Ugh, yes. A little experimentation shows that __WIN32__ is defined
>>> for MinGW only, but WIN32 is for both. I wonder how we missed that in
>>> various places. Maybe we need a little audit of the use of WIN32.
>>
>>
>> OK, fixed. We should not be using __WIN32__, just Win32. The proper
>> test is #ifndef __CYGWIN__.
>
>
> very good. just think of future MSVC versions.
>
> Just one more glitch:
>
> #undef rename
> #undef unlink
>
> has to be defined before #include <unistd.h> on CYGWIN, because
> unistd.h has the declarations for rename and unlink, which are required
> inside the pg versions.
> without the #undef, the macros which rename rename to pgrename, ... are
> still effective, which will lead to undeclared/falsely autodeclared
> rename/unlink parts.
>
> I don't know for mingw, if they need the pgrename/pgunlink declaration.
> For my CYGWIN patch I moved those two lines before #include <unistd.h>.

FYI: latest cvs HEAD, without any patches.

make runs now through with the expected implicit declaration warnings,
but without any errors. Esp. the CYGWIN-specific SHMLIB linking errors
are now gone. good!

make[2]: Entering directory `/usr/src/postgresql/pgsql/src/port'
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -I../../src/port -I../../src/include -c -o
dirmod.o dirmod.c
dirmod.c: In Funktion >>pgunlink<<:
dirmod.c:113: Warnung: implicit declaration of function `unlink'
dirmod.c: In Funktion >>rmt_cleanup<<:
dirmod.c:267: Warnung: implicit declaration of function `pgport_pfree'
dirmod.c: In Funktion >>rmtree<<:
dirmod.c:318: Warnung: implicit declaration of function `pgport_palloc'
dirmod.c:318: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne
Typkonvertierung
dirmod.c:333: Warnung: implicit declaration of function `pgport_pstrdup'
dirmod.c:333: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne
Typkonvertierung

make check hangs at:
"running on port 65432 with pid 2304
============== creating database "regression" ==============
CREATE DATABASE
ALTER DATABASE
============== dropping regression test user accounts ==============
============== installing PL/pgSQL ==============
============== running regression test queries ==============
parallel group (13 tests): int2 int4 int8 float4 name varchar numeric"

which means rename works ok. probably the false implicit declarations in
the memory code break it.

I'll come with another patch later.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


From: Reini Urban <rurban(at)x-ray(dot)at>
To: pgsql-hackers(at)postgresql(dot)org
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] more dirmod CYGWIN
Date: 2004-09-10 13:01:57
Message-ID: 4141A5C5.60700@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Reini Urban schrieb:
> [BTW: there's no need to cc all, I'm subscribed to most lists]
> Reini Urban schrieb:
>> Bruce Momjian schrieb:
>>> Andrew Dunstan wrote:
>>>> Reini Urban wrote:
>>>>
>>>>> FYI: WIN32 is also defined because <windows.h> is included.
>>>>> (/usr/incluse/w32api/windef.h)
>>>>> If you want this or that, do proper nesting, and use #else.
>>>>
>>>> Ugh, yes. A little experimentation shows that __WIN32__ is defined
>>>> for MinGW only, but WIN32 is for both. I wonder how we missed that
>>>> in various places. Maybe we need a little audit of the use of WIN32.
>>>
>>> OK, fixed. We should not be using __WIN32__, just Win32. The proper
>>> test is #ifndef __CYGWIN__.
>>
>> very good. just think of future MSVC versions.
>>
>> Just one more glitch:
>>
>> #undef rename
>> #undef unlink
>>
>> has to be defined before #include <unistd.h> on CYGWIN, because
>> unistd.h has the declarations for rename and unlink, which are
>> required inside the pg versions.
>> without the #undef, the macros which rename rename to pgrename, ...
>> are still effective, which will lead to undeclared/falsely
>> autodeclared rename/unlink parts.
>>
>> I don't know for mingw, if they need the pgrename/pgunlink declaration.
>> For my CYGWIN patch I moved those two lines before #include <unistd.h>.
>
>
> FYI: latest cvs HEAD, without any patches.
>
> make runs now through with the expected implicit declaration warnings,
> but without any errors. Esp. the CYGWIN-specific SHMLIB linking errors
> are now gone. good!
>
> make[2]: Entering directory `/usr/src/postgresql/pgsql/src/port'
> gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -I../../src/port -I../../src/include -c -o
> dirmod.o dirmod.c
> dirmod.c: In Funktion >>pgunlink<<:
> dirmod.c:113: Warnung: implicit declaration of function `unlink'
> dirmod.c: In Funktion >>rmt_cleanup<<:
> dirmod.c:267: Warnung: implicit declaration of function `pgport_pfree'
> dirmod.c: In Funktion >>rmtree<<:
> dirmod.c:318: Warnung: implicit declaration of function `pgport_palloc'
> dirmod.c:318: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne
> Typkonvertierung
> dirmod.c:333: Warnung: implicit declaration of function `pgport_pstrdup'
> dirmod.c:333: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne
> Typkonvertierung
>
> make check hangs at:
> "running on port 65432 with pid 2304
> ============== creating database "regression" ==============
> CREATE DATABASE
> ALTER DATABASE
> ============== dropping regression test user accounts ==============
> ============== installing PL/pgSQL ==============
> ============== running regression test queries ==============
> parallel group (13 tests): int2 int4 int8 float4 name varchar numeric"
>
> which means rename works ok. probably the false implicit declarations in
> the memory code break it.
>
> I'll come with another patch later.

parallel tests hang on cygwin. this is expected.

attached is the postmaster stackdump on the parallel test (if you care),
and the IPC's during the parallel test (not quite busy...):
$ ipcs
Message Queues:
T ID KEY MODE OWNER GROUP

Shared Memory:
T ID KEY MODE OWNER GROUP
m 1966080 65432001 --rw------- rurban root

Semaphores:
T ID KEY MODE OWNER GROUP
s 1966080 65432001 --rw------- rurban root
s 1966081 65432002 --rw------- rurban root
s 1966082 65432003 --rw------- rurban root
s 1966083 65432004 --rw------- rurban root
s 1966084 65432005 --rw------- rurban root
s 1966085 65432006 --rw------- rurban root
s 1966086 65432007 --rw------- rurban root

with the serial schedule all tests but the last pass.
test tablespace ... FAILED

This is the tail of the postmaster log for this failing test.

ERROR: cannot alter table "fullname" because column "people"."fn" uses
its rowtype
ERROR: could not create symbolic link
"/usr/src/postgresql/pgsql/src/test/regress/./tmp_check/data/pg_tblspc/155118":
No error
ERROR: tablespace "testspace" does not exist
ERROR: schema "testschema" does not exist
ERROR: schema "testschema" does not exist
ERROR: schema "testschema" does not exist
ERROR: schema "testschema" does not exist
ERROR: could not set permissions on directory "/no/such/location": No
such file or directory
ERROR: tablespace "nosuchspace" does not exist
ERROR: tablespace "testspace" does not exist
ERROR: schema "testschema" does not exist
ERROR: tablespace "testspace" does not exist
LOG: received smart shutdown request
LOG: shutting down
LOG: database system is shut down

attached is the regression.diffs,

and also the overall patch against current CVS HEAD I used for this run.
(the move-#undef patch is probably already applied regarding bruce)
this should be applied.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

Attachment Content-Type Size
regression.diffs text/plain 3.5 KB
cvs-20040910-cygwin.patch text/plain 825 bytes

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] more dirmod CYGWIN
Date: 2004-09-10 16:16:40
Message-ID: 200409101616.i8AGGeS04327@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches


I have applied all parts of your patch now.

---------------------------------------------------------------------------

Reini Urban wrote:
> Reini Urban schrieb:
> > [BTW: there's no need to cc all, I'm subscribed to most lists]
> > Reini Urban schrieb:
> >> Bruce Momjian schrieb:
> >>> Andrew Dunstan wrote:
> >>>> Reini Urban wrote:
> >>>>
> >>>>> FYI: WIN32 is also defined because <windows.h> is included.
> >>>>> (/usr/incluse/w32api/windef.h)
> >>>>> If you want this or that, do proper nesting, and use #else.
> >>>>
> >>>> Ugh, yes. A little experimentation shows that __WIN32__ is defined
> >>>> for MinGW only, but WIN32 is for both. I wonder how we missed that
> >>>> in various places. Maybe we need a little audit of the use of WIN32.
> >>>
> >>> OK, fixed. We should not be using __WIN32__, just Win32. The proper
> >>> test is #ifndef __CYGWIN__.
> >>
> >> very good. just think of future MSVC versions.
> >>
> >> Just one more glitch:
> >>
> >> #undef rename
> >> #undef unlink
> >>
> >> has to be defined before #include <unistd.h> on CYGWIN, because
> >> unistd.h has the declarations for rename and unlink, which are
> >> required inside the pg versions.
> >> without the #undef, the macros which rename rename to pgrename, ...
> >> are still effective, which will lead to undeclared/falsely
> >> autodeclared rename/unlink parts.
> >>
> >> I don't know for mingw, if they need the pgrename/pgunlink declaration.
> >> For my CYGWIN patch I moved those two lines before #include <unistd.h>.
> >
> >
> > FYI: latest cvs HEAD, without any patches.
> >
> > make runs now through with the expected implicit declaration warnings,
> > but without any errors. Esp. the CYGWIN-specific SHMLIB linking errors
> > are now gone. good!
> >
> > make[2]: Entering directory `/usr/src/postgresql/pgsql/src/port'
> > gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
> > -Wmissing-declarations -I../../src/port -I../../src/include -c -o
> > dirmod.o dirmod.c
> > dirmod.c: In Funktion >>pgunlink<<:
> > dirmod.c:113: Warnung: implicit declaration of function `unlink'
> > dirmod.c: In Funktion >>rmt_cleanup<<:
> > dirmod.c:267: Warnung: implicit declaration of function `pgport_pfree'
> > dirmod.c: In Funktion >>rmtree<<:
> > dirmod.c:318: Warnung: implicit declaration of function `pgport_palloc'
> > dirmod.c:318: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne
> > Typkonvertierung
> > dirmod.c:333: Warnung: implicit declaration of function `pgport_pstrdup'
> > dirmod.c:333: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne
> > Typkonvertierung
> >
> > make check hangs at:
> > "running on port 65432 with pid 2304
> > ============== creating database "regression" ==============
> > CREATE DATABASE
> > ALTER DATABASE
> > ============== dropping regression test user accounts ==============
> > ============== installing PL/pgSQL ==============
> > ============== running regression test queries ==============
> > parallel group (13 tests): int2 int4 int8 float4 name varchar numeric"
> >
> > which means rename works ok. probably the false implicit declarations in
> > the memory code break it.
> >
> > I'll come with another patch later.
>
> parallel tests hang on cygwin. this is expected.
>
> attached is the postmaster stackdump on the parallel test (if you care),
> and the IPC's during the parallel test (not quite busy...):
> $ ipcs
> Message Queues:
> T ID KEY MODE OWNER GROUP
>
> Shared Memory:
> T ID KEY MODE OWNER GROUP
> m 1966080 65432001 --rw------- rurban root
>
> Semaphores:
> T ID KEY MODE OWNER GROUP
> s 1966080 65432001 --rw------- rurban root
> s 1966081 65432002 --rw------- rurban root
> s 1966082 65432003 --rw------- rurban root
> s 1966083 65432004 --rw------- rurban root
> s 1966084 65432005 --rw------- rurban root
> s 1966085 65432006 --rw------- rurban root
> s 1966086 65432007 --rw------- rurban root
>
> with the serial schedule all tests but the last pass.
> test tablespace ... FAILED
>
> This is the tail of the postmaster log for this failing test.
>
> ERROR: cannot alter table "fullname" because column "people"."fn" uses
> its rowtype
> ERROR: could not create symbolic link
> "/usr/src/postgresql/pgsql/src/test/regress/./tmp_check/data/pg_tblspc/155118":
> No error
> ERROR: tablespace "testspace" does not exist
> ERROR: schema "testschema" does not exist
> ERROR: schema "testschema" does not exist
> ERROR: schema "testschema" does not exist
> ERROR: schema "testschema" does not exist
> ERROR: could not set permissions on directory "/no/such/location": No
> such file or directory
> ERROR: tablespace "nosuchspace" does not exist
> ERROR: tablespace "testspace" does not exist
> ERROR: schema "testschema" does not exist
> ERROR: tablespace "testspace" does not exist
> LOG: received smart shutdown request
> LOG: shutting down
> LOG: database system is shut down
>
> attached is the regression.diffs,
>
> and also the overall patch against current CVS HEAD I used for this run.
> (the move-#undef patch is probably already applied regarding bruce)
> this should be applied.
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/

> *** ./expected/tablespace.out Fri Sep 10 13:42:08 2004
> --- ./results/tablespace.out Fri Sep 10 13:53:22 2004
> ***************
> *** 1,34 ****
> -- create a tablespace we can use
> CREATE TABLESPACE testspace LOCATION '/usr/src/postgresql/pgsql/src/test/regress/testtablespace';
> -- create a schema in the tablespace
> CREATE SCHEMA testschema TABLESPACE testspace;
> -- sanity check
> SELECT nspname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_namespace n
> where n.nsptablespace = t.oid and n.nspname = 'testschema';
> nspname | spcname
> ! ------------+-----------
> ! testschema | testspace
> ! (1 row)
>
> -- try a table
> CREATE TABLE testschema.foo (i int);
> SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c
> where c.reltablespace = t.oid AND c.relname = 'foo';
> relname | spcname
> ! ---------+-----------
> ! foo | testspace
> ! (1 row)
>
> INSERT INTO testschema.foo VALUES(1);
> INSERT INTO testschema.foo VALUES(2);
> -- index
> CREATE INDEX foo_idx on testschema.foo(i);
> SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c
> where c.reltablespace = t.oid AND c.relname = 'foo_idx';
> relname | spcname
> ! ---------+-----------
> ! foo_idx | testspace
> ! (1 row)
>
> -- Will fail with bad path
> CREATE TABLESPACE badspace LOCATION '/no/such/location';
> --- 1,37 ----
> -- create a tablespace we can use
> CREATE TABLESPACE testspace LOCATION '/usr/src/postgresql/pgsql/src/test/regress/testtablespace';
> + ERROR: could not create symbolic link "/usr/src/postgresql/pgsql/src/test/regress/./tmp_check/data/pg_tblspc/155118": No error
> -- create a schema in the tablespace
> CREATE SCHEMA testschema TABLESPACE testspace;
> + ERROR: tablespace "testspace" does not exist
> -- sanity check
> SELECT nspname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_namespace n
> where n.nsptablespace = t.oid and n.nspname = 'testschema';
> nspname | spcname
> ! ---------+---------
> ! (0 rows)
>
> -- try a table
> CREATE TABLE testschema.foo (i int);
> + ERROR: schema "testschema" does not exist
> SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c
> where c.reltablespace = t.oid AND c.relname = 'foo';
> relname | spcname
> ! ---------+---------
> ! (0 rows)
>
> INSERT INTO testschema.foo VALUES(1);
> + ERROR: schema "testschema" does not exist
> INSERT INTO testschema.foo VALUES(2);
> + ERROR: schema "testschema" does not exist
> -- index
> CREATE INDEX foo_idx on testschema.foo(i);
> + ERROR: schema "testschema" does not exist
> SELECT relname, spcname FROM pg_catalog.pg_tablespace t, pg_catalog.pg_class c
> where c.reltablespace = t.oid AND c.relname = 'foo_idx';
> relname | spcname
> ! ---------+---------
> ! (0 rows)
>
> -- Will fail with bad path
> CREATE TABLESPACE badspace LOCATION '/no/such/location';
> ***************
> *** 38,45 ****
> ERROR: tablespace "nosuchspace" does not exist
> -- Fail, not empty
> DROP TABLESPACE testspace;
> ! ERROR: tablespace "testspace" is not empty
> DROP SCHEMA testschema CASCADE;
> ! NOTICE: drop cascades to table testschema.foo
> -- Should succeed
> DROP TABLESPACE testspace;
> --- 41,49 ----
> ERROR: tablespace "nosuchspace" does not exist
> -- Fail, not empty
> DROP TABLESPACE testspace;
> ! ERROR: tablespace "testspace" does not exist
> DROP SCHEMA testschema CASCADE;
> ! ERROR: schema "testschema" does not exist
> -- Should succeed
> DROP TABLESPACE testspace;
> + ERROR: tablespace "testspace" does not exist
>
> ======================================================================
>

> --- ./src/include/utils/palloc.h.orig 2004-08-29 05:13:11.000000000 +0100
> +++ ./src/include/utils/palloc.h 2004-09-10 13:33:04.587653100 +0100
> @@ -80,7 +80,7 @@
>
> #define pstrdup(str) MemoryContextStrdup(CurrentMemoryContext, (str))
>
> -#ifdef WIN32
> +#if defined(WIN32) || defined(__CYGWIN__)
> extern void *pgport_palloc(Size sz);
> extern char *pgport_pstrdup(const char *str);
> extern void pgport_pfree(void *pointer);
> --- ./src/port/dirmod.c.orig 2004-09-10 10:29:36.500414700 +0100
> +++ ./src/port/dirmod.c 2004-09-10 13:33:53.790148300 +0100
> @@ -21,6 +21,9 @@
> #include "postgres_fe.h"
> #endif
>
> +#undef rename
> +#undef unlink
> +
> #include <unistd.h>
> #include <dirent.h>
> #include <sys/stat.h>
> @@ -33,9 +36,6 @@
>
> #include "miscadmin.h"
>
> -#undef rename
> -#undef unlink
> -
> #ifndef __CYGWIN__
> #include <winioctl.h>
> #else

>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Reini Urban <rurban(at)x-ray(dot)at>
To: pgsql-hackers(at)postgresql(dot)org
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] more dirmod CYGWIN
Date: 2004-09-10 18:10:50
Message-ID: 4141EE2A.2090509@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Bruce Momjian schrieb:
> I have applied all parts of your patch now.

Thanks. Core builds and works fine now. (plperl IPC problems aside)

But there's are still some more minor SHLIB glitches,
which only affects contrib, because -lpgport is missing for various dll's.

SHLIB_LINK doesn't contain the libs only the paths, because they are
filtered out somewhere.
But first I want to find the real cause of the problem.
Maybe LIB is just missing a -lpgport.

$ diff -bu src/Makefile.shlib.orig src/Makefile.shlib
--- src/Makefile.shlib.orig 2004-09-03 00:06:43.000000000 +0100
+++ src/Makefile.shlib 2004-09-10 17:12:18.528655500 +0100
@@ -216,6 +216,7 @@

ifeq ($(PORTNAME), cygwin)
shlib = $(NAME)$(DLSUFFIX)
+ SHLIB_LINK += -lpgport
endif

ifeq ($(PORTNAME), win32)

$ diff -bu src/makefiles/pgxs.mk.orig src/makefiles/pgxs.mk
--- src/makefiles/pgxs.mk.orig 2004-07-30 13:26:40.000000000 +0100
+++ src/makefiles/pgxs.mk 2004-09-10 17:09:15.499748300 +0100
@@ -63,7 +63,11 @@

ifdef MODULES
override CFLAGS += $(CFLAGS_SL)
-SHLIB_LINK += $(BE_DLLLIBS)
+ifeq ($(PORTNAME), cygwin)
+ SHLIB_LINK += $(BE_DLLLIBS) $(LDFLAGS) $(LIBS) -lpgport
+else
+ SHLIB_LINK += $(BE_DLLLIBS)
+endif
endif

ifdef PG_CPPFLAGS

--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>, PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] more dirmod CYGWIN
Date: 2004-09-10 20:54:17
Message-ID: 200409102054.i8AKsHW20565@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches


Well, glad we are on to real Cygwin issues at least. I know I had
probably broken Cygwin with all the Win32 changes. I actually thought
it would be worse. Glad you were able to help us.

On the /contrib issue, I am not sure we even have Mingw compiling contrib.
What error are you seeing? If I try to compile /contrib/dbsize under
Unix I don't see any -lpgport line in the compile:

$ cd /pgtop/contrib/dbsize/
$ gmake
sed 's,MODULE_PATHNAME,$libdir/dbsize,g' dbsize.sql.in >dbsize.sql
gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -O1 -Wall -Wmissing-prototypes
-Wmissing-declarations -Wpointer-arith -Wcast-align -fpic -I.
-I../../src/include -I/usr/local/include/readline -I/usr/contrib/include
-c -o dbsize.o dbsize.c
gcc -shared -o dbsize.so dbsize.o
rm dbsize.o

Let me add that I think the whole FRONTEND flags for /port are a hack
and might need to be change before we hit 8.0 final. They are _very_
fragile but I have not thought of a good solution yet. It is actually
on the open items list.

---------------------------------------------------------------------------

Reini Urban wrote:
> Bruce Momjian schrieb:
> > I have applied all parts of your patch now.
>
> Thanks. Core builds and works fine now. (plperl IPC problems aside)
>
> But there's are still some more minor SHLIB glitches,
> which only affects contrib, because -lpgport is missing for various dll's.
>
> SHLIB_LINK doesn't contain the libs only the paths, because they are
> filtered out somewhere.
> But first I want to find the real cause of the problem.
> Maybe LIB is just missing a -lpgport.
>
>
> $ diff -bu src/Makefile.shlib.orig src/Makefile.shlib
> --- src/Makefile.shlib.orig 2004-09-03 00:06:43.000000000 +0100
> +++ src/Makefile.shlib 2004-09-10 17:12:18.528655500 +0100
> @@ -216,6 +216,7 @@
>
> ifeq ($(PORTNAME), cygwin)
> shlib = $(NAME)$(DLSUFFIX)
> + SHLIB_LINK += -lpgport
> endif
>
> ifeq ($(PORTNAME), win32)
>
> $ diff -bu src/makefiles/pgxs.mk.orig src/makefiles/pgxs.mk
> --- src/makefiles/pgxs.mk.orig 2004-07-30 13:26:40.000000000 +0100
> +++ src/makefiles/pgxs.mk 2004-09-10 17:09:15.499748300 +0100
> @@ -63,7 +63,11 @@
>
> ifdef MODULES
> override CFLAGS += $(CFLAGS_SL)
> -SHLIB_LINK += $(BE_DLLLIBS)
> +ifeq ($(PORTNAME), cygwin)
> + SHLIB_LINK += $(BE_DLLLIBS) $(LDFLAGS) $(LIBS) -lpgport
> +else
> + SHLIB_LINK += $(BE_DLLLIBS)
> +endif
> endif
>
> ifdef PG_CPPFLAGS
>
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Reini Urban <rurban(at)x-ray(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [HACKERS] more dirmod CYGWIN
Date: 2004-09-10 21:20:52
Message-ID: 2957.1094851252@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> On the /contrib issue, I am not sure we even have Mingw compiling contrib.

We don't --- apparently the win32 crowd hadn't bothered to try it until
recently. There are a couple of patches in the queue that claim to make
individual modules work, but I dunno what the overall situation is.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Reini Urban <rurban(at)x-ray(dot)at>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>, PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] more dirmod CYGWIN
Date: 2004-09-10 22:12:17
Message-ID: 200409110012.17211.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Bruce Momjian wrote:
> On the /contrib issue, I am not sure we even have Mingw compiling
> contrib. What error are you seeing? If I try to compile
> /contrib/dbsize under Unix I don't see any -lpgport line in the
> compile:

It doesn't need any. It's loaded in the backend, which already has
libpgport.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Reini Urban <rurban(at)x-ray(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [HACKERS] more dirmod CYGWIN
Date: 2004-09-10 22:34:42
Message-ID: 200409102234.i8AMYgj19786@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Peter Eisentraut wrote:
> Bruce Momjian wrote:
> > On the /contrib issue, I am not sure we even have Mingw compiling
> > contrib. What error are you seeing? If I try to compile
> > /contrib/dbsize under Unix I don't see any -lpgport line in the
> > compile:
>
> It doesn't need any. It's loaded in the backend, which already has
> libpgport.

Ah, very tricky. Thanks. But waht about command-line tools in
/contrib? Maybe they are OK because I didn't see any fixes like that in
the new patches we received. Thanks.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: more dirmod CYGWIN (was: APR 1.0 released)
Date: 2004-10-08 00:27:21
Message-ID: 200410080027.i980RLl02565@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches


I just made some major Win32 modifications in the past few days. Would
you try Cygwin compile and see if the following warnings are removed and
the rest of the system builds OK?

---------------------------------------------------------------------------

Reini Urban wrote:
> [BTW: there's no need to cc all, I'm subscribed to most lists]
>
> Reini Urban schrieb:
> > Bruce Momjian schrieb:
> >> Andrew Dunstan wrote:
> >>> Reini Urban wrote:
> >>>
> >>>> FYI: WIN32 is also defined because <windows.h> is included.
> >>>> (/usr/incluse/w32api/windef.h)
> >>>> If you want this or that, do proper nesting, and use #else.
> >>>
> >>> Ugh, yes. A little experimentation shows that __WIN32__ is defined
> >>> for MinGW only, but WIN32 is for both. I wonder how we missed that in
> >>> various places. Maybe we need a little audit of the use of WIN32.
> >>
> >>
> >> OK, fixed. We should not be using __WIN32__, just Win32. The proper
> >> test is #ifndef __CYGWIN__.
> >
> >
> > very good. just think of future MSVC versions.
> >
> > Just one more glitch:
> >
> > #undef rename
> > #undef unlink
> >
> > has to be defined before #include <unistd.h> on CYGWIN, because
> > unistd.h has the declarations for rename and unlink, which are required
> > inside the pg versions.
> > without the #undef, the macros which rename rename to pgrename, ... are
> > still effective, which will lead to undeclared/falsely autodeclared
> > rename/unlink parts.
> >
> > I don't know for mingw, if they need the pgrename/pgunlink declaration.
> > For my CYGWIN patch I moved those two lines before #include <unistd.h>.
>
> FYI: latest cvs HEAD, without any patches.
>
> make runs now through with the expected implicit declaration warnings,
> but without any errors. Esp. the CYGWIN-specific SHMLIB linking errors
> are now gone. good!
>
> make[2]: Entering directory `/usr/src/postgresql/pgsql/src/port'
> gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -I../../src/port -I../../src/include -c -o
> dirmod.o dirmod.c
> dirmod.c: In Funktion >>pgunlink<<:
> dirmod.c:113: Warnung: implicit declaration of function `unlink'
> dirmod.c: In Funktion >>rmt_cleanup<<:
> dirmod.c:267: Warnung: implicit declaration of function `pgport_pfree'
> dirmod.c: In Funktion >>rmtree<<:
> dirmod.c:318: Warnung: implicit declaration of function `pgport_palloc'
> dirmod.c:318: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne
> Typkonvertierung
> dirmod.c:333: Warnung: implicit declaration of function `pgport_pstrdup'
> dirmod.c:333: Warnung: Zuweisung erzeugt Zeiger von Ganzzahl ohne
> Typkonvertierung
>
> make check hangs at:
> "running on port 65432 with pid 2304
> ============== creating database "regression" ==============
> CREATE DATABASE
> ALTER DATABASE
> ============== dropping regression test user accounts ==============
> ============== installing PL/pgSQL ==============
> ============== running regression test queries ==============
> parallel group (13 tests): int2 int4 int8 float4 name varchar numeric"
>
> which means rename works ok. probably the false implicit declarations in
> the memory code break it.
>
> I'll come with another patch later.
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: more dirmod CYGWIN
Date: 2004-10-08 00:38:57
Message-ID: 200410080038.i980cvo04244@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Reini Urban wrote:
> Bruce Momjian schrieb:
> > I have applied all parts of your patch now.
>
> Thanks. Core builds and works fine now. (plperl IPC problems aside)
>
> But there's are still some more minor SHLIB glitches,
> which only affects contrib, because -lpgport is missing for various dll's.
>

FYI, I think we fixed plperl for Win32 today.

> SHLIB_LINK doesn't contain the libs only the paths, because they are
> filtered out somewhere.
> But first I want to find the real cause of the problem.
> Maybe LIB is just missing a -lpgport.

Would you please post the link command and error that is failing below:

---------------------------------------------------------------------------

>
>
> $ diff -bu src/Makefile.shlib.orig src/Makefile.shlib
> --- src/Makefile.shlib.orig 2004-09-03 00:06:43.000000000 +0100
> +++ src/Makefile.shlib 2004-09-10 17:12:18.528655500 +0100
> @@ -216,6 +216,7 @@
>
> ifeq ($(PORTNAME), cygwin)
> shlib = $(NAME)$(DLSUFFIX)
> + SHLIB_LINK += -lpgport
> endif
>
> ifeq ($(PORTNAME), win32)
>
> $ diff -bu src/makefiles/pgxs.mk.orig src/makefiles/pgxs.mk
> --- src/makefiles/pgxs.mk.orig 2004-07-30 13:26:40.000000000 +0100
> +++ src/makefiles/pgxs.mk 2004-09-10 17:09:15.499748300 +0100
> @@ -63,7 +63,11 @@
>
> ifdef MODULES
> override CFLAGS += $(CFLAGS_SL)
> -SHLIB_LINK += $(BE_DLLLIBS)
> +ifeq ($(PORTNAME), cygwin)
> + SHLIB_LINK += $(BE_DLLLIBS) $(LDFLAGS) $(LIBS) -lpgport
> +else
> + SHLIB_LINK += $(BE_DLLLIBS)
> +endif
> endif
>
> ifdef PG_CPPFLAGS
>
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Reini Urban <rurban(at)x-ray(dot)at>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: more dirmod CYGWIN
Date: 2004-10-08 02:42:57
Message-ID: 4165FEB1.1060100@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Bruce Momjian schrieb:
> Reini Urban wrote:
>>Bruce Momjian schrieb:
>>>I have applied all parts of your patch now.
>>Thanks. Core builds and works fine now. (plperl IPC problems aside)
>>
>>But there's are still some more minor SHLIB glitches,
>>which only affects contrib, because -lpgport is missing for various dll's.
>
> FYI, I think we fixed plperl for Win32 today.

!! good to hear.
I will come with my promised basic plperl regressiontests soon.
No time at all yet.

>>SHLIB_LINK doesn't contain the libs only the paths, because they are
>>filtered out somewhere.
>>But first I want to find the real cause of the problem.
>>Maybe LIB is just missing a -lpgport.
>
> Would you please post the link command and error that is failing below:

well, all dll contrib's which use pgport functions miss -lpgport.
ltree, spi, tsearch, tsearch2, ...

make[1]: Entering directory
`/usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree'
sed 's,MODULE_PATHNAME,$libdir/ltree,g' ltree.sql.in >ltree.sql
gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -DLOWER_NODE -I. -I..
/../src/include -c -o ltree_io.o ltree_io.c
gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -DLOWER_NODE -I. -I..
/../src/include -c -o ltree_op.o ltree_op.c
gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -DLOWER_NODE -I. -I..
/../src/include -c -o lquery_op.o lquery_op.c
gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -DLOWER_NODE -I. -I..
/../src/include -c -o _ltree_op.o _ltree_op.c
gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -DLOWER_NODE -I. -I..
/../src/include -c -o crc32.o crc32.c
gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -DLOWER_NODE -I. -I..
/../src/include -c -o ltxtquery_io.o ltxtquery_io.c
gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -DLOWER_NODE -I. -I..
/../src/include -c -o ltxtquery_op.o ltxtquery_op.c
gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -DLOWER_NODE -I. -I..
/../src/include -c -o ltree_gist.o ltree_gist.c
gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
-Wmissing-declarations -DLOWER_NODE -I. -I..
/../src/include -c -o _ltree_gist.o _ltree_gist.c
dlltool --export-all --output-def ltree.def ltree_io.o ltree_op.o
lquery_op.o _ltree_op.o crc32.o ltxtquery_io.o ltxtquery_op.o
ltree_gist.o _ltree_gist.o
dllwrap -o ltree.dll --dllname ltree.dll --def ltree.def ltree_io.o
ltree_op.o lquery_op.o _ltree_op.o crc32.o ltxtquery_io.o ltxtquery_op.o
ltree_gist.o _ltree_gist.o ../../src/utils/dllinit.o -L../../src/port
-L/usr/local/lib -L../../src/backend -lpostgres
lquery_op.o(.text+0x1a4): In function `checkLevel':
/usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree/lquery_op.c:94:
undefined reference to `_pg_strncasecmp'
ltxtquery_op.o(.text+0x1b6): In function `checkcondition_str':
/usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree/ltxtquery_op.c:57:
undefined reference to `_pg_strncasecmp'
collect2: ld gab 1 als Ende-Status zur"uck
dllwrap: gcc exited with status 1
make[1]: *** [libltree.a] Fehler 1
make[1]: Leaving directory
`/usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree'

I still have to live with the attached patch, which will give then:

make[1]: Entering directory
`/usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree'
dlltool --export-all --output-def ltree.def ltree_io.o ltree_op.o
lquery_op.o _ltree_op.o crc32.o ltxtquery_io.o ltxtquery_op.o
ltree_gist.o _ltree_gist.o
dllwrap -o ltree.dll --dllname ltree.dll --def ltree.def ltree_io.o
ltree_op.o lquery_op.o _ltree_op.o crc32.o ltxtquery_io.o ltxtquery_op.o
ltree_gist.o _ltree_gist.o ../../src/utils/dllinit.o -L../
../src/port -L/usr/local/lib -L../../src/backend -lpostgres -lpgport
dlltool --dllname ltree.dll --def ltree.def --output-lib libltree.a
make[1]: Leaving directory
`/usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree'

make -C src ok
make -C contrib ok

make check MAX_CONNECTIONS=5 ...
hangs as reported today in parallel schedule of create_misc.

INSERT INTO iportaltest (i, d, p)
VALUES (2, 89.05, '(4.0,2.0),(3.0,1.0)'::polygon);
hangs ... until
Cancel request sent
FATAL: terminating connection due to administrator command

I'll investigate why.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

Attachment Content-Type Size
shlib.patch text/plain 309 bytes

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: more dirmod CYGWIN (was: APR 1.0 released)
Date: 2004-10-08 21:05:01
Message-ID: ck6veb$6u3$1@floppy.pyrenet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Bruce Momjian wrote:
> I just made some major Win32 modifications in the past few days. Would
> you try Cygwin compile and see if the following warnings are removed and
> the rest of the system builds OK?

Now that postgres 8.0 is win32 native is it still necessary support the cygwin ?

Regards
Gaetano Mendola


From: Reini Urban <rurban(at)x-ray(dot)at>
To:
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: more dirmod CYGWIN (was: APR 1.0 released)
Date: 2004-10-08 21:53:48
Message-ID: 41670C6C.1020300@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Gaetano Mendola schrieb:
> Bruce Momjian wrote:
>> I just made some major Win32 modifications in the past few days. Would
>> you try Cygwin compile and see if the following warnings are removed and
>> the rest of the system builds OK?
>
> Now that postgres 8.0 is win32 native is it still necessary support the
> cygwin ?

FYI: If you drop it I will still provide cygwin packages. I just need it
for testing and writing applications targetted to unix. With win32 this
is not possible.
How do want to support postgis or other extensions on win32?
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: more dirmod CYGWIN (was: APR 1.0 released)
Date: 2004-10-09 00:36:32
Message-ID: 200410090036.i990aW003696@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Reini Urban wrote:
> Gaetano Mendola schrieb:
> > Bruce Momjian wrote:
> >> I just made some major Win32 modifications in the past few days. Would
> >> you try Cygwin compile and see if the following warnings are removed and
> >> the rest of the system builds OK?
> >
> > Now that postgres 8.0 is win32 native is it still necessary support the
> > cygwin ?
>
> FYI: If you drop it I will still provide cygwin packages. I just need it
> for testing and writing applications targetted to unix. With win32 this
> is not possible.
> How do want to support postgis or other extensions on win32?

I see no reason _not_ to support Cygwin. Seems like a fine port to me.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: more dirmod CYGWIN (was: APR 1.0 released)
Date: 2004-10-09 04:45:13
Message-ID: 23995.1097297113@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Reini Urban wrote:
>>> Now that postgres 8.0 is win32 native is it still necessary support the
>>> cygwin ?
>>
>> FYI: If you drop it I will still provide cygwin packages. I just need it
>> for testing and writing applications targetted to unix. With win32 this
>> is not possible.

> I see no reason _not_ to support Cygwin. Seems like a fine port to me.

Cygwin is surely a lot less invasive than the native Windows port ;-)

What you have to understand though is that it's now a bit marginalized.
The bulk of the Windows usage is going to shift to the native port, so
Cygwin support is going to be on the same level as AIX, or HPUX (my
personal favorite), or several other platforms I could mention. That
is, you gotta keep after the porting issues because not very many other
people on pghackers will do it for you. Send in the patches and we'll
use 'em, but don't expect that it will happen without your attention.

I think the main issue right at the moment is that we probably have not
sorted out where "WIN32" means "any Windows port" versus "native port
only" versus "Cygwin only". You're on the spot to keep us honest here.

regards, tom lane


From: Reini Urban <rurban(at)x-ray(dot)at>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: more dirmod CYGWIN
Date: 2004-10-09 11:34:00
Message-ID: 4167CCA8.4030901@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Tom Lane schrieb:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>>Reini Urban wrote:
>>>>Now that postgres 8.0 is win32 native is it still necessary support the
>>>>cygwin ?
>>>
>>>FYI: If you drop it I will still provide cygwin packages. I just need it
>>>for testing and writing applications targetted to unix. With win32 this
>>>is not possible.
>
>
>>I see no reason _not_ to support Cygwin. Seems like a fine port to me.
>
>
> Cygwin is surely a lot less invasive than the native Windows port ;-)
>
> What you have to understand though is that it's now a bit marginalized.
> The bulk of the Windows usage is going to shift to the native port, so
> Cygwin support is going to be on the same level as AIX, or HPUX (my
> personal favorite), or several other platforms I could mention. That
> is, you gotta keep after the porting issues because not very many other
> people on pghackers will do it for you. Send in the patches and we'll
> use 'em, but don't expect that it will happen without your attention.
>
> I think the main issue right at the moment is that we probably have not
> sorted out where "WIN32" means "any Windows port" versus "native port
> only" versus "Cygwin only". You're on the spot to keep us honest here.

Thanks for clarification. Our cygwin community will appreciate it.

Esp. because we try to add all the mapping libs and software, which
depends on postgresql: mapserver, gdal, postgis, ...
And for most of them their only windows ports are cygwin based.

--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Reini Urban <rurban(at)x-ray(dot)at>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: more dirmod CYGWIN
Date: 2004-10-13 10:21:08
Message-ID: 200410131021.i9DAL8f02521@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches


I have added the attached patch to allow Cygwin /contrib compiles. I am
a little confused why Cygwin requires -lpgport and no other platform
does, but it is in the Cygwin-specific section so we can always improve
it later if we find the cause.

Thanks.

---------------------------------------------------------------------------

Reini Urban wrote:
> Bruce Momjian schrieb:
> > Reini Urban wrote:
> >>Bruce Momjian schrieb:
> >>>I have applied all parts of your patch now.
> >>Thanks. Core builds and works fine now. (plperl IPC problems aside)
> >>
> >>But there's are still some more minor SHLIB glitches,
> >>which only affects contrib, because -lpgport is missing for various dll's.
> >
> > FYI, I think we fixed plperl for Win32 today.
>
> !! good to hear.
> I will come with my promised basic plperl regressiontests soon.
> No time at all yet.
>
> >>SHLIB_LINK doesn't contain the libs only the paths, because they are
> >>filtered out somewhere.
> >>But first I want to find the real cause of the problem.
> >>Maybe LIB is just missing a -lpgport.
> >
> > Would you please post the link command and error that is failing below:
>
> well, all dll contrib's which use pgport functions miss -lpgport.
> ltree, spi, tsearch, tsearch2, ...
>
> make[1]: Entering directory
> `/usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree'
> sed 's,MODULE_PATHNAME,$libdir/ltree,g' ltree.sql.in >ltree.sql
> gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -DLOWER_NODE -I. -I..
> /../src/include -c -o ltree_io.o ltree_io.c
> gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -DLOWER_NODE -I. -I..
> /../src/include -c -o ltree_op.o ltree_op.c
> gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -DLOWER_NODE -I. -I..
> /../src/include -c -o lquery_op.o lquery_op.c
> gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -DLOWER_NODE -I. -I..
> /../src/include -c -o _ltree_op.o _ltree_op.c
> gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -DLOWER_NODE -I. -I..
> /../src/include -c -o crc32.o crc32.c
> gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -DLOWER_NODE -I. -I..
> /../src/include -c -o ltxtquery_io.o ltxtquery_io.c
> gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -DLOWER_NODE -I. -I..
> /../src/include -c -o ltxtquery_op.o ltxtquery_op.c
> gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -DLOWER_NODE -I. -I..
> /../src/include -c -o ltree_gist.o ltree_gist.c
> gcc -g -fno-strict-aliasing -Wall -Wmissing-prototypes
> -Wmissing-declarations -DLOWER_NODE -I. -I..
> /../src/include -c -o _ltree_gist.o _ltree_gist.c
> dlltool --export-all --output-def ltree.def ltree_io.o ltree_op.o
> lquery_op.o _ltree_op.o crc32.o ltxtquery_io.o ltxtquery_op.o
> ltree_gist.o _ltree_gist.o
> dllwrap -o ltree.dll --dllname ltree.dll --def ltree.def ltree_io.o
> ltree_op.o lquery_op.o _ltree_op.o crc32.o ltxtquery_io.o ltxtquery_op.o
> ltree_gist.o _ltree_gist.o ../../src/utils/dllinit.o -L../../src/port
> -L/usr/local/lib -L../../src/backend -lpostgres
> lquery_op.o(.text+0x1a4): In function `checkLevel':
> /usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree/lquery_op.c:94:
> undefined reference to `_pg_strncasecmp'
> ltxtquery_op.o(.text+0x1b6): In function `checkcondition_str':
> /usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree/ltxtquery_op.c:57:
> undefined reference to `_pg_strncasecmp'
> collect2: ld gab 1 als Ende-Status zur"uck
> dllwrap: gcc exited with status 1
> make[1]: *** [libltree.a] Fehler 1
> make[1]: Leaving directory
> `/usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree'
>
> I still have to live with the attached patch, which will give then:
>
> make[1]: Entering directory
> `/usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree'
> dlltool --export-all --output-def ltree.def ltree_io.o ltree_op.o
> lquery_op.o _ltree_op.o crc32.o ltxtquery_io.o ltxtquery_op.o
> ltree_gist.o _ltree_gist.o
> dllwrap -o ltree.dll --dllname ltree.dll --def ltree.def ltree_io.o
> ltree_op.o lquery_op.o _ltree_op.o crc32.o ltxtquery_io.o ltxtquery_op.o
> ltree_gist.o _ltree_gist.o ../../src/utils/dllinit.o -L../
> ../src/port -L/usr/local/lib -L../../src/backend -lpostgres -lpgport
> dlltool --dllname ltree.dll --def ltree.def --output-lib libltree.a
> make[1]: Leaving directory
> `/usr/src/postgresql/postgresql-8.0.0cvs/contrib/ltree'
>
> make -C src ok
> make -C contrib ok
>
> make check MAX_CONNECTIONS=5 ...
> hangs as reported today in parallel schedule of create_misc.
>
> INSERT INTO iportaltest (i, d, p)
> VALUES (2, 89.05, '(4.0,2.0),(3.0,1.0)'::polygon);
> hangs ... until
> Cancel request sent
> FATAL: terminating connection due to administrator command
>
> I'll investigate why.
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/

> --- postgresql-8.0.0cvs/src/Makefile.shlib.orig 2004-09-03 01:06:43.000000000 +0200
> +++ postgresql-8.0.0cvs/src/Makefile.shlib 2004-10-04 12:39:15.000000000 +0200
> @@ -216,6 +216,7 @@
>
> ifeq ($(PORTNAME), cygwin)
> shlib = $(NAME)$(DLSUFFIX)
> + SHLIB_LINK += -lpgport
> endif
>
> ifeq ($(PORTNAME), win32)
>

>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 533 bytes

From: Reini Urban <rurban(at)x-ray(dot)at>
To:
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: more dirmod CYGWIN
Date: 2004-10-13 12:28:44
Message-ID: 416D1F7C.7060809@x-ray.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Bruce Momjian schrieb:
> I have added the attached patch to allow Cygwin /contrib compiles. I am
> a little confused why Cygwin requires -lpgport and no other platform
> does, but it is in the Cygwin-specific section so we can always improve
> it later if we find the cause.

thanks. duplicate does not harm.
I tell you when I'll find the real culprit.
I thought I knew it last month, but the LDFLAGS / LIBS issue
(adding all libs to LDFLAGS) is already fixed now.

> Index: src/Makefile.shlib
> ===================================================================
> RCS file: /cvsroot/pgsql/src/Makefile.shlib,v
> retrieving revision 1.83
> diff -c -c -r1.83 Makefile.shlib
> *** src/Makefile.shlib 13 Oct 2004 09:51:47 -0000 1.83
> --- src/Makefile.shlib 13 Oct 2004 10:17:36 -0000
> ***************
> *** 216,221 ****
> --- 216,223 ----
>
> ifeq ($(PORTNAME), cygwin)
> shlib = $(NAME)$(DLSUFFIX)
> + # needed for /contrib modules, not sure why
> + SHLIB_LINK += -lpgport
> endif
>
> ifeq ($(PORTNAME), win32)

--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/