I think it may help if someone can write some article on the EDM/2 on how to set up Paul's environment.
[...]
The download file contains a directory (wget-1.14). Put that on the same drive as Paul's build environment. Then, click on the icon that you built to launch paul's build environment. That should get you to a command line. Change to the wget-1.14 directory, and now we need to figure out how to build it. Paul's instructions are a little confusing at this point (and somewhat incomplete in some more complicated cases).
Since I am tired, I will quit here, and hopefully, somebody will make this a little easier. I am not at all sure if I still have the original setup files, or if I have messed around with them. I don't normally use the setup as Paul supplied it (which seems to be set up to build a mozilla derivative, and I do not have the latest version), so I am somewhat lost here. I am sure that most people will have the same problem.
What I'd do (I don't have Pauls environment) is open EPM, and open a shell within EPM. (Command --> Create command shell). Now we have a scrolling window for reviewing output.
Start out by doing sh configure --help (I use [pdk]sh.exe, substitute ash if you prefer) and examine the output. Of interest are options such as --enable-threads={posix|solaris|pth|windows} --disable-ipv6, ssl options, libiconv, libintl and whether to support nls options. We'll come back to this if configure makes mistakes in configuring for the build system.
Then try sh configure and watch the configure script figure out the build environment, what tools we have installed and what our libc supports.
Eventually here configure errors out with,
checking for libgnutls... no
configure: error: --with-ssl was given, but GNUTLS is not available
So we have to decide whether to use openssl. (Openssl has an incompatible license with GPL v2 ). For our first test build we'll disable it, so rerun configure as sh configure --without-ssl.
Eventually configure ends by creating a bunch of makefiles, so now we can do
make
and after a bunch of output make dies with
epbase=`echo spawn-pipe.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc.exe -DHAVE_CONFIG_H -I. -I../src -I/usr/local/include -O2 -Wall -MT spawn-pipe.o -MD -MP -MF $depbase.Tpo -c -o spawn-pipe.o spawn-pipe.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ./spawn.h:37,
from spawn-pipe.c:47:
./sched.h:43: error: redefinition of 'struct sched_param'
So need to examine what is different between lib\spawn.h and lib\sched.h and how they relate to our headers.
Search \usr\include for sched_param, we find it in spawn.h with a comment, todo implement sched.h.
Perhaps configure got confused by not finding sched.h? As we have sched_param we should be able to ignore the one included by lib\spawn.h. Best seems to try to change line 35 in spawn.h.in from
#if !(defined __GLIBC__ && !defined __UCLIBC__)
to
#if !(defined __GLIBC__ && !defined __UCLIBC__ || defined __OS2__)
and try again.
This time make finishes by building src\wget.exe so see if it runs by cd src && wget --version and it seems to work.
Now to test by doing make check which unluckily dies here due to perl issues. These can probably be fixed or can test wget by downloading things and seeing if they work.
Ideally after the build error is to contact the authours of wget for advice on the best way to fix the problem and get a fix into the code so the next version builds out of the box.