[PATCH][W32] W32 and MSys compatibility

Dan Nicholson dbn.lists at gmail.com
Mon Aug 20 06:12:49 PDT 2012


On Mon, Aug 20, 2012 at 6:05 AM, LRN <lrn1986 at gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 20.08.2012 16:39, Dan Nicholson wrote:
>> On Sun, Jun 3, 2012 at 7:06 AM, Dan Nicholson <dbn.lists at gmail.com>
>> wrote:
>>> On Thu, May 31, 2012 at 9:18 AM, LRN <lrn1986 at gmail.com> wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>>
>>>> On 21.05.2012 16:37, Dan Nicholson wrote:
>>>>> On Sat, May 19, 2012 at 4:09 PM, LRN <lrn1986 at gmail.com>
>>>>> wrote:
>>>>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>>>>>>
>>>>>> That said, when compiled with internal glib, pkg-config
>>>>>> unexplainably crashes on gthread-win32.c:343
>>>>>
>>>>> Hmm, so it seems avoiding libintl needs some surgery and
>>>>> you're hitting a crash in the threading code. Do they seem
>>>>> related? Have you tried --with-internal-glib leaving the
>>>>> gettext/libintl code alone? Can you get a backtrace?
>>>>
>>>> gdb log is attached.
>>>
>>> Hmm, that crash seems pretty independent of pkg-config unless
>>> we're initializing glib wrong or something. I wonder if you can
>>> try either to use pkg-config with the a full glib-2.32 version or
>>> just to write a stupid test program that just uses
>>> g_build_filename against the internal glib.
>>
>> I tracked this down over the past few days. It turns out libglib
>> wasn't initializing correctly when built as a static library on
>> windows. I added a fix plus removed the gettext dependency as we
>> discussed. I briefly tried things in a windows vm and "make check"
>> passed. Can you try out git master and see if --with-internal-glib
>> works for you? I _think_ it should be working out of the box for
>> mingw/msys.
>
> It totally works.

Thanks for checking. I actually just took the fix from upstream
bugzilla. I can't remember then number offhand, but it's in the log.

> The only problem is that i configure pkg-config with --enable-shared,
> which gets passed to internal glib configure, overriding LT_INIT()
> default arguments you've patched in. shared becomes enabled, along
> with static, and it dies with "Can not build both shared and static at
> the same time on Windows.".

Hmm, yeah that is a bit fragile. I wasn't thinking about people
passing in default shared/static flags, but I'm sure it's a common
occurrence.

> Solved with the attached hack. Passes `make check'.

That would work. I'll fold that into one of the patches that gets
reapplied to glib and commit.

--
Dan


More information about the pkg-config mailing list