
I get the following error when building beta 1 on CYGWIN_NT-5.1 PC9
1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown:

make[3]: Entering directory
`/usr/local/src/postgresql-7.3b1/src/backend/utils/mb/conversion_procs/c
yrillic_and_mic'
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations
-I../../../../../../src/include -I/usr/local/include -DBUILDING_DLL=1
-c -o cyrillic_and_mic.o cyrillic_and_mic.c
dlltool --export-all --output-def cyrillic_and_mic.def
cyrillic_and_mic.o
dllwrap -o cyrillic_and_mic.dll --dllname cyrillic_and_mic.dll --def
cyrillic_and_mic.def cyrillic_and_mic.o
../../../../../../src/utils/dllinit.o -lcygipc -lcrypt -L/usr/local/lib
-L../../../../../../src/backend -lpostgres
Warning: resolving _CurrentMemoryContext by linking to
__imp__CurrentMemoryContext (auto-import)
fu000001.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
fu000002.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
fu000003.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
fu000004.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
fu000005.o(.idata$3+0xc): undefined reference to `libpostgres_a_iname'
fu000006.o(.idata$3+0xc): more undefined references to
`libpostgres_a_iname' follow
nmth000000.o(.idata$4+0x0): undefined reference to
`_nm__CurrentMemoryContext'
collect2: ld returned 1 exit status
dllwrap: gcc exited with status 1
make[3]: *** [cyrillic_and_mic.dll] Error 1
make[3]: Leaving directory
`/usr/local/src/postgresql-7.3b1/src/backend/utils/mb
/conversion_procs/cyrillic_and_mic'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/usr/local/src/postgresql-7.3b1/src/backend/utils/mb
/conversion_procs'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/local/src/postgresql-7.3b1/src'
make: *** [all] Error 2
PC9 $

Regards, Dave

Thu, 5 Sep 2002 12:54:50 +0100
"Dave Page" <dpage@vale-housing.co.uk>
7.3 Beta 1 Build Error on Cygwin
The following build error under Cygwin was recently reported:

On Thu, Sep 05, 2002 at 12:54:50PM +0100, Dave Page wrote:
> I get the following error when building beta 1 on CYGWIN_NT-5.1 PC9
> 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown:
> 
> make[3]: Entering directory `/usr/local/src/postgresql-7.3b1/src/backend/utils/mb/conversion_procs/cyrillic_and_mic'
> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../../../src/include -I/usr/local/include -DBUILDING_DLL=1 -c -o cyrillic_and_mic.o cyrillic_and_mic.c
> [snip]
> dllwrap -o cyrillic_and_mic.dll --dllname cyrillic_and_mic.dll --def cyrillic_and_mic.def cyrillic_and_mic.o ../../../../../../src/utils/dllinit.o -lcygipc -lcrypt -L/usr/local/lib -L../../../../../../src/backend -lpostgres
> Warning: resolving _CurrentMemoryContext by linking to __imp__CurrentMemoryContext (auto-import)
> [snip]
> nmth000000.o(.idata$4+0x0): undefined reference to `_nm__CurrentMemoryContext'

The first patch fixes the above, the second one fixes the following:

make[4]: Entering directory `/home/jt/src/pgsql/src/pl/plpgsql/src'
[snip]
dllwrap -o plpgsql.dll --dllname plpgsql.dll --def plpgsql.def pl_gram.o pl_scan.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o ../../../../src/utils/dllinit.o -L../../../../src/backend -lpostgres -lcygipc -lcrypt -L/usr/local/lib
Warning: resolving _InterruptPending by linking to __imp__InterruptPending (auto-import)
Warning: resolving _SortMem by linking to __imp__SortMem (auto-import)
[snip]
nmth000000.o(.idata$4+0x0): undefined reference to `_nm__InterruptPending'
nmth000002.o(.idata$4+0x0): undefined reference to `_nm__SortMem'

After applying these patches, PostgreSQL CVS builds cleanly under Cygwin
again.

Thanks,
Jason

P.S. Dave, thanks for the heads up!
Thu, 05 Sep 2002 11:19:15 -0400
Jason Tishler <jason@tishler.net>
Re: [CYGWIN] 7.3 Beta 1 Build Error on Cygwin
Dave,

