Hi Hrvoje,

Thanks for the detailed report!

Thanks for your detailed answer ;-)

Jens Schleusener <[EMAIL PROTECTED]> writes:

1) Only using the configure-option "--disable-nls" and the C compiler
gcc 4.0.0 the wget-binary builds successfully

I'd be interested in seeing the error log without --disable-nls and/or
with the system compiler.

I will send that logs to your personal mail-address.

although gcc outputs
some compiler warnings like

  convert.c: In function 'convert_all_links':
  convert.c:95: warning: incompatible implicit declaration of built-in
                         function 'alloca'

The alloca-declaring magic in config-post.h (taken from the Autoconf
manual) apparently doesn't take into account that GCC wants alloca
declared too.

But simply calling the new wget like

  wget http://www.example.com/

I got always errors like

  --12:36:51--  http://www.example.com/
            => `index.html'
Resolving www.example.com... failed: Invalid flags in hints.

This is really bad.  Apparently your version of getaddrinfo is broken
or Wget is using it incorrectly.  Can you intuit which flags cause the
problem?  Depending on the circumstances, Wget uses AI_ADDRCONFIG,
AI_PASSIVE, and/or AI_NUMERICHOST.

Yes, all three seems defined, probably via /usr/include/netdb.h. Here an extract of that file:

/* Flag definitions for addrinfo hints in protocol-independent name/addr/service service. RFC2133 */
/* Also flag definitions for getipnodebyname  RFC 2553  */
#define AI_CANONNAME    0x01    /* canonical name to be included in return */
#define AI_PASSIVE      0x02    /* prepare return for call to bind() */
#define AI_NUMERICHOST  0x04    /* RFC 2553, nodename is a numeric host
                                   address string */
#define AI_ADDRCONFIG   0x08    /* RFC 2553, source address family configured */
#define AI_V4MAPPED     0x10    /* RFC 2553, accept v4 mapped addresses */
#define AI_ALL          0x20    /* RFC 2553, accept all addresses */
#define AI_DEFAULT      (AI_V4MAPPED | AI_ADDRCONFIG)     /* RFC 2553 */

But I have no idea were the error message "Invalid flags in hints" comes from. Directly from wget (probably not) or from system resolver routines?

After some testing I found that using the additional
configure-option "--disable-ipv6" solves that problem.

Because it disables IPv6 (and therefore the use of getaddrinfo)
altogether.

Ok, that was not clear to me.

2) Using the additional configure-option "--with-ssl=/usr/local/contrib"
fails although the openssl (0.9.7g) header files are installed under
"/usr/local/contrib/include/openssl/" and the libssl.a under
"/usr/local/contrib/lib/".

This is not a standard layout, so the configure script is having
problems with it.  The supported layouts are one of:

* No flags are needed, the includes are found without -I<includedir>,
 and the library gets linked in without the need for -L<libdir>.

* The library is installed in $root, which means that includes are in
 $root/include and the libraries in $root/lib.  OpenSSL's own default
 for $root is /usr/local/ssl, which Wget checks for.

To resolve situations like this, Wget should probably support
specifying additional include and library directories separately.
I believe you can work around this by specifying:

./configure CPPFLAGS=-I/usr/local/contrib/include -L/usr/local/contrib/lib

Can you check if that works for you?

That doesn't works (typo ?) better seems

./configure CPPFLAGS=-I/usr/local/contrib/include
            LDFLAGS=-L/usr/local/contrib/lib

but that also doesn't solve the described problem.

Also the configure option

  --with-ssl[=SSL-ROOT]

respectively in my case

  --with-ssl=/usr/local/contrib

should probably do that job.

After long trial and error testing I have the impression that the "configure"-script has an error. If I change for e.g. at line 25771

   { ac_try='test -s conftest.$ac_objext'

into

   { ac_try='test -s .libs/conftest.$ac_objext'

the generated test object file will now be found. Therefore also my openssl-installation will be found and compiled successfully into wget.

3) Using the native IBM C compiler (CC=cc) instead GNU gcc I got the
compile error

  cc -qlanglvl=ansi -I. -I. -I/opt/include   -DHAVE_CONFIG_H
  -DSYSTEM_WGETRC=\"/usr/local/contrib/etc/wgetrc\"
  -DLOCALEDIR=\"/usr/local/contrib/share/locale\" -O -c main.c
  "main.c", line 147.16: 1506-275 (S) Unexpected text ',' encountered.

Simply changing line 147 of src/main.c from

   OPT__PARENT,

to

   OPT__PARENT

let the compile error vanish (sorry, I am not a C expert).
[...]

It's a newer C feature that leaked into Wget -- sorry about that.

I'll try to get these fixed in Wget 1.10.1.

Your patch works.

Greetings

Jens

--
Dr. Jens Schleusener            T-Systems Solutions for Research GmbH
Tel: +49 551 709-2493           Bunsenstr.10
Fax: +49 551 709-2169           D-37073 Goettingen
[EMAIL PROTECTED]  http://www.t-systems.com/

Reply via email to