Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] cygwin 8.0.0beta1 postmaster/syslogger.c, port/dirmod.c,

From: Reini Urban <rurban(at)x-ray(dot)at>
To: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: [PATCHES] cygwin 8.0.0beta1 postmaster/syslogger.c, port/dirmod.c,
Date: 2004-08-25 14:13:29
Message-ID: 412C9E89.3030000@x-ray.at (view raw or flat)
Thread:
Lists: pgsql-cygwinpgsql-patches
Attached is my 7.4.5 build script,
not yet converted to the new generic-build-script mechanism.

In order to fix the tcl issues I needed perl.
There are still minor tcl issues, but I'll fix them soon.

There's another short Makefile.cygwin patch to build contrib/dbase 
correctly. Hope this will be accepted (or looked at) upstream.
With the standard order of libs from configure it will fail, because our 
libiconv is shared.
With just the needed libs in the correct order it builds fine:
$ gcc -O2 -fno-strict-aliasing -Wall -Wmissing-prototypes 
-Wmissing-declarations dbf.o dbf2pg.o endian.o -lpq -L../../src/port 
-lpgport -lintl -o dbf2pg

*************************

The first standard regression test attempt (--max-connections=10) failed 
with:

creating template1 database in 
/usr/src/postgresql/postgresql-7.4.5-1/src/test/regress/./tmp_check/data/base/1... 
FATAL:  could not create shared memory segment: Function not implemented
DETAIL:  Failed system call was shmget(key=1, size=1081344, 03600).

Seems to be a cygserver issue. cygserver is running as service.
I'll hunt that down, but looks strange. Seems that I really linked 
against cygipc and so it doesn't use cygserver :(

$ tmp_check/install/usr/bin/initdb -D "tmp_check/data" -L 
tmp_check/install/usr/share/postgresql --debug --no-locale -E Latin1

creating template1 database in tmp_check/data/base/1... DEBUG:  invoking 
IpcMemoryCreate(size=1081344)
FATAL:  could not create shared memory segment: Function not implemented
DETAIL:  Failed system call was shmget(key=1, size=1081344, 03600).


Jason Tishler schrieb:
> On Wed, Aug 25, 2004 at 01:12:46AM +0200, Reini Urban wrote:
> 
>>Jason Tishler schrieb:
>>
>>>On Tue, Aug 24, 2004 at 09:49:51PM +0200, Reini Urban wrote:
>>>
>>>>There's on remaining issue for the cygwin build:
>>>>../../src/port/libpgport.a(dirmod.o)(.text+0x5ee):dirmod.c: undefined 
>>>>reference to `__imp__CurrentMemoryContext'
>>>>../../src/port/libpgport.a(dirmod.o)(.text+0x64b):dirmod.c: undefined 
>>>>reference to `__imp__CurrentMemoryContext'
>>>
>>>Note I have no experience with 8.0 so the following is a WAG...
>>>The above is likely caused by not linking against an import library
>>>(i.e., libpostgres.a).
>>
>>Yes, it is defined in libpostgres.a. Hmm, a cross-dependency problem in 
>>the Makefile. With an added -lpostgres postgres.exe builds fine.
> 
> 
> In previous versions, postgres.exe built fine without -lpostgres.  Other
> components needed to link with libpostgres.a -- not postgres.exe.  As
> you indicated above, seems like there is a cross-dependency issue
> introduced in 8.0.

It's just one simple backend object file, so I'll try to hunt that down 
later. So the developers can fix their Makefile also.

>>But I'll try to add the single object file only where it is defined.
> 
> 
> IMO, linking against libpostgres.a is preferable assuming the
> cross-dependency issue cannot be solved.
> 
> 
>>I also see that it is still linking against cygipc.
>>LIBS=-lintl -lssl -lcrypto -lz -lreadline -lcygipc -lcrypt -lresolv -lm
> 
> 
> The shouldn't happen.  Do you have cygipc installed?  If so, then
> uninstall and try again.  Any better?

That is probably some left-over autoconf issue.

>>Do we still need this?
> 
> AFAICT, no.
> 
> 
>>As I see it, pgsql has its own ipc mechanism.
> Does the above imply that 8.0 will not need the IPC in cygserver?

