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

Re: Compiling cvs code with Cygwin problems

From: Jason Tishler <jason(at)tishler(dot)net>
To: "Francisco Figueiredo Jr(dot)" <fxjrlists(at)yahoo(dot)com(dot)br>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Compiling cvs code with Cygwin problems
Date: 2003-04-28 16:11:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-cygwin

PostgreSQL CVS no longer builds cleanly under Cygwin -- although, it
does so under Linux (no surprise). :,)  My plate is full right now.  So,
if anyone would like to help fix the Cygwin build, it would be much


On Sun, Apr 27, 2003 at 11:03:49AM -0300, Francisco Figueiredo Jr. wrote:
> I tried to compile 7.4 from cvs and I got some problems:

I just tried it myself.  See my comments in-line, below...

> The first is the <port/win32defs.h> not found. I couldn't find it
> anywhere!

Me neither.

> Where can I find it??

Sorry, but I don't know.

> So I commented it out from the header and it started to compile.

I used the following workaround instead:

    touch src/include/port/win32defs.h

> Later I got linking problems in the ecpg with a lot of unresolved
> references.

I can confirm the above.

> I could get ride of some of them by including some .o from pgtypeslib
> dir in the OBJS of Makefile,

I didn't try the above (yet).

> but it still gives me this error:
> ================
> make -C ecpglib all
> make[1]: Entering directory `/home/voidmain/PostgresqlCVS/pgsql/src/interfaces/ecpgold/ecpglib'
> dlltool --export-all --output-def ecpg.def execute.o typename.o ...
> [snip]
> descriptor.o(.text+0x102):descriptor.c: undefined reference to `__imp__sqlca'
> descriptor.o(.text+0x7c6):descriptor.c: undefined reference to `__imp__sqlca'
> data.o(.text+0x3ce):data.c: undefined reference to `__imp__sqlca'
> [snip]
> connect.o(.text+0xaed):connect.c: undefined reference to `_ecpg_compat_mode'
> misc.o(.text+0x1a):misc.c: undefined reference to `__imp__sqlca'
> collect2: ld returned 1 exit status
> dllwrap: gcc exited with status 1

It's just a WAG, but the above smells like missing DLLIMPORTs...

> [snip]
> Until the following line:
> [snip]
> make[4]: Entering directory `/home/voidmain/PostgresqlCVS/pgsql/src/pl/plpgsql/src'
> bison -y -d  gram.y
> NONE:0: /usr/bin/m4: ERROR: EOF in string
> sed -e 's/yy/plpgsql_yy/g' -e 's/YY/PLPGSQL_YY/g' < > ./pl_gram.c
> cannot open no such file
> make[4]: *** [] Error 1

I do not get the above.  However, I get the following instead:

    dllwrap -o plpgsql.dll --dllname plpgsql.dll --def plpgsql.def ...
    fu000001.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__error_context_stack'
    Info: resolving _error_context_stack by linking to __imp__error_context_stack (auto-import)
    collect2: ld returned 1 exit status
    dllwrap: gcc exited with status 1

Sounds like a missing DLLIMPORT again.

> [snip]
> I know this is cvs code and it is subjected to this type of problems.


> I'd like to know if this is the case or it may be some problem of
> cygwin or my setup here.

The errors from the plpgsql part of your build indicates a potential
problem with your Cygwin setup.  Are you running the latest of the
relevant development tools?

Thanks for the heads up regarding the Cygwin build issues.


PGP/GPG Key: or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

In response to


pgsql-cygwin by date

Next:From: Jason TishlerDate: 2003-04-28 16:30:26
Subject: Re: installation problems
Previous:From: pgsqlDate: 2003-04-28 14:39:43
Subject: Re: installation problems

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