From c66797eef8370b4d289a7a07070a58ac2c98e1c8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 29 Apr 2021 12:07:00 +0200 Subject: Cygwin: FAQ: building-cygwin: accomodate autoconf changes - also, rephrase slightly for better readability and remove questionable old cruft Signed-off-by: Corinna Vinschen --- winsup/doc/faq-programming.xml | 65 +++++++++++++++++++++++++----------------- 1 file changed, 39 insertions(+), 26 deletions(-) diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml index 07d3a61f2..26fcfe921 100644 --- a/winsup/doc/faq-programming.xml +++ b/winsup/doc/faq-programming.xml @@ -677,12 +677,12 @@ rewriting the runtime library in question from specs... First, you need to make sure you have the necessary build tools installed; you at least need gcc-g++, -make, patch, perl, +make, automake, +autoconf, git, perl, gettext-devel, libiconv-devel and -zlib-devel. Installing git to fetch -the sources from the -source repository -helps, too. If you change a certain core part of Cygwin, namely the layout +zlib-devel. Fetch the sources from the +Cygwin GIT source repository. +If you change a certain core part of Cygwin, namely the layout of the Cygwin TLS area, you also have to install cocom. Building for 32-bit Cygwin also requires mingw64-i686-gcc-g++ and mingw64-i686-zlib. @@ -697,36 +697,49 @@ which requires the dblatex, docbook2X, documentation, see the README included in the cygwin-doc package. -Next, get the Cygwin source. Ideally, you should check out what you -need from Git (). This is the -preferred method for acquiring the sources. Otherwise, -if you are trying to duplicate a cygwin release then you should download the -corresponding source package +Next, check out the Cygwin sources from the +Cygwin GIT source repository). +This is the preferred method for acquiring the sources. +Otherwise, if you are trying to duplicate a cygwin release then you should +download the corresponding source package (cygwin-x.y.z-n-src.tar.bz2). You must build cygwin in a separate directory from the source, so create something like a build/ directory. -Assuming you checked out the source in /oss/src/, and you -also want to install to the temporary location install: +Assuming you checked out the source to +/oss/src/newlib-cygwin/, and you want to install to the +temporary location /oss/install/, these are the required +steps to build Cygwin: -mkdir /oss/build -mkdir /oss/install -cd build -(/oss/src/configure --prefix=/oss/install -v; make) >& make.out -make install > install.log 2>&1 +$ mkdir -p /oss/src/newlib-cygwin/build # create build dir +$ mkdir -p /oss/install # create install dir +$ cd /oss/src/newlib-cygwin/winsup # chdir into Cygwin source dir and... +$ ./autogen.sh # create config files +$ cd /oss/src/newlib-cygwin/build # chdir into build dir +$ # create makefiles... +$ /oss/src/newlib-cygwin/configure --prefix=/oss/install +$ make # build Cygwin +$ make install # install Cygwin into install dir -If the build works, install everything except the dll (if -you can). Then, close down all cygwin programs (including bash windows, -inetd, etc.), save your old dll, and copy the new dll to the correct -place. Then start up a bash window, or run a cygwin program from the -Windows command prompt, and see what happens. - -If you get the error "shared region is corrupted" it means that two -different versions of cygwin1.dll are running on your machine at the -same time. Remove all but one. +If the build worked, you can install everything you like into the currently +running system, except the Cygwin DLL +cygwin1.dll itself. For installing the DLL, close down +all Cygwin programs (including bash windows, any servers like +cygserver, etc.), save your old dll, and copy the new dll +to the correct place. Then, for first testing, start up a Cygwin program +from the Windows command prompt and see what happens. + +If you get a lengthy error messages like +"user shared memory version mismatch detected", it's +very likely a Cygwin process still running using the old DLL. Kill it +in Windows' Task Manager or taskkill and try again. +If it's still not working, and if you're sure there's no older Cygwin +process still running, it's probably a bug you introduced with your changes. +From here on, you're on your own or discuss problems on the +Cygwin-developers mailing list. -- cgit v1.2.3