public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Making wget
@ 2000-01-26  1:39 Norling, Gunnar
  2000-01-26  7:29 ` Chris Faylor
  2000-01-26 10:37 ` Glenn Spell
  0 siblings, 2 replies; 9+ messages in thread
From: Norling, Gunnar @ 2000-01-26  1:39 UTC (permalink / raw)
  To: cygwin

Hi,
Some days ago there where a discussion involving the wget program. One of
the mails (sorry, I've already deleted it) described the build process for
it. I followed it, but in the end of the process I receive the following
errors:

$ make
:
.
gcc -O2 -Wall -Wno-implicit  -o wget.exe  cmpt.o connect.o fnmatch.o ftp.o
ftp-basi
ers.o host.o html.o http.o init.o log.o main.o md5.o netrc.o rbuf.o recur.o
retr.o
ftp.o(.text+0x848):ftp.c: undefined reference to `h_errno'
ftp.o(.text+0x1378):ftp.c: undefined reference to `h_errno'
ftp.o(.text+0x1808):ftp.c: undefined reference to `h_errno'
http.o(.text+0x750):http.c: undefined reference to `h_errno'
collect2: ld returned 1 exit status
make[1]: *** [wget.exe] Error 1
make[1]: Leaving directory
`/cygdrive/v/Cygnus/cygwin-b20/local/src/wget-1.5.3/src'
make: *** [src] Error 2

For some reason the "h_errno' is not defined. Could there be some problems
with my include libraries. I use a standard installation (using the snapshot
cygwin-inst-20000119.tar.gz), with no include variable set.

In the ftp.c file the following is defined:

---<start snip>---
#include <config.h>

#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_STRING_H
# include <string.h>
#else
# include <strings.h>
#endif
#include <ctype.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include <sys/types.h>
#include <assert.h>
#include <errno.h>

#include "wget.h"
#include "utils.h"
#include "url.h"
#include "rbuf.h"
#include "retr.h"
#include "ftp.h"
#include "html.h"
#include "connect.h"
#include "host.h"
#include "fnmatch.h"
#include "netrc.h"

#ifndef errno
extern int errno;
#endif
#ifndef h_errno
extern int h_errno;
#endif
---<end snip>---



This is my versions:
gcc --version: 2.95.2
uname -a: CYGWIN_NT-4.0 <machine> 1.1.0(0.16/3/2) 2000-01-20 00:22:41 i686
unknown




/Gunnar Norling 

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Making wget
@ 2000-01-26  8:47 David Robinow
  2000-01-26 10:22 ` Chris Faylor
  0 siblings, 1 reply; 9+ messages in thread
From: David Robinow @ 2000-01-26  8:47 UTC (permalink / raw)
  To: cygwin

--- Chris Faylor <cgf@cygnus.com> wrote:
> On Wed, Jan 26, 2000 at 09:38:59AM -0000, Norling,
> Gunnar wrote:
> >Some days ago there where a discussion involving
> the wget program. ...

> Why not just download one of the prebuilt
> versions???
 I find this strange, especially considering the
source.  Isn't Cygwin supposed to be a development
environment?

 As I reported Monday
./configure; make
worked for me. (make install did not but I don't
expect that)

I'm running gcc-2.95 with the 1/15/99 snapshot on NT 4.0
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: Making wget
@ 2000-01-26 12:31 David Robinow
  0 siblings, 0 replies; 9+ messages in thread
From: David Robinow @ 2000-01-26 12:31 UTC (permalink / raw)
  To: cygwin

--- Glenn Spell <glenn@gs.fay.nc.us> wrote:
> On 26 Jan 2000 around 9:38AM (-0000) Norling,
> Gunnar wrote:
> > Some days ago there where a discussion involving
> the wget program.
> >
> > ftp.o(.text+0x848):ftp.c: undefined reference to
> `h_errno'
> > http.o(.text+0x750):http.c: undefined reference to
> `h_errno'
> >
> > This is my versions:
> > gcc --version: 2.95.2
> > uname -a: CYGWIN_NT-4.0 <machine> 1.1.0(0.16/3/2)
> 2000-01-20
> > 00:22:41 i686 unknown
> 
> I get the same results. I'm using gcc-2.95 with the
> 1999-12-05
> dll (the newer dlls crash on me) on Win95.
> 
> The following patch worked for me. I gleaned the
> information
> from /usr/include/netdb.h.
> 
> I have no idea why this is necessary for some and
> not for others.
> 
 I've investigated a bit. Later snapshots have the
line
     h_errno DATA
in winsup.din, whereas 19990115 snapshot has
     h_errno

 I don't know what this means, but I'm guessing it has
something to do with why it seems to link with the old
snapshot but not the newer ones.
 Although the program seems to work for me, I haven't
tested it enough to tell if the part of the code that
uses h_errno is broken (i.e. links but doesn't work)
or not.
  Apparently Glenn's patch solves the problem, but I'm
wondering if this is a case like many old programs
declaring
  int errno
when they should use
 #include <errno.h>

 In other words, perhaps the code should just
 #include <netdb.h>

(Note that the last few lines above are off-topic for
Cygwin)

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2000-01-26 20:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-26  1:39 Making wget Norling, Gunnar
2000-01-26  7:29 ` Chris Faylor
2000-01-26 10:37 ` Glenn Spell
2000-01-26 16:18   ` Using h_errno, errno etc Cygwin DLL globals [Re: Making wget] Mumit Khan
2000-01-26 17:27     ` Chris Faylor
2000-01-26 20:14       ` Mumit Khan
2000-01-26  8:47 Making wget David Robinow
2000-01-26 10:22 ` Chris Faylor
2000-01-26 12:31 David Robinow

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).