Re: glib thread support & win32



On 24 June 2012 22:07, Dieter Verfaillie <dieterv optionexplicit be> wrote:
> On Sun, 24 Jun 2012 11:27:36 +0300, Marko Lindqvist wrote:
>>
>> Relevant part of stderr:
>
>> /var/crosser/src/glib-2.32.3/glib/gatomic.c:630:21: error: pthread.h:
>> No such file or directory
>
> GLib, when built with MinGW, relies on gcc's built-in atomic ops, which
> are only available when CFLAGS="-march=i486" (or i586 or i686).



> Last time
> I checked, a warning (or error) was emitted by the configure script when
> the appropriate -march flag was not set.
>
> So, you seeing errors about pthread.h indicates that somehow, you didn't
> get the configure script erroring out with the -march error message and the
> fallback gatomic.c implementation (which doesn't work for win32) is being
> built.
>
> Which leads to: did you set CFLAGS="-march=i486" when running ./configure?

 There's -march=i586.

 Nobody is aware of any relevant changes between glib 2.30 and 2.32?
Short of version number exactly same build scripts, that do everything
from the downloading of the tarball to 'make install', compile 2.30.3
succesfully.

 Looking into configure.ac and config.log... configure time test seems
to set CFLAGS="-march=i486" even if it's not provided by user, by the
way...

configure:27047: i586-mingw32msvc-gcc -c -march=i486 -isystem
/home/cazfi/.crosser/0.7.3.1/current/winstack/include -isystem
/usr/i586-mingw32msvc/include -march=i586   conftest.c >&5
conftest.c: In function 'main':
conftest.c:83: error: '__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4' undeclared
(first use in this function)
conftest.c:83: error: (Each undeclared identifier is reported only once
conftest.c:83: error: for each function it appears in.)
configure:27047: $? = 1


> i586-mingw32msvc-gcc -v
Using built-in specs.
Target: i586-mingw32msvc
Configured with:
/build/buildd/mingw32-4.2.1.dfsg/build_dir/src/gcc-4.2.1-2-dfsg/configure
-v --prefix=/usr --target=i586-mingw32msvc --enable-languages=c,c++
--enable-threads --enable-sjlj-exceptions --disable-multilib
--enable-version-specific-runtime-libs
Thread model: win32
gcc version 4.2.1-sjlj (mingw32-2)



 - ML


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]