Re: more dirmod CYGWIN

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
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2004-10-13 11:51:57 Re: plans for bitmap indexes?
Previous Message Zeugswetter Andreas DAZ SD 2004-10-13 08:24:07 Re: plans for bitmap indexes?

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2004-10-13 10:36:22 Re: pg_ctl: WIN32 for CYGWIN also (services)
Previous Message Bruce Momjian 2004-10-13 10:05:23 Re: building and linking C user defined functions

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-10-13 10:36:22 Re: pg_ctl: WIN32 for CYGWIN also (services)
Previous Message Bruce Momjian 2004-10-13 09:51:36 Re: [pgsql-hackers-win32] Static build of libpq fails