From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 57216395201B; Thu, 29 Apr 2021 10:14:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57216395201B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: FAQ: building-cygwin: accomodate autoconf changes X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: cf25b559020013e0503c4eead107b9a8225586e6 X-Git-Newrev: c66797eef8370b4d289a7a07070a58ac2c98e1c8 Message-Id: <20210429101410.57216395201B@sourceware.org> Date: Thu, 29 Apr 2021 10:14:10 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2021 10:14:10 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c66797eef8370b4d289a7a07070a58ac2c98e1c8 commit c66797eef8370b4d289a7a07070a58ac2c98e1c8 Author: Corinna Vinschen Date: Thu Apr 29 12:07:00 2021 +0200 Cygwin: FAQ: building-cygwin: accomodate autoconf changes - also, rephrase slightly for better readability and remove questionable old cruft Signed-off-by: Corinna Vinschen Diff: --- 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.