[Bug libstdc++/39738] New: GCC cannot build itself for win64 platform
pe_traits:228: error: previous definition of 'struct std::is_function<_Res ()(_ArgTypes ...)>' /usr/portage/local/overlays/build/x86_64-pc-mingw32/libstdc++-v3/include/tr1_impl/type_traits:248: error: invalid qualifiers on non-member function type /usr/portage/local/overlays/build/x86_64-pc-mingw32/libstdc++-v3/include/tr1_impl/type_traits:248: error: redefinition of 'struct std::is_function<_Res ()(_ArgTypes ..., ...)>' /usr/portage/local/overlays/build/x86_64-pc-mingw32/libstdc++-v3/include/tr1_impl/type_traits:231: error: previous definition of 'struct std::is_function<_Res ()(_ArgTypes ..., ...)>' Affected versions - 4.4.0 prerelease and top-of-tree(4.5.0), gcc 4.3.3 builds itself for win64 without any problems. -- Summary: GCC cannot build itself for win64 platform Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: css20 at mail dot ru GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-mingw32 GCC target triplet: x86_64-pc-mingw32 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39738
[Bug target/39738] GCC cannot build itself for win64 platform
--- Comment #3 from css20 at mail dot ru 2009-04-11 21:09 --- > Are you sure your entire compiler is up to date, not just the library? No.. it was not lasest snapshot (20090331). > We solve this by setting up in gcc's source tree a symbolic link "winsup" > pointing to the sysroot (prefix) directory I move to gcc-4.4.0-20090407, create symbolik link to my prefix directory (/usr/win64), but build not successfully.. make running from build/x86_64-pc-mingw32/libstdc++-v3/src: /bin/sh ../libtool --tag CXX --mode=compile x86_64-pc-mingw32-c++ -L/usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/winsup/mingw -L/usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/winsup/w32api/lib -isystem /usr/portage/local/overlays/gcc-4.4.0/src/winsup/mingw/include -isystem /usr/portage/local/overlays/gcc-4.4.0/src/winsup/w32api/include -I/usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/libstdc++-v3/include/x86_64-pc-mingw32 -I/usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/libstdc++-v3/include -I/usr/portage/local/overlays/gcc-4.4.0/src/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -O2 -std=gnu++0x -c ../../../../src/libstdc++-v3/src/atomic.cc libtool: compile: x86_64-pc-mingw32-c++ -L/usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/winsup/mingw -L/usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/winsup/w32api/lib -isystem /usr/portage/local/overlays/gcc-4.4.0/src/winsup/mingw/include -isystem /usr/portage/local/overlays/gcc-4.4.0/src/winsup/w32api/include -I/usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/libstdc++-v3/include/x86_64-pc-mingw32 -I/usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/libstdc++-v3/include -I/usr/portage/local/overlays/gcc-4.4.0/src/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -O2 -std=gnu++0x -c ../../../../src/libstdc++-v3/src/atomic.cc -o atomic.o In file included from /usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/libstdc++-v3/include/utility:88, from /usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/libstdc++-v3/include/tuple:43, from /usr/portage/local/overlays/gcc-4.4.0/build/x86_64-pc-mingw32/libstdc++-v3/include/mutex:44, from ../../../../src/libstdc++-v3/src/atomic.cc:33: /usr/portage/local/overlays/gcc-4.4.0/src/libstdc++-v3/libsupc++/initializer_list: In constructor 'std::initializer_list<_E>::initializer_list()': /usr/portage/local/overlays/gcc-4.4.0/src/libstdc++-v3/libsupc++/initializer_list:59: error: 'NULL' was not declared in this scope There is a possibility of manual build.. call make with these options make -j9 CFLAGS="-g -O2 -DNULL=0" CXXFLAGS="-g -O2 -DNULL=0 and compile remaining parts of gcc from root build directory, but it is not too convenient... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39738
[Bug target/39738] GCC cannot build itself for win64 platform
--- Comment #4 from css20 at mail dot ru 2009-04-12 08:50 --- First tests of Win64 compiler.. simple source file test.c was created: #include "windows.h" int main(int argc, char **argv) { MessageBox(NULL, "test", "test", MB_OK); } E:\temp\test>gcc test.c gcc: CreateProcess: No such file or directory E:\temp\test>gcc -### test.c Using built-in specs. Target: x86_64-pc-mingw32 Configured with: ../src/configure --prefix=/usr/win64 --with-sysroot=/usr/win64 --host=x86_64-pc-mingw32 --target=x86_64-pc-mingw32 --enable-languages=c,c++ --d isable-win32-registry --disable-nls --disable-shared --disable-sjlj-exceptions - -with-dwarf2 --disable-libssp --enable-libgomp Thread model: win32 gcc version 4.4.0 20090407 (prerelease) (GCC) COLLECT_GCC_OPTIONS='-mtune=generic' "e:/mingw64/bin/../libexec/gcc/x86_64-pc-mingw32/4.4.0/cc1.exe" "-quiet" "-ipre fix" "e:\\mingw64\\bin\\../lib/gcc/x86_64-pc-mingw32/4.4.0/" "test.c" "-quiet" " -dumpbase" "test.c" "-mtune=generic" "-auxbase" "test" "-o" "C:\\Users\\X\\AppDa ta\\Local\\Temp\\cciH4k6g.s" COLLECT_GCC_OPTIONS='-mtune=generic' " \"" --> then compiler drivers segfaults.. gdb output: Program received signal SIGSEGV, Segmentation fault. main (argc=3, argv=0x72120) at ../../src/gcc/gcc.c:6848 6848in ../../src/gcc/gcc.c code from gcc.c(6848): /* Determine if there are any linker input files. */ num_linker_inputs = 0; for (i = 0; (int) i < n_infiles; i++) if (explicit_link_files[i] || outfiles[i] != NULL) num_linker_inputs++; (gdb) p outfiles[i] $12 = 0x72200 "test.c" (gdb) p explicit_link_files[i] No symbol "explicit_link_files" in current context - ??? disassembly listing: 0040DB7B cmp byte ptr [rbx+rcx],0 <--- rbx & rcx = 0 0040DB7F jne 0040DB88 0040DB81 cmp qword ptr [rdi+rcx*8],0 0040DB86 je 0040DB8B What is it, incorrect build or compiler driver bug ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39738
[Bug target/39738] GCC cannot build itself for win64 platform
--- Comment #5 from css20 at mail dot ru 2009-04-12 19:35 --- I see this bug in compiler driver is already known (http://sourceforge.net/forum/forum.php?thread_id=3091795&forum_id=723797), it works only with "-O0". I can't found report about this bug in database.. does it exists ? > Well, on 4.4 branch there was a patch introducing the winsup link, which got > necessary for building libstdc++. We solve this by setting up in gcc's source > tree a symbolic link "winsup" pointing to the sysroot (prefix) directory. Symbolic link "winsup" to prefix directory with mingw-w64 runtime headers not works properly with current gcc 4.4.0 snapshot.. for correct build you must *temporary* remove file "stddef.h" from ${YOUR_PREFIX}/x86_64-pc-mingw32/include because it conflicts with same file in libstdc++ build directory. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39738
[Bug target/39738] GCC cannot build itself for win64 platform
--- Comment #7 from css20 at mail dot ru 2009-04-13 08:11 --- > Please make sure, that you have in your gcc source root directory the symbolic > link "winsup" pointing to your prefix directory. Secondly, make sure you have > the symbolic link "mingw" in your prefix directory, which has to point to > x86_64-pc-mingw32 directory. I use Gentoo Linux x64 as build OS with system compiler gcc 4.3.3, configuration script arguments you can see in my first post. Both symbolic links were created.. existing stddef.h file in winsup/mingw/include causes error: 'NULL' was not declared in this scope during libstdc++ building (see my earlier post). > Yes, there is already one. But this bug is work-a-round by a temporary hack in > our crt. So it shouldn't appear anymore. Alltimes use -O0 is not the solution.. temporary CRT hacks too. Where I can get more information about this bug ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39738
[Bug target/39738] GCC cannot build itself for win64 platform
--- Comment #9 from css20 at mail dot ru 2009-04-13 15:48 --- > Do you use for native toolchain an fresh initialized directory? > Which version of toolchain you are using (especially header-set)? > Do you use --prefix and --with-sysroot options? I use directory with mingw-64 runtime installed as --prefix= and --with-sysroot= argument. Toolchain versions: binutils 2.19.1 gmp 4.2.4 mpfr 2.4.1 CRT and pthreads - last versions from http://sourceforge.net/project/showfiles.php?group_id=202880 > You can try the following. Remove in your directory the folder > lib/gcc/x86_64-pc-mingw32/4.4.0/ and remove in your gcc's build directory the > x86_64-pc-mingw32 folder. Then do a 'make' No any changes. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39738
[Bug target/39738] GCC cannot build itself for win64 platform
--- Comment #10 from css20 at mail dot ru 2009-04-13 18:06 --- I try to build gcc with latest CRT from svn (revision 764) - build is OK. It seems, snapshot from sourceforge download page(November 15, 2008) not compatible with gcc 4.4. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39738