This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc-4.9.2 crashes Xt and gcc-4.8.4 ada build problems


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]