On Thu, Sep 05, 2002 at 12:54:50PM +0100, Dave Page wrote:
> I get the following error when building beta 1 on CYGWIN_NT-5.1 PC9
> 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown:
> 
> make[3]: Entering directory `/usr/local/src/postgresql-7.3b1/src/backend/utils/mb/conversion_procs/cyrillic_and_mic'
> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../../../src/include -I/usr/local/include -DBUILDING_DLL=1 -c -o cyrillic_and_mic.o cyrillic_and_mic.c
> [snip]
> dllwrap -o cyrillic_and_mic.dll --dllname cyrillic_and_mic.dll --def cyrillic_and_mic.def cyrillic_and_mic.o ../../../../../../src/utils/dllinit.o -lcygipc -lcrypt -L/usr/local/lib -L../../../../../../src/backend -lpostgres
> Warning: resolving _CurrentMemoryContext by linking to __imp__CurrentMemoryContext (auto-import)
> [snip]
> nmth000000.o(.idata$4+0x0): undefined reference to `_nm__CurrentMemoryContext'

I just submitted a patch to pgsql-patches to fix the above and to add a
couple of missing DLLIMPORTs to src/include/miscadmin.h.

FYI, plperl no longer builds cleanly against Cygwin Perl 5.6.1 because
PostgreSQL no longer uses the Perl extension infrastructure.  However,
upgrading Cygwin Perl to 5.8.0 solves the problem because this version
uses the conventional name for libperl.a instead of one that has the
version embedded in it.

Thanks again for the heads up.

Jason

Thu, 05 Sep 2002 11:29:50 -0400
Jason Tishler <jason@tishler.net>
Re: 7.3 Beta 1 Build Error on Cygwin
Dave Page writes:

> I get the following error when building beta 1 on CYGWIN_NT-5.1 PC9
> 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown:

Should all be fixed now.

-- 
Peter Eisentraut   peter_e@gmx.net


Thu, 5 Sep 2002 20:33:20 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: [HACKERS] 7.3 Beta 1 Build Error on Cygwin

Your changes have been applied by Peter.

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

Jason Tishler wrote:
> The following build error under Cygwin was recently reported:
> 
> On Thu, Sep 05, 2002 at 12:54:50PM +0100, Dave Page wrote:
> > I get the following error when building beta 1 on CYGWIN_NT-5.1 PC9
> > 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown:
> > 
> > make[3]: Entering directory `/usr/local/src/postgresql-7.3b1/src/backend/utils/mb/conversion_procs/cyrillic_and_mic'
> > gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../../../src/include -I/usr/local/include -DBUILDING_DLL=1 -c -o cyrillic_and_mic.o cyrillic_and_mic.c
> > [snip]
> > dllwrap -o cyrillic_and_mic.dll --dllname cyrillic_and_mic.dll --def cyrillic_and_mic.def cyrillic_and_mic.o ../../../../../../src/utils/dllinit.o -lcygipc -lcrypt -L/usr/local/lib -L../../../../../../src/backend -lpostgres
> > Warning: resolving _CurrentMemoryContext by linking to __imp__CurrentMemoryContext (auto-import)
> > [snip]
> > nmth000000.o(.idata$4+0x0): undefined reference to `_nm__CurrentMemoryContext'
> 
> The first patch fixes the above, the second one fixes the following:
> 
> make[4]: Entering directory `/home/jt/src/pgsql/src/pl/plpgsql/src'
> [snip]
> dllwrap -o plpgsql.dll --dllname plpgsql.dll --def plpgsql.def pl_gram.o pl_scan.o pl_handler.o pl_comp.o pl_exec.o pl_funcs.o ../../../../src/utils/dllinit.o -L../../../../src/backend -lpostgres -lcygipc -lcrypt -L/usr/local/lib
> Warning: resolving _InterruptPending by linking to __imp__InterruptPending (auto-import)
> Warning: resolving _SortMem by linking to __imp__SortMem (auto-import)
> [snip]
> nmth000000.o(.idata$4+0x0): undefined reference to `_nm__InterruptPending'
> nmth000002.o(.idata$4+0x0): undefined reference to `_nm__SortMem'
> 
> After applying these patches, PostgreSQL CVS builds cleanly under Cygwin
> again.
> 
> Thanks,
> Jason
> 
> P.S. Dave, thanks for the heads up!

[ Attachment, skipping... ]

[ Attachment, skipping... ]

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

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

Thu, 5 Sep 2002 14:43:14 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: [CYGWIN] 7.3 Beta 1 Build Error on Cygwin
Jason Tishler wrote:
> Peter,
> 
> On Thu, Sep 05, 2002 at 08:33:20PM +0200, Peter Eisentraut wrote:
> > Dave Page writes:
> > 
> > > I get the following error when building beta 1 on CYGWIN_NT-5.1 PC9
> > > 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown:
> > 
> > Should all be fixed now.
> 
> Huh?  I don't see any recent CVS commits to indicate this.

I see as a commit:

        Assorted fixes for Cygwin:
        
        Eliminate the mysterious games that the Cygwin build plays with the linker
        flag variables.  DLLLIBS is gone, use SHLIB_LINK like everyone else.
        Detect cygipc in configure, after the linker flags are set up, otherwise
        configure might not work at all.
        
        Make sure everything is covered by make clean.
        
        Fix the build of the new conversion procedure modules.
        
        Add new DLLIMPORT markers where required.
        
        Finally, the compiler complains if we use an explicit
        -I/usr/local/include, so don't do that.  Curiously, -L/usr/local/lib is
        still necessary.

I assume it was in there.

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

Thu, 5 Sep 2002 14:51:31 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] 7.3 Beta 1 Build Error on Cygwin
Peter,

On Thu, Sep 05, 2002 at 08:33:20PM +0200, Peter Eisentraut wrote:
> Dave Page writes:
> 
> > I get the following error when building beta 1 on CYGWIN_NT-5.1 PC9
> > 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown:
> 
> Should all be fixed now.

Huh?  I don't see any recent CVS commits to indicate this.

Jason

Thu, 05 Sep 2002 14:51:33 -0400
Jason Tishler <jason@tishler.net>
Re: [HACKERS] 7.3 Beta 1 Build Error on Cygwin
Peter,

On Thu, Sep 05, 2002 at 02:51:31PM -0400, Bruce Momjian wrote:
> Jason Tishler wrote:
> > On Thu, Sep 05, 2002 at 08:33:20PM +0200, Peter Eisentraut wrote:
> > > Should all be fixed now.
> > 
> > Huh?  I don't see any recent CVS commits to indicate this.
> 
> I see as a commit:
> 
> [snip]
> 
> I assume it was in there.

Sorry for the noise, but at the time:

    cvs status include/miscadmin.h makefiles/Makefile.win

did *not* indicate any recent commits.  Maybe you sent the above email
before you committed your changes?

Anyway, I just tried a:

    make distclean
    rm include/miscadmin.h makefiles/Makefile.win # remove my patch
    cvs update
    make

and got the following error:

    [snip]
    make[3]: Leaving directory `/home/jt/src/pgsql/src/backend/utils'
    dlltool --dllname postgres.exe --output-exp postgres.exp --def postgres.def
    gcc -L/usr/local/lib  -o postgres.exe -Wl,--base-file,postgres.base postgres.exp access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o parser/SUBSYS.o commands/SUBSYS.o executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o nodes/SUBSYS.o optimizer/SUBSYS.o port/SUBSYS.o postmaster/SUBSYS.o regex/SUBSYS.o rewrite/SUBSYS.o storage/SUBSYS.o tcop/SUBSYS.o utils/SUBSYS.o 
    libpq/SUBSYS.o(.text+0x1c84):crypt.c: undefined reference to `crypt'
    port/SUBSYS.o(.text+0x262):pg_sema.c: undefined reference to `semget'
    [snip]

I can get postgres.exe to successfully link by manually appending
"-lcrypt -lcygipc" to the end of the above gcc command line.

Since you are already working on this, would you be willing to fix this
problem?

Thanks,
Jason

Thu, 05 Sep 2002 15:37:57 -0400
Jason Tishler <jason@tishler.net>
Re: [HACKERS] 7.3 Beta 1 Build Error on Cygwin