* postgres link failure on cygwin 1.0
@ 2000-02-28 8:30 Kyle Downey
2000-02-28 9:37 ` Mumit Khan
0 siblings, 1 reply; 2+ messages in thread
From: Kyle Downey @ 2000-02-28 8:30 UTC (permalink / raw)
To: cygwin
I'm getting a link failure looking for _sys_nerr (from errno.h) when compiling
postgresql 6.5.3 on cygwin 1.0 (CD distro, unmodified except for addition of
the CWilson /usr/local and cygipc 1.05 distros. I have notified the maintainer
about this, but since he says in the docs it compiles on b20.1, I wanted to
see if it was just a Cygwin b20.1 -> 1.0 change, esp. because it's a system
call that's missing. I may just have to add a library that I don't know
about.
What puzzles me is that _sys_nerr is defined in libcgywin.dll, which is being
linked against:
dlltool --dllname postgres.exe --output-exp postgres.exp --def postgres.def
gcc -g -o postgres.exe -Wl,--base-file,postgres.base postgres.exp
access/SUBSYS.o bootstrap/SUBSYS.o catalog/SUBSYS.o commands/SUBSYS.o
executor/SUBSYS.o lib/SUBSYS.o libpq/SUBSYS.o main/SUBSYS.o parser/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
./utils/version.o -L/usr/local/lib
-lcygipc -lcrypt -lcygwin -lkernel32 -lcrtdll
utils/SUBSYS.o: In function `EncodeTimeSpan':
/cygdrive/c/postgresql-6.5.3/src/backend/utils/adt/dt.c:4511: undefined
reference to `_sys_nerr'
/cygdrive/c/postgresql-6.5.3/src/backend/utils/adt/dt.c:4511: undefined
reference to `_sys_nerr'
collect2: ld returned 1 exit status
make[1]: *** [postgres] Error 1
Any ideas? I'd really like to clear this up. I plan to post a HOWTO and binary
for postgresql 6.5.3 on cygwin 1.0 when done.
regards,
kd
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: postgres link failure on cygwin 1.0
2000-02-28 8:30 postgres link failure on cygwin 1.0 Kyle Downey
@ 2000-02-28 9:37 ` Mumit Khan
0 siblings, 0 replies; 2+ messages in thread
From: Mumit Khan @ 2000-02-28 9:37 UTC (permalink / raw)
To: Kyle Downey; +Cc: cygwin
Kyle Downey <kyle.downey@amberarcher.com> writes:
> I'm getting a link failure looking for _sys_nerr (from errno.h) when compilin
> g
> postgresql 6.5.3 on cygwin 1.0 (CD distro, unmodified except for addition of
> the CWilson /usr/local and cygipc 1.05 distros. I have notified the maintaine
> r
> about this, but since he says in the docs it compiles on b20.1, I wanted to
> see if it was just a Cygwin b20.1 -> 1.0 change, esp. because it's a system
> call that's missing. I may just have to add a library that I don't know
> about.
>
> What puzzles me is that _sys_nerr is defined in libcgywin.dll, which is being
> linked against:
You've probably fallen into the trap of *declaring* _sys_nerr as an
external variable without importing it from the DLL.
Check for the following in your code:
extern int _sys_nerr;
which is incorrect. Remove that and use the definition from <errno.h>,
which is:
extern int _sys_nerr __declspec(dllimport);
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-02-28 9:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-28 8:30 postgres link failure on cygwin 1.0 Kyle Downey
2000-02-28 9:37 ` Mumit Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).