Looks like so, but I'll check later. First I want to finish 7.4.5 
because of the pending perl problems.

>>Without -lcygipc it also builds fine. ...
> 
> Yes.  For example, 7.4.3 build fine against cygserver.
> 
> 
>>>I'm quite willing to help to ensure a smooth transition and to help
>>>minimize your "pain." :,)  Maybe 8.0 can be a joint effort, with you
>>>taking over fully with 8.0.x or 8.1?
>>
>>Sure, why not?
> 
> 
> Thanks!
> 
> 
>>But I'm also trying to build the 7.4.5 now, because I want to see the
>>changes in the new 8 branch. So you can sit and have a rest. :)
> 
> 
> Thanks again.  I can use the rest. :,)
> 
> 
>>From another thread...
>>
>>>Is "--with-template=cygwin" required?  It wasn't before.
>>
>>Yes, this is apparently new for 8.x.
> 
> 
> OK, I was just surprised that configure didn't automatically detect the
> platform.
> 
> 
>>And it does help to be precise in the configure line.
> 
> 
> Precise is good -- redundant is not necessarily good.
> 
> 
>>BTW: I will convert your build.sh to the cygwin generic-build-script
>>system. This is much easier.
> 
> 
> OK.
> 
> 
>>>Does "--with-tcl" no longer build cleanly?
>>
>>This wasn't in your 7.4.3 build.sh included and I didn't install the 
>>tcl/tk sources (only under my perltk tree).
> 
> 
> Sorry, for the above.  I temporarily forgot that Cygwin PostgreSQL has
> TCL issues.
> 
> 
>>But I can have a try.
> 
> 
> OK, but IMO I would address the other issues first since Cygwin
> PostgreSQL never supported TCL in the past.  BTW, check the archives,
> Patrick Samson and I have made some progress in the past.
> 
> 
>>I have tclsh, the headers and the libs, just a tclConfig.sh script is 
>>missing from the cygwin build. Should not be that hard. All the libs and 
>>includes are at the standard paths.
> 
> 
> It may be harder than anticipated -- remember the Cygwin Tcl/Tk package
> is really a native Win32 package not a Cygwin one... :,(
> 
> 
>>I'll finish the 8.0.0-beta1 port to cygwin,
> 
> 
> Thanks.
> 
> 
>>and post to the patches list then the cumulative patches
> 
> 
> Sounds good.
> 
> 
>>Questions to pgsql-hackers or pgsql-cygwin?
> 
> 
> Depends on the question. :,)
> 
> 
>>The 8.x build is almost okay now. Just a remaining libreadline issue in 
>>src/bin/psql/tab-complete.c
>>And testing.
> 
> 
> Let me know how is goes.

Uh, this was my old readline lib leftover in /usr/local/lib
It builds fine now.

>>And sockets would also be fine.
>>$ postgresql-8.0.0beta1-1/src/backend/postgres.exe
>>FATAL:  unrecognized configuration parameter "tcpip_socket"
> 
> 
> See the following:
> 
>     http://archives.postgresql.org/pgsql-general/2004-08/msg01181.php

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

Attachment: build.sh
Description: text/plain (3.8 KB)

In response to

Responses

pgsql-cygwin by date

Next:From: Jason TishlerDate: 2004-08-25 17:16:59
Subject: Re: [PATCHES] cygwin 8.0.0beta1 postmaster/syslogger.c, port/dirmod.c,
Previous:From: Jason TishlerDate: 2004-08-25 12:05:44
Subject: Re: [PATCHES] cygwin 8.0.0beta1 postmaster/syslogger.c, port/dirmod.c, timezone/pgtz.c

pgsql-patches by date

Next:From: Jason TishlerDate: 2004-08-25 17:16:59
Subject: Re: [PATCHES] cygwin 8.0.0beta1 postmaster/syslogger.c, port/dirmod.c,
Previous:From: Serguei MokhovDate: 2004-08-25 13:36:32
Subject: Translation updates for 8.0: initdb-ru, pg_dump-ru, psql-ru

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group