X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:cc :subject:content-type:content-transfer-encoding; q=dns; s= default; b=A3rMnWetWfZIYFBHYNkuHKH4wnHy5tJK/eVkENGy0rtK+b3f6577m /6ubENE80fHK+2au6NvyQfMHrne5S8oMJVctFI6vZkvt4V3BwPzL+jqQYr9s4Q6e VwAHZy9cTI/8tYBgqnsn6vxgMTv9TTB/IopJY84EgAB3oVG6XQXOEU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:cc :subject:content-type:content-transfer-encoding; s=default; bh=C 142Og5eCjl9GYXmnnvVkqkJNbA=; b=b+CSFq+A1R6jJm7Va1MhGwrPpvmVTfCQX hiCWh8N7LCxhmnQvzxsIjuVhhVvO70wkoOKlpKPdQAuI4HZU5yIfYRTvXrCpK/KF 4EkxR0XlKK7Jkq2euMK1J9VEvG0sC1/0r3LITafgeBIrz+13sUsCd4kyg37o2pTp Mf4a4GFf1M= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: BLU004-OMC4S21.hotmail.com X-TMN: [YY2Wu7FBWprfea1Uqc7svyQ15eNJwOpQ] Message-ID: Date: Sun, 7 Jun 2015 14:58:19 -0700 From: Emil Lambrache User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com CC: Emil Lambrache Subject: gcc-4.9.2 crashes Xt and gcc-4.8.4 ada build problems Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit After I have allowed the setup to update my cygwin tree, I discovered to my dismay that the latest gcc 4.9.2 has dropped support for varargs.h. With that all my Xt-X11 based cygwin apps were broken as well: spice3, ngspice-26, xgraph, but moreover even tcl-tk-8.5 based apps were broken. Motif headers were broken as well, because Motif is built on top of Xt-X11. I suppose eventually XtVaGetValues and XtVaSetValues will be removed from the X11 distribution and all the Xt-based software out there will be re-written, but in the meantime I still need a compatible gcc version. Since the cygwin setup.exe does not allow me to downgrade my gcc from 4.9.2 back to 4.8.3, I have downloaded the gcc-4.8.4 sources and tried to build it locally. I found more bugs with the gcc-4.8.4 build: A.----------------------------- /usr/include/w32api/winnt.h is defining Status as a macro, which breaks down 2 structs (at lines 4951 and 5090). I inserted 3 lines just after the first #define as follows: #ifndef _WINNT_ #define _WINNT_ /* bug fix*/ #ifdef Status #undef Status #endif ...... B.----------------------------- ada breaks because 2 constants are undefined, namely DTR_CONTROL_ENABLE and RTS_CONTROL_ENABLE in the file gcc-4.8.4/gcc/ada/s-winext.ads I have added 2 lines in the -- Com Port -- section, the third and the fourth constants. -------------- -- Com Port -- -------------- DTR_CONTROL_DISABLE : constant := 16#00#; RTS_CONTROL_DISABLE : constant := 16#00#; DTR_CONTROL_ENABLE : constant := 16#01#; RTS_CONTROL_ENABLE : constant := 16#01#; NOPARITY : constant := 0; ODDPARITY : constant := 1; EVENPARITY : constant := 2; ONESTOPBIT : constant := 0; TWOSTOPBITS : constant := 2; C.---------------------------- The most serious bug is that symlinks and the gcc Makefile do not work together. If I follow the gcc.org installation instructions and do the build in a parallel object directory to the gcc-4.8.4 source directory, make crashes at the end of stage 1 with the message Cannot mv gcc stage1-gcc, permission denied. D.---------------------------- libjava breaks down because configure thinks WITH_JAR should be true, when in fact gjar is not there. I had to force the gcc-4.8.4/libjava/classpath/tools/Makefile.am to use only zip: ### if WITH_JAR ### CREATE_TOOLS_ZIP=$(JAR) cf ../$(TOOLS_ZIP) . ### UPDATE_TOOLS_ZIP=$(JAR) uf ../$(TOOLS_ZIP) . ### else CREATE_TOOLS_ZIP=$(ZIP) -r ../$(TOOLS_ZIP) . UPDATE_TOOLS_ZIP=$(ZIP) -u -r ../$(TOOLS_ZIP) . ### endif and similarly gcc-4.8.4/libjava/classpath/tools/Makefile.in: # Where we want these data files installed. TOOLSdir = $(pkgdatadir) CREATE_TOOLS_ZIP = $(ZIP) -r ../$(TOOLS_ZIP) . ### CREATE_TOOLS_ZIP = $(JAR) cf ../$(TOOLS_ZIP) . UPDATE_TOOLS_ZIP = $(ZIP) -u -r ../$(TOOLS_ZIP) . ### UPDATE_TOOLS_ZIP = $(JAR) uf ../$(TOOLS_ZIP) . E. ----------------------------------------- The most annoying bug, which I cold not entirely figure out, is why when linking the libjava, the ld spits out that from boehm.cc : GC_register_my_thread and GC_unregister_my_thread are undefined references. I checked that under the gcc-4.8.4/boehm_gc directory, pthread_support.c has these 2 functions correctly defined and I made sure that under the libjava directory the boehm.cc file references these 2 functions with the correct enclosure extern "C" { }. I could not figure out why these 2 functions are NOT included in the libraries linked by ld, so I commented them out where they are referenced in the gcc-4.8.4/libjava.boehm.cc F.----------------------------- The gcc-4.8.4/libatomic/configure.tgt does not recognize correctly cygwin, but luckily ../libgomp/configure.tgt does, so I have overwritten it with gcc-4.8.4/libgomp/configure.tgt Also the gcc-4.8.4/configure crashes because it tries -V and -qversion on the i686-pc-cygwin and wrongly concludes that i686-pc-cygwin is not supported, so I left only --version -v as choices for checking the gcc version. Also the Makefile does not create gcc-4.8.4/i686-pc-cygwin/libatomic and therefore the gcc-4.8.4/Makefile crashes when doing install, unless I do gcc-4.8.4/i686-pc-cygwin> ln -s ../libatomic . BOTTOM LINE: I have run configure inside its own directory gcc-4.8.4 and I have run make as well inside the gcc-4.8.4 directory. Despite the gcc.org installation warnings, the gcc 4.8.4 build ran well inside its own source directory within the cygwin environment. In the end, make install has run error free. This is the final gcc- v response: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-pc-cygwin/4.8.4/lto-wrapper.exe Target: i686-pc-cygwin Configured with: ./configure --prefix=/usr/local --exec-prefix=/usr/local --bindir=/usr/local/bin --sbindir=/usr/local/sbin --libexecdir=/usr/local/libexec --datadir=/usr/local/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/local/lib --datarootdir=/usr/local/share --docdir=/usr/local/share/doc/gcc --htmldir=/usr/local/share/doc/gcc/html --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin --enable-shared --enable-static --with-arch=i686 --with-tune=generic --enable-bootstrap --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --with-dwarf2 --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libjava --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id Thread model: posix gcc version 4.8.4 (GCC) I have cygwin version 1.7.17-1 Regards, Emil Lambrache Chandler, AZ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple