RE: Build Trouble

Followup: one further step I took to get around the problem that I (tried
to, did I succeed?) posted on below was to use an #ifdef at the bottom of
HTFile_irent_buf_size
to avoid the use of struct dirent if WIN32 was defined - instead using...

  return (sizeof(DIR) + name_max + 1);

The next problem behind that one was an inability to find expat.h, which
was easily enough solved by adding ..\..\..\modules\expat\lib to the
list of include folders in the wwwfiles project settings. That led to a
problem in c:\program files\microsoft visual studio\vc98\include\excpt.h
with _WIN32 not being defined in the same project file, though WIN32 was
defined (also easily solved in the project settings). Then there
was a problem with not having a processor architecture defined (solved by
defining _M_IX86 in the project), followed by a problem not
having RPC_IF_CALLBACK_FN defined in windll.c of the wwwfile.c, which could
*not* be resolved by adding #include <rpc.h> . So I am
stuck there.

I have been using the VC6 platform SDK for this wor, but switching to use
the Microsoft Platform SDK for Windows XP SP2 did not help.

It seems there is some basic problem with the instructions for building
libwww on Windows as it currently exists in CVS. I am suspicious of
the step in the build instructions (http://www.w3.org/INSTALL.html#Windows)
that tell you to merge a ZIP file
from ftp://ftp.w3.org/pub/libwww/libwww-win32.zip  containing MSVC project
files into
what you check out from CVS; perhaps the last available ZIP does not match
what's in CVS now? Or possibly there are problems coming
about from running (and after merging project files, re-running) the Perl
script to configure libwww for Windows, using the most recent
Perl versions. I am using Strawberry Perl 5.10.1 .

When is the last known successfully buildable tag in the CVS repository for
Windows that should work when following these build instructions ?

Thanks,

Glenn


__________________

While trying to rebuild the current CVS state of libwww with MSVC6SP6, I
saw the DIR problems referenced in this thread, but wanted to clarify the
solution that worked for me
(and report other problems coming up afterwards).

First, the file to change is wwwsys.h, not wwwysy.h . Second, there is more
than one #ifdef WWW_MSWINDOWS in the file; the change should go under the
first one.

Original message:
http://lists.w3.org/Archives/Public/www-lib/2009JanMar/0001.html

There was another problem right after resolving this one - "buffer size for
readdir_r cannot be determined" in the implementation of
HTFile_irent_buf_size in
 library\src\HTFile.c.  I tried to resolve that by simply setting name_max
to 256 as a practical maximum path length (as the code just above it does),
instead of
raising the error  (following the suggestion  here:
http://lists.w3.org/Archives/Public/www-lib/2006JanMar/0013.html ) .  But
then the final line of this function
also caused two problems on Windows: 1)  offsetof was not defined (cured by
adding #include stddef.h just above the function); 2) offsetof doesn't know
about 'struct dirent' which is not implemented under MSVC. It appears this
code has never been working on Windows.

Web mailing list posting suggested that this function does not seem
currently to be used by code anwhere else in the library, so you could move
past the problem by ignoring it,  commenting the whole function out.
That did not work. The wwwfile project requires the function at link time.

My ultimate ambition here is to be able to rebuild the library with
Microsoft Visual Studio.NET 2008, but I'm just following the original
install instructions carefully for now. Has anyone had success
with the newer  version of the Microsoft compiler?

Glenn Picher
DeskNet Inc.

=====

From: Sinha, Raj (Raj) <rajsinha@avaya.com>
Date: Sat, 14 Mar 2009 05:51:50 -0400
Message-ID:
<A4D36489ED316642BDCD63B144B613A40307E2E8@300815ANEX3.global.avaya.com>
To: "DootDog" <wdoutre@cs.brown.edu>, <www-lib@w3.org>
This seems to have resolved the build error
#define DIR WIN32_FIND_DATA

In wwwysy.h
Under
#ifdef WWW_MSWINDOWS

-----Original Message-----
From: www-lib-request@w3.org [mailto:www-lib-request@w3.org] On Behalf
Of DootDog
Sent: Thursday, March 12, 2009 6:43 PM
To: www-lib@w3.org
Subject: Re: Build Trouble


I've run into this same problem.  Was anybody able to solve it?  I've
searched through the files and can't find DIR defined anywhere.


Will Amrull wrote:
>
> Hi, I am trying to build libw3 using the latest CVS and MSVC files,
but I
> am
> encountering a problem which causes about 85% of the project builds to
> fail.
>
> The problem seems to center around HTFile.h Line 102 :
> extern size_t HTFile_dirent_buf_size(DIR * dirp);
>
> These are the errors I receieve:
> \libwww\Library\src\HTFile.h(102) : error C2143: syntax error :
missing
> ')'
> before '*'
> \libwww\Library\src\HTFile.h(102) : error C2143: syntax error :
missing
> '{'
> before '*'
> \libwww\Library\src\HTFile.h(102) : error C2059: syntax error : ')'
>
> This error happens over and over and over as I try a bach build and I
> can't
> figure out what the problem is..
>
> Any help would be greatly appreciated.
>
>

Received on Thursday, 21 January 2010 13:50:53 UTC