* [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) @ 2011-08-08 0:30 Roy Tam 2011-08-08 6:21 ` Stefan Hajnoczi 0 siblings, 1 reply; 13+ messages in thread From: Roy Tam @ 2011-08-08 0:30 UTC (permalink / raw) To: qemu-devel Hi all, I checked out latest git and tried to compile QEMU but I got this message: qemu$ make V=1 gcc -m32 -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN -DWINVER=0x501 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -O3 -msse3 -msse2 -msse -mmmx -fomit-frame-pointer -mpreferred-stack-boundary=2 -ffast-math -pipe -funroll-loops -fforce-addr -mfpmath=sse -Wendif-labels -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wold-style-definition -mms-bitfields -Ic:/MinGW/include/glib-2.0 -Ic:/MinGW/lib/glib-2.0/include -I/usr/home/User/qemu/slirp -I. -I/usr/home/User/qemu -I/usr/home/User/qemu/fpu -MMD -MP -MT coroutine-win32.o -MF ./coroutine-win32.d -O2 -g -c -o coroutine-win32.o coroutine-win32.c coroutine-win32.c:36: error: thread-local storage not supported for this target coroutine-win32.c:37: error: thread-local storage not supported for this target make: *** [coroutine-win32.o] Error 1 Please advice. Best regards, Roy ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-08 0:30 [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) Roy Tam @ 2011-08-08 6:21 ` Stefan Hajnoczi 2011-08-08 6:36 ` Roy Tam 0 siblings, 1 reply; 13+ messages in thread From: Stefan Hajnoczi @ 2011-08-08 6:21 UTC (permalink / raw) To: Roy Tam; +Cc: qemu-devel On Mon, Aug 8, 2011 at 1:30 AM, Roy Tam <roytam@gmail.com> wrote: > Hi all, > > I checked out latest git and tried to compile QEMU but I got this message: > qemu$ make V=1 > gcc -m32 -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN > -DWINVER=0x501 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE > -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes > -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes > -fno-strict-aliasing -O3 -msse3 -msse2 -msse -mmmx > -fomit-frame-pointer -mpreferred-stack-boundary=2 -ffast-math -pipe > -funroll-loops -fforce-addr -mfpmath=sse -Wendif-labels > -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self > -Wold-style-definition -mms-bitfields -Ic:/MinGW/include/glib-2.0 > -Ic:/MinGW/lib/glib-2.0/include -I/usr/home/User/qemu/slirp -I. > -I/usr/home/User/qemu -I/usr/home/User/qemu/fpu -MMD -MP -MT > coroutine-win32.o -MF ./coroutine-win32.d -O2 -g -c -o > coroutine-win32.o coroutine-win32.c > coroutine-win32.c:36: error: thread-local storage not supported for this target > coroutine-win32.c:37: error: thread-local storage not supported for this target > make: *** [coroutine-win32.o] Error 1 Hi Roy, Others have successfully built for win32. Are you able to upgrade to a newer toolchain, gcc-3.4 is 6 years old and doesn't support __thread variables? Stefan ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-08 6:21 ` Stefan Hajnoczi @ 2011-08-08 6:36 ` Roy Tam 2011-08-16 7:38 ` Roy Tam 0 siblings, 1 reply; 13+ messages in thread From: Roy Tam @ 2011-08-08 6:36 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel 2011/8/8 Stefan Hajnoczi <stefanha@gmail.com>: > On Mon, Aug 8, 2011 at 1:30 AM, Roy Tam <roytam@gmail.com> wrote: >> Hi all, >> >> I checked out latest git and tried to compile QEMU but I got this message: >> qemu$ make V=1 >> gcc -m32 -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN >> -DWINVER=0x501 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE >> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes >> -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes >> -fno-strict-aliasing -O3 -msse3 -msse2 -msse -mmmx >> -fomit-frame-pointer -mpreferred-stack-boundary=2 -ffast-math -pipe >> -funroll-loops -fforce-addr -mfpmath=sse -Wendif-labels >> -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self >> -Wold-style-definition -mms-bitfields -Ic:/MinGW/include/glib-2.0 >> -Ic:/MinGW/lib/glib-2.0/include -I/usr/home/User/qemu/slirp -I. >> -I/usr/home/User/qemu -I/usr/home/User/qemu/fpu -MMD -MP -MT >> coroutine-win32.o -MF ./coroutine-win32.d -O2 -g -c -o >> coroutine-win32.o coroutine-win32.c >> coroutine-win32.c:36: error: thread-local storage not supported for this target >> coroutine-win32.c:37: error: thread-local storage not supported for this target >> make: *** [coroutine-win32.o] Error 1 > > Hi Roy, > Others have successfully built for win32. Are you able to upgrade to > a newer toolchain, gcc-3.4 is 6 years old and doesn't support __thread > variables? I tried many MinGW GCC 4.x(from 4.5.0 to 4.7.0) but resulting an internal compiler error when compiling op_helper.c > > Stefan > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-08 6:36 ` Roy Tam @ 2011-08-16 7:38 ` Roy Tam 2011-08-16 12:45 ` Stefan Hajnoczi 0 siblings, 1 reply; 13+ messages in thread From: Roy Tam @ 2011-08-16 7:38 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel 2011/8/8 Roy Tam <roytam@gmail.com>: > 2011/8/8 Stefan Hajnoczi <stefanha@gmail.com>: >> On Mon, Aug 8, 2011 at 1:30 AM, Roy Tam <roytam@gmail.com> wrote: >>> Hi all, >>> >>> I checked out latest git and tried to compile QEMU but I got this message: >>> qemu$ make V=1 >>> gcc -m32 -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN >>> -DWINVER=0x501 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE >>> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes >>> -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes >>> -fno-strict-aliasing -O3 -msse3 -msse2 -msse -mmmx >>> -fomit-frame-pointer -mpreferred-stack-boundary=2 -ffast-math -pipe >>> -funroll-loops -fforce-addr -mfpmath=sse -Wendif-labels >>> -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self >>> -Wold-style-definition -mms-bitfields -Ic:/MinGW/include/glib-2.0 >>> -Ic:/MinGW/lib/glib-2.0/include -I/usr/home/User/qemu/slirp -I. >>> -I/usr/home/User/qemu -I/usr/home/User/qemu/fpu -MMD -MP -MT >>> coroutine-win32.o -MF ./coroutine-win32.d -O2 -g -c -o >>> coroutine-win32.o coroutine-win32.c >>> coroutine-win32.c:36: error: thread-local storage not supported for this target >>> coroutine-win32.c:37: error: thread-local storage not supported for this target >>> make: *** [coroutine-win32.o] Error 1 >> >> Hi Roy, >> Others have successfully built for win32. Are you able to upgrade to >> a newer toolchain, gcc-3.4 is 6 years old and doesn't support __thread >> variables? > > I tried many MinGW GCC 4.x(from 4.5.0 to 4.7.0) but resulting an > internal compiler error when compiling op_helper.c > I removed "-mpreferred-stack-boundary=2" switch and it now builds. But created binaries are unusable, even I remove all cflags. C:\msys\home\User\qemu\i386-softmmu>gdb --args qemu -L ..\pc-bios GNU gdb (GDB) 7.3 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "mingw32". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from C:\msys\home\User\qemu\i386-softmmu/qemu.exe...(no debugging symbols found)...done. (gdb) run Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu.exe -L ..\\pc-bios [New Thread 5880.0x13c4] [New Thread 5880.0x16ac] [New Thread 5880.0x110c] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 5880.0x110c] 0x77c0554a in msvcrt!_abnormal_termination () from C:\WINDOWS\system32\msvcrt.dll (gdb) backtrace #0 0x77c0554a in msvcrt!_abnormal_termination () from C:\WINDOWS\system32\msvcrt.dll #1 0x77c09bc6 in strerror () from C:\WINDOWS\system32\msvcrt.dll Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) >> >> Stefan >> > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-16 7:38 ` Roy Tam @ 2011-08-16 12:45 ` Stefan Hajnoczi 2011-08-16 18:50 ` Paolo Bonzini 0 siblings, 1 reply; 13+ messages in thread From: Stefan Hajnoczi @ 2011-08-16 12:45 UTC (permalink / raw) To: Roy Tam; +Cc: qemu-devel On Tue, Aug 16, 2011 at 8:38 AM, Roy Tam <roytam@gmail.com> wrote: > 2011/8/8 Roy Tam <roytam@gmail.com>: >> 2011/8/8 Stefan Hajnoczi <stefanha@gmail.com>: >>> On Mon, Aug 8, 2011 at 1:30 AM, Roy Tam <roytam@gmail.com> wrote: >>>> Hi all, >>>> >>>> I checked out latest git and tried to compile QEMU but I got this message: >>>> qemu$ make V=1 >>>> gcc -m32 -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN >>>> -DWINVER=0x501 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE >>>> -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes >>>> -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes >>>> -fno-strict-aliasing -O3 -msse3 -msse2 -msse -mmmx >>>> -fomit-frame-pointer -mpreferred-stack-boundary=2 -ffast-math -pipe >>>> -funroll-loops -fforce-addr -mfpmath=sse -Wendif-labels >>>> -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self >>>> -Wold-style-definition -mms-bitfields -Ic:/MinGW/include/glib-2.0 >>>> -Ic:/MinGW/lib/glib-2.0/include -I/usr/home/User/qemu/slirp -I. >>>> -I/usr/home/User/qemu -I/usr/home/User/qemu/fpu -MMD -MP -MT >>>> coroutine-win32.o -MF ./coroutine-win32.d -O2 -g -c -o >>>> coroutine-win32.o coroutine-win32.c >>>> coroutine-win32.c:36: error: thread-local storage not supported for this target >>>> coroutine-win32.c:37: error: thread-local storage not supported for this target >>>> make: *** [coroutine-win32.o] Error 1 >>> >>> Hi Roy, >>> Others have successfully built for win32. Are you able to upgrade to >>> a newer toolchain, gcc-3.4 is 6 years old and doesn't support __thread >>> variables? >> >> I tried many MinGW GCC 4.x(from 4.5.0 to 4.7.0) but resulting an >> internal compiler error when compiling op_helper.c >> > > I removed "-mpreferred-stack-boundary=2" switch and it now builds. > But created binaries are unusable, even I remove all cflags. > > C:\msys\home\User\qemu\i386-softmmu>gdb --args qemu -L ..\pc-bios > GNU gdb (GDB) 7.3 > Copyright (C) 2011 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show > copying" and "show warranty" for details. > This GDB was configured as "mingw32". > For bug reporting instructions, please see: > <http://www.gnu.org/software/gdb/bugs/>... > Reading symbols from > C:\msys\home\User\qemu\i386-softmmu/qemu.exe...(no debugging symbols > found)...done. > (gdb) run > Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu.exe -L ..\\pc-bios > [New Thread 5880.0x13c4] > [New Thread 5880.0x16ac] > [New Thread 5880.0x110c] > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 5880.0x110c] > 0x77c0554a in msvcrt!_abnormal_termination () > from C:\WINDOWS\system32\msvcrt.dll > (gdb) backtrace > #0 0x77c0554a in msvcrt!_abnormal_termination () > from C:\WINDOWS\system32\msvcrt.dll > #1 0x77c09bc6 in strerror () from C:\WINDOWS\system32\msvcrt.dll > Backtrace stopped: previous frame inner to this frame (corrupt stack?) > (gdb) Roy, This stack trace does not reveal much. Is there any MinGW gcc user that has successfully built and run qemu.git? Which version/architecture of Windows and which MinGW version? Stefan ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-16 12:45 ` Stefan Hajnoczi @ 2011-08-16 18:50 ` Paolo Bonzini 2011-08-17 17:20 ` Blue Swirl 2011-08-20 8:41 ` Stefan Weil 0 siblings, 2 replies; 13+ messages in thread From: Paolo Bonzini @ 2011-08-16 18:50 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: qemu-devel, Roy Tam On 08/16/2011 05:45 AM, Stefan Hajnoczi wrote: > Roy, > This stack trace does not reveal much. > > Is there any MinGW gcc user that has successfully built and run > qemu.git? I would be surprised if Stefan Weil hasn't. > Which version/architecture of Windows and which MinGW > version? I'm trying to get rid of emutls, it is slow anyway and we'll likely want to rely on TLS very liberally in the future. If it fixes the bug, we can backport it to stable too. Paolo ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-16 18:50 ` Paolo Bonzini @ 2011-08-17 17:20 ` Blue Swirl 2011-08-17 17:23 ` Stefan Hajnoczi 2011-08-18 3:36 ` Roy Tam 2011-08-20 8:41 ` Stefan Weil 1 sibling, 2 replies; 13+ messages in thread From: Blue Swirl @ 2011-08-17 17:20 UTC (permalink / raw) To: Paolo Bonzini; +Cc: Stefan Hajnoczi, qemu-devel, Roy Tam On Tue, Aug 16, 2011 at 6:50 PM, Paolo Bonzini <pbonzini@redhat.com> wrote: > On 08/16/2011 05:45 AM, Stefan Hajnoczi wrote: >> >> Roy, >> This stack trace does not reveal much. >> >> Is there any MinGW gcc user that has successfully built and run >> qemu.git? > > I would be surprised if Stefan Weil hasn't. Builds and runs (under i386 chroot + Wine) here. It worked also in Windows the last time I tried (2010). >> Which version/architecture of Windows and which MinGW >> version? Debian: $ i586-mingw32msvc-gcc -v Using built-in specs. Target: i586-mingw32msvc Configured with: /build/buildd-gcc-mingw32_4.4.4-0.1+b1-amd64-aFhFbL/gcc-mingw32-4.4.4/build-tree/gcc-4.4.4/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --libexecdir='/usr/lib/gcc-mingw32' --disable-multilib --enable-threads --enable-sjlj-exceptions --enable-version-specific-runtime-libs --disable-shared --target=i586-mingw32msvc --enable-languages=c,c++,fortran : (reconfigured) /build/buildd-gcc-mingw32_4.4.4-0.1+b1-amd64-aFhFbL/gcc-mingw32-4.4.4/build-tree/gcc-4.4.4/configure --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --libexecdir='/usr/lib/gcc-mingw32' --disable-multilib --enable-threads --enable-sjlj-exceptions --enable-version-specific-runtime-libs --disable-shared --target=i586-mingw32msvc --enable-languages=c,c++,fortran Thread model: win32 gcc version 4.4.4 (GCC) Compiled myself: $ i686-mingw32msvc-gcc -v Using built-in specs. COLLECT_GCC=i686-mingw32msvc-gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-mingw32msvc/4.6.0/lto-wrapper Target: i686-mingw32msvc Configured with: ../configure --target=i686-mingw32msvc --enable-targets=i686-mingw32msvc --disable-nls --disable-threads --enable-languages=c --disable-shared --disable-libssp --disable-multilib Thread model: single gcc version 4.6.0 20100925 (experimental) (GCC) > I'm trying to get rid of emutls, it is slow anyway and we'll likely want to > rely on TLS very liberally in the future. If it fixes the bug, we can > backport it to stable too. I don't know about Win32 TLS support, but at least OpenBSD/sparc64 gcc/ld/ld.so/libc do not support __thread. According to manual, TLS is not available everywhere: http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Thread_002dLocal.html#Thread_002dLocal ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-17 17:20 ` Blue Swirl @ 2011-08-17 17:23 ` Stefan Hajnoczi 2011-08-17 17:26 ` Paolo Bonzini 2011-08-18 3:36 ` Roy Tam 1 sibling, 1 reply; 13+ messages in thread From: Stefan Hajnoczi @ 2011-08-17 17:23 UTC (permalink / raw) To: Blue Swirl; +Cc: Paolo Bonzini, qemu-devel, Roy Tam On Wed, Aug 17, 2011 at 6:20 PM, Blue Swirl <blauwirbel@gmail.com> wrote: > On Tue, Aug 16, 2011 at 6:50 PM, Paolo Bonzini <pbonzini@redhat.com> wrote: >> On 08/16/2011 05:45 AM, Stefan Hajnoczi wrote: >>> >>> Roy, >>> This stack trace does not reveal much. >>> >>> Is there any MinGW gcc user that has successfully built and run >>> qemu.git? >> >> I would be surprised if Stefan Weil hasn't. > > Builds and runs (under i386 chroot + Wine) here. It worked also in > Windows the last time I tried (2010). > >>> Which version/architecture of Windows and which MinGW >>> version? > > Debian: > $ i586-mingw32msvc-gcc -v > Using built-in specs. > Target: i586-mingw32msvc > Configured with: > /build/buildd-gcc-mingw32_4.4.4-0.1+b1-amd64-aFhFbL/gcc-mingw32-4.4.4/build-tree/gcc-4.4.4/configure > --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' > --mandir='/usr/share/man' --infodir='/usr/share/info' > --sysconfdir=/etc --localstatedir=/var > --libexecdir='/usr/lib/gcc-mingw32' --disable-multilib > --enable-threads --enable-sjlj-exceptions > --enable-version-specific-runtime-libs --disable-shared > --target=i586-mingw32msvc --enable-languages=c,c++,fortran : > (reconfigured) /build/buildd-gcc-mingw32_4.4.4-0.1+b1-amd64-aFhFbL/gcc-mingw32-4.4.4/build-tree/gcc-4.4.4/configure > --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' > --mandir='/usr/share/man' --infodir='/usr/share/info' > --sysconfdir=/etc --localstatedir=/var > --libexecdir='/usr/lib/gcc-mingw32' --disable-multilib > --enable-threads --enable-sjlj-exceptions > --enable-version-specific-runtime-libs --disable-shared > --target=i586-mingw32msvc --enable-languages=c,c++,fortran > Thread model: win32 > gcc version 4.4.4 (GCC) > > Compiled myself: > $ i686-mingw32msvc-gcc -v > Using built-in specs. > COLLECT_GCC=i686-mingw32msvc-gcc > COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-mingw32msvc/4.6.0/lto-wrapper > Target: i686-mingw32msvc > Configured with: ../configure --target=i686-mingw32msvc > --enable-targets=i686-mingw32msvc --disable-nls --disable-threads > --enable-languages=c --disable-shared --disable-libssp > --disable-multilib > Thread model: single > gcc version 4.6.0 20100925 (experimental) (GCC) > >> I'm trying to get rid of emutls, it is slow anyway and we'll likely want to >> rely on TLS very liberally in the future. If it fixes the bug, we can >> backport it to stable too. > > I don't know about Win32 TLS support, but at least OpenBSD/sparc64 > gcc/ld/ld.so/libc do not support __thread. According to manual, TLS is > not available everywhere: > http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Thread_002dLocal.html#Thread_002dLocal Yeah, for OpenBSD we have the portable but slow GThread coroutine implementation. Stefan ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-17 17:23 ` Stefan Hajnoczi @ 2011-08-17 17:26 ` Paolo Bonzini 0 siblings, 0 replies; 13+ messages in thread From: Paolo Bonzini @ 2011-08-17 17:26 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: Blue Swirl, qemu-devel, Roy Tam On 08/17/2011 10:23 AM, Stefan Hajnoczi wrote: >> > I don't know about Win32 TLS support, but at least OpenBSD/sparc64 >> > gcc/ld/ld.so/libc do not support __thread. According to manual, TLS is >> > not available everywhere: >> > http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Thread_002dLocal.html#Thread_002dLocal > Yeah, for OpenBSD we have the portable but slow GThread coroutine > implementation. I think (but I'm not sure) that a newer GCC on OpenBSD is able to convert __thread to pthread_key_setspecific. I'm trying to see if we can do something like Windows TLS at the qemu-thread level. Paolo ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-17 17:20 ` Blue Swirl 2011-08-17 17:23 ` Stefan Hajnoczi @ 2011-08-18 3:36 ` Roy Tam 1 sibling, 0 replies; 13+ messages in thread From: Roy Tam @ 2011-08-18 3:36 UTC (permalink / raw) To: Blue Swirl; +Cc: Paolo Bonzini, qemu-devel, Stefan Hajnoczi 2011/8/18 Blue Swirl <blauwirbel@gmail.com>: > On Tue, Aug 16, 2011 at 6:50 PM, Paolo Bonzini <pbonzini@redhat.com> wrote: >> On 08/16/2011 05:45 AM, Stefan Hajnoczi wrote: >>> >>> Roy, >>> This stack trace does not reveal much. >>> >>> Is there any MinGW gcc user that has successfully built and run >>> qemu.git? >> >> I would be surprised if Stefan Weil hasn't. > > Builds and runs (under i386 chroot + Wine) here. It worked also in > Windows the last time I tried (2010). > You may try running it in Windows. >>> Which version/architecture of Windows and which MinGW >>> version? > > Debian: > $ i586-mingw32msvc-gcc -v > Using built-in specs. > Target: i586-mingw32msvc > Configured with: > /build/buildd-gcc-mingw32_4.4.4-0.1+b1-amd64-aFhFbL/gcc-mingw32-4.4.4/build-tree/gcc-4.4.4/configure > --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' > --mandir='/usr/share/man' --infodir='/usr/share/info' > --sysconfdir=/etc --localstatedir=/var > --libexecdir='/usr/lib/gcc-mingw32' --disable-multilib > --enable-threads --enable-sjlj-exceptions > --enable-version-specific-runtime-libs --disable-shared > --target=i586-mingw32msvc --enable-languages=c,c++,fortran : > (reconfigured) /build/buildd-gcc-mingw32_4.4.4-0.1+b1-amd64-aFhFbL/gcc-mingw32-4.4.4/build-tree/gcc-4.4.4/configure > --build=x86_64-linux-gnu --prefix=/usr --includedir='/usr/include' > --mandir='/usr/share/man' --infodir='/usr/share/info' > --sysconfdir=/etc --localstatedir=/var > --libexecdir='/usr/lib/gcc-mingw32' --disable-multilib > --enable-threads --enable-sjlj-exceptions > --enable-version-specific-runtime-libs --disable-shared > --target=i586-mingw32msvc --enable-languages=c,c++,fortran > Thread model: win32 > gcc version 4.4.4 (GCC) > > Compiled myself: > $ i686-mingw32msvc-gcc -v > Using built-in specs. > COLLECT_GCC=i686-mingw32msvc-gcc > COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i686-mingw32msvc/4.6.0/lto-wrapper > Target: i686-mingw32msvc > Configured with: ../configure --target=i686-mingw32msvc > --enable-targets=i686-mingw32msvc --disable-nls --disable-threads > --enable-languages=c --disable-shared --disable-libssp > --disable-multilib > Thread model: single > gcc version 4.6.0 20100925 (experimental) (GCC) > This is mine: Host OS: Windows XP SP3 configure line: ./configure --target-list="i386-softmmu x86_64-softmmu mips64el-softmmu" --audio-drv-list=sdl --audio-card-list=ac97,sb16,adlib --disable-linux-aio --enable-io-thread --enable-vnc-thread --disable-vnc-jpeg --disable-vnc-png --disable-kvm Install prefix c:/Program Files/Qemu BIOS directory c:/Program Files/Qemu binary directory c:/Program Files/Qemu library directory c:/Program Files/Qemu/lib include directory c:/Program Files/Qemu/include config directory c:/Program Files/Qemu Source path /usr/home/User/qemu C compiler gcc Host C compiler gcc CFLAGS -O2 -g QEMU_CFLAGS -m32 -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN -DWINVER=0x501 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits LDFLAGS -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase -Wl,--warn-common -m32 -g make make install install python python host CPU i386 host big endian no target list i386-softmmu x86_64-softmmu mips64el-softmmu tcg debug enabled no Mon debug enabled no gprof enabled no sparse enabled no strip binaries yes profiler no static build no -Werror enabled no SDL support yes curses support no curl support no check support no mingw32 support yes Audio drivers sdl Extra audio cards ac97 sb16 adlib Block whitelist Mixer emulation no VNC support yes VNC TLS support no VNC SASL support no VNC JPEG support no VNC PNG support no VNC thread yes xen support no brlapi support no bluez support no Documentation yes NPTL support no GUEST_BASE yes PIE user targets no vde support no IO thread yes Linux AIO support no ATTR/XATTR support no Install blobs yes KVM support no fdt support no preadv support no fdatasync no madvise no posix_madvise no uuid support no vhost-net support no Trace backend nop Trace output file trace-<pid> spice support no rbd support no xfsctl support no nss used no usb net redir no OpenGL support no build guest agent no qemu$ gcc -v Using built-in specs. COLLECT_GCC=c:\MinGW\bin\gcc.exe COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/i686-pc-mingw32/4.6.1/lto-wrapper.exe Target: i686-pc-mingw32 Configured with: ../src/configure --prefix=/mingw_new --build=i686-pc-mingw32 --target=i686-pc-mingw32 --with-sysroot=/mingw_new --with-build-sysroot=/mingw_new --with-mpfr=/mingw_new/build_libs --with-gmp=/mingw_new/build_libs --with-ppl=/mingw_new/build_libs --enable-cloog-backend=isl --with-cloog=/mingw_new/build_libs --with-mpc=/mingw_new/build_libs --with-host-libstdcxx='-lstdc++ -lsupc++ -lm' --with-pkgversion='XvidVideo.RU - GCC 4.6.1 i686-pc-mingw32' --with-system-zlib --enable-static --enable-threads=win32 --enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-targets=all --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libgomp --disable-debug --disable-rpath --disable-shared --disable-nls --disable-win32-registry --disable-werror --disable-bootstrap Thread model: win32 gcc version 4.6.1 (XvidVideo.RU - GCC 4.6.1 i686-pc-mingw32) qemu/i386-softmmu$ gdb --args qemu.exe -L ..\\pc-bios GNU gdb (GDB) 7.0 Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "mingw32". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from C:\msys\home\User\qemu\i386-softmmu/qemu.exe...done. (gdb) run Starting program: C:\msys\home\User\qemu\i386-softmmu/qemu.exe -L ..\\pc-bios [New Thread 4596.0x10f4] [New Thread 4596.0x278] [New Thread 4596.0x93c] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 4596.0x93c] 0x77c0554a in msvcrt!_abnormal_termination () from C:\WINDOWS\system32\msvcrt.dll (gdb) backtrace #0 0x77c0554a in msvcrt!_abnormal_termination () from C:\WINDOWS\system32\msvcrt.dll #1 0x77c09bc6 in strerror () from C:\WINDOWS\system32\msvcrt.dll Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb) thread 1 [Switching to thread 1 (Thread 4596.0x10f4)]#0 0x7c92e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll (gdb) backtrace #0 0x7c92e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll #1 0x7c92df5a in ntdll!ZwWaitForSingleObject () from C:\WINDOWS\system32\ntdll.dll #2 0x7c939b23 in ntdll!RtlpWaitForCriticalSection () from C:\WINDOWS\system32\ntdll.dll #3 0x7c921046 in ntdll!RtlEnumerateGenericTableLikeADirectory () from C:\WINDOWS\system32\ntdll.dll (gdb) thread 2 [Switching to thread 2 (Thread 4596.0x278)]#0 0x7c92e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll (gdb) backtrace #0 0x7c92e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll #1 0x7c92df4a in ntdll!ZwWaitForMultipleObjects () from C:\WINDOWS\system32\ntdll.dll #2 0x76b2aee9 in timeGetTime () from C:\WINDOWS\system32\winmm.dll #3 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll #4 0x00000000 in ?? () (gdb) >> I'm trying to get rid of emutls, it is slow anyway and we'll likely want to >> rely on TLS very liberally in the future. If it fixes the bug, we can >> backport it to stable too. > > I don't know about Win32 TLS support, but at least OpenBSD/sparc64 > gcc/ld/ld.so/libc do not support __thread. According to manual, TLS is > not available everywhere: > http://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Thread_002dLocal.html#Thread_002dLocal > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-16 18:50 ` Paolo Bonzini 2011-08-17 17:20 ` Blue Swirl @ 2011-08-20 8:41 ` Stefan Weil 2011-08-23 7:39 ` Roy Tam 1 sibling, 1 reply; 13+ messages in thread From: Stefan Weil @ 2011-08-20 8:41 UTC (permalink / raw) To: Paolo Bonzini; +Cc: Stefan Hajnoczi, qemu-devel, Roy Tam Am 16.08.2011 20:50, schrieb Paolo Bonzini: > On 08/16/2011 05:45 AM, Stefan Hajnoczi wrote: >> Roy, >> This stack trace does not reveal much. >> >> Is there any MinGW gcc user that has successfully built and run >> qemu.git? > > I would be surprised if Stefan Weil hasn't. How did you know that? >> Which version/architecture of Windows and which MinGW >> version? QEMU currently only supports 32 bit Windows executables which work on any current Windows version version (XP and later, 32 and 64 bit). I use latest MinGW from http://www.mingw.org/ (native compilation on Windows) and Debian cross compilations. Those are available from http://qemu.weilnetz.de/w32/. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-20 8:41 ` Stefan Weil @ 2011-08-23 7:39 ` Roy Tam 2011-09-07 7:44 ` Roy Tam 0 siblings, 1 reply; 13+ messages in thread From: Roy Tam @ 2011-08-23 7:39 UTC (permalink / raw) To: Stefan Weil; +Cc: Paolo Bonzini, qemu-devel, Stefan Hajnoczi 2011/8/20 Stefan Weil <weil@mail.berlios.de>: > Am 16.08.2011 20:50, schrieb Paolo Bonzini: >> >> On 08/16/2011 05:45 AM, Stefan Hajnoczi wrote: >>> >>> Roy, >>> This stack trace does not reveal much. >>> >>> Is there any MinGW gcc user that has successfully built and run >>> qemu.git? >> >> I would be surprised if Stefan Weil hasn't. > > How did you know that? > >>> Which version/architecture of Windows and which MinGW >>> version? > > QEMU currently only supports 32 bit Windows executables > which work on any current Windows version version > (XP and later, 32 and 64 bit). > > I use latest MinGW from http://www.mingw.org/ (native compilation > on Windows) and Debian cross compilations. Those are available > from http://qemu.weilnetz.de/w32/. > > Did you cross compile it to get those binaries? They run fine here, but not mine. I tried rebuilding all dependencies(gettext, libiconv, glib, zlib) under gcc 4.6.1 but I still get same error with latest git revision. I wonder if there is someone (excluding me) can build and run QEMU successfully under Windows(MinGW+MSYS) environment. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) 2011-08-23 7:39 ` Roy Tam @ 2011-09-07 7:44 ` Roy Tam 0 siblings, 0 replies; 13+ messages in thread From: Roy Tam @ 2011-09-07 7:44 UTC (permalink / raw) To: Stefan Weil; +Cc: Paolo Bonzini, qemu-devel, Stefan Hajnoczi 2011/8/23 Roy Tam <roytam@gmail.com>: > 2011/8/20 Stefan Weil <weil@mail.berlios.de>: >> Am 16.08.2011 20:50, schrieb Paolo Bonzini: >>> >>> On 08/16/2011 05:45 AM, Stefan Hajnoczi wrote: >>>> >>>> Roy, >>>> This stack trace does not reveal much. >>>> >>>> Is there any MinGW gcc user that has successfully built and run >>>> qemu.git? >>> >>> I would be surprised if Stefan Weil hasn't. >> >> How did you know that? >> >>>> Which version/architecture of Windows and which MinGW >>>> version? >> >> QEMU currently only supports 32 bit Windows executables >> which work on any current Windows version version >> (XP and later, 32 and 64 bit). >> >> I use latest MinGW from http://www.mingw.org/ (native compilation >> on Windows) and Debian cross compilations. Those are available >> from http://qemu.weilnetz.de/w32/. >> >> > > Did you cross compile it to get those binaries? They run fine here, > but not mine. > I tried rebuilding all dependencies(gettext, libiconv, glib, zlib) > under gcc 4.6.1 but I still get same error with latest git revision. > I wonder if there is someone (excluding me) can build and run QEMU > successfully under Windows(MinGW+MSYS) environment. > I finally downgrade MinGW GCC from 4.6.1(xvidvideo.ru) to 4.3.3-tdm and recompile all dependency and QEMU works well at the end. ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-09-07 7:44 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-08 0:30 [Qemu-devel] Compilation error of coroutine-win32.c with gcc version 3.4.5 (mingw-vista special r3) Roy Tam 2011-08-08 6:21 ` Stefan Hajnoczi 2011-08-08 6:36 ` Roy Tam 2011-08-16 7:38 ` Roy Tam 2011-08-16 12:45 ` Stefan Hajnoczi 2011-08-16 18:50 ` Paolo Bonzini 2011-08-17 17:20 ` Blue Swirl 2011-08-17 17:23 ` Stefan Hajnoczi 2011-08-17 17:26 ` Paolo Bonzini 2011-08-18 3:36 ` Roy Tam 2011-08-20 8:41 ` Stefan Weil 2011-08-23 7:39 ` Roy Tam 2011-09-07 7:44 ` Roy Tam
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).