This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: compiling gcj 4.0.2 for windows on unbuntu
- From: Andi Vajda <andi at osafoundation dot org>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: GCJ <java at gcc dot gnu dot org>
- Date: Fri, 16 Jun 2006 20:05:45 -0700 (PDT)
- Subject: Re: compiling gcj 4.0.2 for windows on unbuntu
- References: <Pine.OSX.4.64.0606161616170.424@yuzu.local> <44936399.2050103@gmail.com>
- Reply-to: Andi Vajda <andi at osafoundation dot org>
On Sat, 17 Jun 2006, Ranjit Mathew wrote:
The following two patches are what necessitated the changes
in the instructions and the scripts:
http://gcc.gnu.org/ml/gcc-patches/2005-08/msg00122.html
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01579.html
and I think the 4.0 sources do not have them. In that
case the old instructions should be used - that is,
forget about this sys-root business and just extract
mingw-runtime and w32api into the "$PREFIX/$TARGET"
folder (you will also have to remove the "--with-sysroot"
and "--with-build-sysroot" specifications from the
configure command).
I've not tried the above and I would be interested to
know if anything else needs to be done for GCC 4.0.x
and GCC 4.1.x.
I just gave this a try and it got me past the first error. The compile then
still fails on libjava/prims.cc. It looks like /usr/include and windows header
files are clashing. See below.
Andi..
/home/vajda/gcc/xbuild/gcc/gcc/xgcc -shared-libgcc -B/home/vajda/gcc/xbuild/gcc/gcc/ -nostdinc++ -L/home/vajda/gcc/xbuild/gcc/i686-pc-mingw32/libstdc++-v3/src -L/home/vajda/gcc/xbuild/gcc/i686-pc-mingw32/libstdc++-v3/src/.libs -B/home/vajda/gcc/xgcc/i686-pc-mingw32/bin/ -B/home/vajda/gcc/xgcc/i686-pc-mingw32/lib/ -isystem /home/vajda/gcc/xgcc/i686-pc-mingw32/include -isystem /home/vajda/gcc/xgcc/i686-pc-mingw32/sys-include -DHAVE_CONFIG_H -I. -I/home/vajda/gcc/gcc-4.0.2/libjava -I./include -I./gcj -I/home/vajda/gcc/gcc-4.0.2/libjava -Iinclude -I/home/vajda/gcc/gcc-4.0.2/libjava/include -I/home/vajda/gcc/gcc-4.0.2/libjava/../boehm-gc/include -I../boehm-gc/include -I/home/vajda/gcc/gcc-4.0.2/libjava/libltdl -I/home/vajda/gcc/gcc-4.0.2/libjava/libltdl -I/home/vajda/gcc/gcc-4.0.2/libjava/.././libjava/../gcc -I/home/vajda/gcc/gcc-4.0.2/libjava/../zlib -I/home/vajda/gcc/gcc-4.0.2/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -ffloat-store -fno-omit-frame-pointer -I/usr/include -Wextra -Wall -D_GNU_SOURCE -DPREFIX=\"/home/vajda/gcc/xgcc\" -DLIBDIR=\"/home/vajda/gcc/xgcc/lib\" -DJAVA_HOME=\"/home/vajda/gcc/xgcc\" -DBOOT_CLASS_PATH=\"/home/vajda/gcc/xgcc/share/java/libgcj-4.0.2.jar\" -DJAVA_EXT_DIRS=\"/home/vajda/gcc/xgcc/share/java/ext\" -DGCJ_ENDORSED_DIRS=\"/home/vajda/gcc/xgcc/share/java/gcj-endorsed\" -DLIBGCJ_DEFAULT_DATABASE=\"/home/vajda/gcc/xgcc/lib/gcj-4.0.2/classmap.db\" -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.0.2/classmap.db\" -DTOOLEXECLIBDIR=\"/home/vajda/gcc/xgcc/i686-pc-mingw32/lib\" -g -O2 -MT prims.lo -MD -MP -MF .deps/prims.Tpo -c /home/vajda/gcc/gcc-4.0.2/libjava/prims.cc -o prims.o
/usr/include/bits/time.h:69: error: redefinition of 'struct timeval'
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/winsock2.h:109: error: previous definition of 'struct timeval'
/usr/include/sys/select.h:78: error: conflicting declaration 'typedef struct fd_set fd_set'
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/winsock2.h:64: error: 'fd_set' has a previous declaration as 'typedef struct fd_set fd_set'
/usr/include/sys/select.h:112: error: declaration of C function 'int select(int, fd_set*, fd_set*, fd_set*, timeval*)' conflicts with
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/winsock2.h:632: error: previous declaration 'int select(int, fd_set*, fd_set*, fd_set*, const timeval*)' here
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/io.h:76: error: '__time64_t' does not name a type
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/io.h:77: error: '__time64_t' does not name a type
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/io.h:78: error: '__time64_t' does not name a type
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/io.h:104: error: '__time64_t' does not name a type
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/io.h:105: error: '__time64_t' does not name a type
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/io.h:106: error: '__time64_t' does not name a type
/usr/include/unistd.h:243: error: conflicting declaration 'typedef __socklen_t socklen_t'
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/ws2tcpip.h:272: error: 'socklen_t' has a previous declaration as 'typedef int socklen_t'
/usr/include/unistd.h:290: error: declaration of C function '__off64_t lseek(int, __off64_t, int)' conflicts with
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/io.h:279: error: previous declaration 'long int lseek(int, long int, int)' here
/usr/include/unistd.h:448: error: declaration of C function 'char* getcwd(char*, size_t)' conflicts with
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/io.h:161: error: previous declaration 'char* getcwd(char*, int)' here
/usr/include/unistd.h:791: error: declaration of C function 'int gethostname(char*, size_t)' conflicts with
/home/vajda/gcc/xgcc/i686-pc-mingw32/include/winsock2.h:635: error: previous declaration 'int gethostname(char*, int)' here
make[2]: *** [prims.lo] Error 1
make[2]: Leaving directory `/home/vajda/gcc/xbuild/gcc/i686-pc-mingw32/libjava'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vajda/gcc/xbuild/gcc/i686-pc-mingw32/libjava'
make: *** [all-target-libjava] Error 2