Re: MinGW/MSYS patches for gobject-introspection (dieterv's branch)

>>> On 2012/07/12 at 12:58 PM, "Martin Schlemmer" <Martin Schlemmer nwu ac za>
> I am a bit unsure of protocol, so correct me if needed.
> Attached are three patches that I used to get g-i to work in my MinGW/MSYS 
> setup without apparent problems.
> I have added Subjects to each - let me know if more information are needed.
> Comments/feedback are welcome.

Saw below on gtk-devel archives, so thought I would test and give some more feedback.

> Had a quick look:
> - the first patch I can understand, but still need to test,
>   have been running make without -jx up until now

Feedback not really needed, as its pretty obvious, but without make -j4 over here ends with:

make[2]: *** No rule to make target `g-ir-compiler', needed by `gir/DBus-1.0.typelib'.  Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/opt/workdir/mingw-gtk2-build/output/build/gobject-introspection-1.33.4'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/workdir/mingw-gtk2-build/output/build/gobject-introspection-1.33.4'
make: *** [all] Error 2

> - the second patch I'd probably ask for more info, it's
>   working fine with MinGW/MSYS from and the
>   gettext packages from over here, maybe
>   required with mingw-w64 or TDM or some other win32
>   gcc "distro"

Its really just my setup. I use pretty standard MinGW, but with TDM-gcc instead.
I also use the gettext-tools, but not libintl's headers or import library.
Also an issue with Ruben's mingw-w64 "distro" instead of standard MinGW gcc,
binutils, etc.

I have a ripped version of intl that I build with the stack for two reasons:
- link statically with win-iconv
- the created DLL is named libgtk_intl.dll.
  This are due to legacy issues when starting on win32 back in 2007 and using
  the installer available back then. It installed globally to %CommonFiles%\GTK,
  and I ran into issues with other programs also having intl.dll installed and in
  the path.

Yes, second is not how it should be done, and I do ship the stack with each app
these days, but there are still some legacy stuff about, and also easier on Dev box
to have everything in one point without messing with ENV vars each time.

Lastly, I figured there could be more cases when something like this is needed,
so some universal interface for setting it would be helpful.
Not a real train smash, I can just copy the my intl headers/libs to /mingw.

> - the third patch looks a bit hackish and thus would
>   be hell to get accepted ;)

Yep ;) I'm open to suggestions, but not sure how to work around it any other way.
Having MSE at work, and KIS at home, I did some testing at home, and while the
problem is still there, python just exited due to not being able to unlink the dir
(I have not looked at the implementation, but I guess it deletes each file, and then
try to unlink the directory even if a previous delete failed, and only then fail) with:

  GISCAN GObject-2.0.gir
  GISCAN GModule-2.0.gir
  GICOMP GLib-2.0.gir
Caught exception: <type 'exceptions.WindowsError'> WindowsError(145, 'The directory is not empty')
> c:\python27\lib\
-> os.rmdir(path)
make[2]: *** [GModule-2.0.gir] Error 1
make[2]: *** Waiting for unfinished jobs....

The "artificial lockup" do not occur any longer, so I would probably just amend
all comments to:

On MinGW/MSYS unlinking the temporary directory the first time do not always
succeed the first time due to AV-scanner activity on the created executable.

This seems to be closely related to high IO/CPU load and running g-ir-scanner with
a AV-scanner installed, and is highly intermittent. I think the only reason I ran into it,
was because I had a VM or two and another long build running while messing with

To repro, start some compile loop or long build, and run:

(while true; do rm -f *.gir *.typelib; make -j4 || exit 1; done)

and do something else (may take anything from a few minutes to an hour+).

Anyhow, let me know if anything else is needed.


Vrywaringsklousule / Disclaimer: 

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