W3C libwww

Getting Libwww from the github Repository

git allows YOU to follow the development of libwww and its sample applications closely and to contribute with patches and new features.

The following requires that you are familiar with git - if not then google up some git tutorials. Libwww's git repository is stored on github. You don't need a github account to access it.


Libwww Releases

The git repository allows you to use the very latest version of libwww - as soon as a fix or a new feature is commited to the git repository then you can update your working version and you will have it right away.

The purpose of releases is to say that now we believe that the code is stable with a well defined set of features. Until now, we have been giving out distribution files every time we announced a release. This will not change, but you can use the libwww git repository in exactly the same way - often with much less overhead than dealing with a distribution package.

Note: During the migration to github from cvs, we didn't preserve any of the release tags. If you want to see them, check the libwww CVS repository.

Getting the code

You will first need to make sure your system has a git client. You can then retrieve libwww as follows:

% git clone https://github.com/w3c/libwww.git

After which you will get all the code coming at you, you'd better have at least 10MBytes available on your machine. Now you are ready to getting boot strapped.

Getting Bootstrapped

When compiling directly from the git repository there are a few steps you have to go through which are already done if compiling from a distribution package. Follow these three steps:

  1. Generate include files
  2. Unix only: generate make files
  3. Configure and compile libwww

1. Generate Include Files (Windows & Unix)

On both Windows and Unix you can generate the *.h files and the *.def files by running a Perl script provided by Eric Prud'hommeaux. Never mind that it gives a few warnings when it runs - they are all OK. It requires that you have a recent version of Perl on your machine. Run the script like this (note the explicit use of the Perl interpreter):

% cd libwww
% perl config/winConfigure.pl

Windows people are now done and can jump directly to the instructions for how to compile libwww for Windows. On Unix, you need some more...

2. Generate Makefile (Unix only)

On Unix you MUST have the following GNU tools installed in order to continue. Check that you have the following programs with the correct version number:

gcc and GNU make
Automake relies on features provided by gcc and GNU make that don't come with other compilers and makes. When compiling directly from the git repository you MUST use these gcc and gmake.
GNU automake (version 1.4 or later)
Automake is a tool for automatically generating Makefile.in's which are used by autoconf
GNU autoconf (version 2.13 or later, but avoid version 2.14)
A tool for automatically generating Makefile's which are used by make.
GNU libtool (version 1.3.4 or later)
A tool for automatically handling generation of shared libraries. If you upgrade libtool to a new version then you MUST rerun the configure script as some files used by libtool have to be regenerated.

Now generate the make files as follows - don't worry about the warnings produced by autoconf:

% aclocal; autoheader; automake; autoconf

Now you MUST run the configure script as described in the next section on installation instructions.

If when you run the above commands, you get one or more error messages including one that says:

   macro "AM_PROG_LIBTOOL" not found in library

it may mean that libtool and automake are not installed under the same prefix. You will then have to run aclocal as:

   aclocal -I /prefix/of/libtool/share/aclocal

If for some reason you have trouble running the configure script then try and run this command instead

% make distclean; aclocal; autoheader; automake; autoconf

If you need to update to a newer set of autotools, the following set of commands (and flags) could be useful:

% libtoolize --force # for updating libtool, before invoking the other autotools.
% automake --af # extra flags to add  for updating automake when invoking it

3. Configuring and Compiling libwww

Remember to subscribe to the <www-lib@w3.org> mailing list (findmail archives) for information of new features as well as discussions of problems and ideas.

Libwww uses GNU Libtool in order to build shared libraries on a variety of systems. While this is very nice for making usable binaries, it can be a pain when trying to debug a program. For that reason, compilation of shared libraries can be turned off by specifying the --disable-shared option to configure.

Congratulations - you are now ready to configure and compile libwww!


José Kahan,
@(#) $Id: git.html,v 1.2 2017/01/05 18:39:21 kahan Exp $