[Dev] [SDK/Emulator] Building emulator with latest MinGW

Stanislav Vorobiov s.vorobiov at samsung.com
Thu Dec 26 08:50:38 GMT 2013


Hi, Syeon Hwang

Thanks for the tip, it worked!

BTW, if anyone else encounters this again, note that you'll have to uninstall all your 4.8.1 compilers first before
doing downgrade to 4.7.2

On 12/26/2013 11:06 AM, 황석연 wrote:
> Dear all.
> 
>  
> 
> I already tried to compile on recent MinGW, but I met same result.
> 
> In fact, it is caused by recent GCC version 4.8.1.
> 
>  
> 
> I tried to figure out why for a hour, but I could not find the reason.
> 
> (It could be a compiler bug, so it should be analyzed on assembly level.)
> 
> If someone find the reason, please let me know.
> 
>  
> 
> You can use recent MinGW, if you downgrade GCC version.
> 
> # mingw-get install gcc-core=4.7.2-1
> 
>  
> 
> Thanks.
> 
>  
> 
>  
> 
>  
> 
> ------- *Original Message* -------
> 
> *Sender* : Stanislav Vorobiov<s.vorobiov at samsung.com> Leading Engineer/SRR-Mobile S/W Group/삼성전자
> 
> *Date* : 2013-12-25 00:26 (GMT+09:00)
> 
> *Title* : [SDK/Emulator] Building emulator with latest MinGW
> 
>  
> 
> Hi, all
> 
> Currently I'm tying to setup emulator build environment on a new windows xp 32 machine. I'm using latest
> MinGW - http://sourceforge.net/projects/mingw since there's no other choice there.
> 
> Emulator builds successfully, however, there're problems running it, there're crashes. I've found the cause
> of first crash:
> qemu/tizen/src/emulator.c:print_system_info - strftime(timeinfo, sizeof(timeinfo), "%Y/%m/%d %H:%M:%S", tm_time);
> 
> It crashes here because in latest MinGW time_t is defined to be 8-byte long, so fix is simple:
> 
> gettimeofday(&tval, NULL);
> time_t tmp = tval.tv_sec;
> tm_time = localtime(&tmp);
> strftime(timeinfo, sizeof(timeinfo), "%Y/%m/%d %H:%M:%S", tm_time);
> 
> After this it boots further, but crashes later in:
> 
> Program received signal SIGSEGV, Segmentation fault.
> _fu797____stack_chk_guard () at block.c:3864
> 3864        BlockDriverState *bs = acb->common.bs;
> (gdb) bt
> #0  _fu797____stack_chk_guard () at block.c:3864
> #1  0x004452cb in _fu2007____stack_chk_guard () at coroutine-win32.c:57
> #2  0x7c80b713 in KERNEL32!GetModuleFileNameA ()
>    from C:\WINDOWS\system32\kernel32.dll
> #3  0x7c82ff99 in KERNEL32!ConvertThreadToFiber ()
>    from C:\WINDOWS\system32\kernel32.dll
> Cannot access memory at address 0xbaadf011
> 
> The reason may be changed time_t size or something else...
> 
> Does anyone know something about this ? Is there a workaround ? Fixing those problems is taking too long already,
> is there a way I can build correct emulator image on a fresh windows xp 32 machine ?
> 
>  
> 
>  
> 
>  
> 



More information about the Dev mailing list