Bug 23872 - mingw32 cross-compile from linux on Fedora 13
Summary: mingw32 cross-compile from linux on Fedora 13
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Enhancement
Assignee: Nobody
URL: http://wiki.linet.dk/index.php/Buid_e...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-10 10:47 PST by Mikkel Kruse Johnsen
Modified: 2012-12-12 00:10 PST (History)
5 users (show)

See Also:


Attachments
1-39903-replace_icu_with_glib_idn (73.67 KB, patch)
2009-02-10 10:48 PST, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
2-39903-mingw.diff (9.85 KB, patch)
2009-02-10 10:49 PST, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
3-39903-localtime_gmtime.diff (2.24 KB, patch)
2009-02-10 10:49 PST, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
4-39903-web-workers.diff (1.78 KB, patch)
2009-02-10 10:49 PST, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
5-39903-pluginwin.diff (9.05 KB, patch)
2009-02-10 10:50 PST, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
1-1.1.5-replace_icu_with_glib_idn.diff (74.63 KB, patch)
2009-04-24 08:26 PDT, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
2-1.1.5-mingw.diff (32.76 KB, patch)
2009-04-24 08:26 PDT, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
3-1.1.5-localtime_gmtime.diff (2.27 KB, patch)
2009-04-24 08:26 PDT, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
4-1.1.5-database.diff (2.66 KB, patch)
2009-04-24 08:27 PDT, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
5-1.1.5-gio.diff (1.36 KB, patch)
2009-04-24 08:27 PDT, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
6-1.1.5-download.diff (922 bytes, patch)
2009-04-24 08:27 PDT, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
webkit-1.1.11-glibunicode.patch (92.05 KB, patch)
2009-11-14 02:45 PST, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
webkit-1.1.11-gio.patch (686 bytes, patch)
2009-11-14 02:46 PST, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
All kinds of fixes (26.70 KB, patch)
2010-06-13 04:16 PDT, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
Fix for opening local files on windows (654 bytes, patch)
2010-06-13 04:17 PDT, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff
JPEG patch (1.73 KB, patch)
2010-06-13 04:18 PDT, Mikkel Kruse Johnsen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikkel Kruse Johnsen 2009-02-10 10:47:08 PST
Information and patches for compiling WebKit-Gtk on linux (Fedora 10) for windows.

vi /usr/i686-pc-mingw32/sys-root/mingw/include/stdlib.h
Change line 317 to: __inline__ double __cdecl __MINGW_NOTHROW strtod (const char* __restrict__ __nptr, char** __restrict__ __endptr)

Thanks to Camarade_Tux for most of the patches.



# rpm -qa | grep mingw32
mingw32-zlib-1.2.3-11.fc10.noarch
mingw32-gettext-0.17-7.fc10.noarch
mingw32-binutils-2.19-2.fc10.i386
mingw32-pixman-0.13.2-2.fc10.noarch
mingw32-gcc-4.3.2-12.fc10.i386
mingw32-expat-2.0.1-2.fc10.noarch
mingw32-curl-7.18.2-5.fc10.noarch
mingw32-pthreads-2.8.0-4.fc10.noarch
mingw32-gcc-c++-4.3.2-12.fc10.i386
mingw32-filesystem-43-6.fc11.noarch
mingw32-iconv-1.12-7.fc10.noarch
mingw32-termcap-1.3.1-5.fc10.noarch
mingw32-glib2-2.19.5-2.1.fc10.noarch
mingw32-freetype-2.3.8-1.fc10.noarch
mingw32-jasper-1.900.1-6.fc10.noarch
mingw32-cairo-1.8.0-6.fc10.noarch
mingw32-w32api-3.12-8.fc10.noarch
mingw32-libidn-1.9-3.fc10.noarch
mingw32-atk-1.25.2-5.fc10.noarch
mingw32-libssh2-0.18-4.fc10.noarch
mingw32-gtk2-2.15.0-3.fc10.noarch
mingw32-cpp-4.3.2-12.fc10.i386
mingw32-runtime-3.15.1-10.fc10.noarch
mingw32-libpng-1.2.34-2.fc10.noarch
mingw32-libjpeg-6b-8.fc10.noarch
mingw32-pango-1.22.1-4.fc10.noarch
mingw32-libxml2-2.7.2-6.fc10.noarch
mingw32-openssl-0.9.8j-2.fc10.noarch
mingw32-fontconfig-2.6.0-8.fc10.noarch
mingw32-libglade2-2.6.3-4.fc10.noarch
Comment 1 Mikkel Kruse Johnsen 2009-02-10 10:48:02 PST
Created attachment 27524 [details]
1-39903-replace_icu_with_glib_idn
Comment 2 Mikkel Kruse Johnsen 2009-02-10 10:49:12 PST
Created attachment 27525 [details]
2-39903-mingw.diff
Comment 3 Mikkel Kruse Johnsen 2009-02-10 10:49:31 PST
Created attachment 27526 [details]
3-39903-localtime_gmtime.diff
Comment 4 Mikkel Kruse Johnsen 2009-02-10 10:49:52 PST
Created attachment 27528 [details]
4-39903-web-workers.diff
Comment 5 Mikkel Kruse Johnsen 2009-02-10 10:50:07 PST
Created attachment 27529 [details]
5-39903-pluginwin.diff
Comment 6 Mikkel Kruse Johnsen 2009-02-10 10:52:44 PST
One patch is missing (need to be created). When it complains about missing pthread.h and sched.h do this.

vi GNUmakefile

and add "-I/usr/i686-pc-mingw32/sys-root/mingw/include/pthread" to GLOBALDEPS_CFLAGS
Comment 7 Mikkel Kruse Johnsen 2009-02-10 10:54:25 PST
Comment on attachment 27524 [details]
1-39903-replace_icu_with_glib_idn

Keep an eye on this bug: 15914
Comment 8 Mikkel Kruse Johnsen 2009-04-24 08:26:02 PDT
Created attachment 29739 [details]
1-1.1.5-replace_icu_with_glib_idn.diff
Comment 9 Mikkel Kruse Johnsen 2009-04-24 08:26:26 PDT
Created attachment 29740 [details]
2-1.1.5-mingw.diff
Comment 10 Mikkel Kruse Johnsen 2009-04-24 08:26:46 PDT
Created attachment 29741 [details]
3-1.1.5-localtime_gmtime.diff
Comment 11 Mikkel Kruse Johnsen 2009-04-24 08:27:15 PDT
Created attachment 29742 [details]
4-1.1.5-database.diff
Comment 12 Mikkel Kruse Johnsen 2009-04-24 08:27:37 PDT
Created attachment 29743 [details]
5-1.1.5-gio.diff
Comment 13 Mikkel Kruse Johnsen 2009-04-24 08:27:57 PDT
Created attachment 29744 [details]
6-1.1.5-download.diff
Comment 14 Mikkel Kruse Johnsen 2009-04-24 08:31:43 PDT
Just updated to 1.1.5 for cross-compiling webkitgtk to windows.

These are not quality patches, but it works on Windows.

5-1.1.5-gio.diff: Needs to be fixed so that "didReceiveResponse" also works on Windows.

6-1.1.5-download.diff: Some conflict with the signal "ERROR" renamed to "DOWNLOAD_ERROR"

One patch is still missing (need to be created). When it complains about missing
pthread.h and sched.h do this.

vi GNUmakefile

and add "-I/usr/i686-pc-mingw32/sys-root/mingw/include/pthread" to
GLIB_CFLAGS
Comment 15 Phil Longstaff 2009-05-07 06:12:24 PDT
Can you provide a binary for me to test?  I'm looking to use webkitgtk for the gnucash project for report/chart display.  I've integrated with webkitgtk 1.0.1 on my ubuntu linux system, and someone has built it on macosx, but I've been unable to build properly on mingw on win32.  If you could post a binary somewhere, I could integrate on winxp and test.
Comment 16 Mikkel Kruse Johnsen 2009-05-07 08:22:06 PDT
Here is the binaries:

http://bohr.linet.dk/files/

bin.zip is the full "bin" dir I use.
Comment 17 Phil Longstaff 2009-10-20 17:49:21 PDT
Is this still being worked on?  Do you have patches for more recent versions of webkit-gtk?
Comment 18 Mikkel Kruse Johnsen 2009-11-14 02:43:07 PST
Most of these patches is not necessary any more. Keep a eye out for:

https://bugs.webkit.org/show_bug.cgi?id=31468
https://bugs.webkit.org/show_bug.cgi?id=31469
https://bugs.webkit.org/show_bug.cgi?id=31470

I uses two patches now for 1.1.11, since newer versions need the newest GLib (or Gtk)

Will close this, when the bugs above is closed.
Comment 19 Mikkel Kruse Johnsen 2009-11-14 02:45:10 PST
Created attachment 43224 [details]
webkit-1.1.11-glibunicode.patch
Comment 20 Mikkel Kruse Johnsen 2009-11-14 02:46:26 PST
Created attachment 43225 [details]
webkit-1.1.11-gio.patch
Comment 21 Alexey Proskuryakov 2010-06-12 15:48:35 PDT
> Will close this, when the bugs above is closed.

The bugs listed in comment 18 are fixed now - can this be closed? The remaining patches here aren't marked for review.
Comment 22 Mikkel Kruse Johnsen 2010-06-13 04:13:50 PDT
All patches are in the latest 1.2

The gio patch was a workaround, a new bug will be opened for that.
Comment 23 Mikkel Kruse Johnsen 2010-06-13 04:16:28 PDT
Created attachment 58587 [details]
All kinds of fixes

All kinds of fixes
Comment 24 Mikkel Kruse Johnsen 2010-06-13 04:17:22 PDT
Created attachment 58588 [details]
Fix for opening local files on windows

Fix for opening local files on windows

Should work for all other platforms aswell.
Comment 25 Mikkel Kruse Johnsen 2010-06-13 04:18:17 PDT
Created attachment 58589 [details]
JPEG patch

JPEG patch to use jpeg_boolean

Also a patch for some stat stuff.
Comment 26 Mikkel Kruse Johnsen 2010-06-13 04:19:54 PDT
Reopen for Fedora 13
Comment 27 Erik van Pienbroek 2010-06-13 04:31:09 PDT
(In reply to comment #25)
> Created an attachment (id=58589) [details]
> JPEG patch
> 
> JPEG patch to use jpeg_boolean
> 
> Also a patch for some stat stuff.

The jpeg_boolean is something I introduced in Fedora's version of libjpeg as libjpeg's definition of 'boolean' conflicts with the Win32 API's definition of 'boolean'. See https://bugzilla.redhat.com/show_bug.cgi?id=497492 and http://sourceforge.net/mailarchive/forum.php?thread_name=10940.1240594567%40sss.pgh.pa.us&forum_name=libjpeg-devel-6x for more details. This change hasn't been upstreamed yet (upstream libjpeg is kinda death). In my opinion this conflict should be fixed in libjpeg as we can't change the Win32 headers.
Comment 28 Alexey Proskuryakov 2010-06-13 11:27:38 PDT
> Reopen for Fedora 13

Thanks for following up on this! Generally, we prefer to have a separate bug for every patch, when practical. This particular bug is old enough for most discussion it in to be irrelevant for current work and misleading, meaning that someone won't be easily able to figure out what's going on by reading it.

> JPEG patch

This patch isn't marked for review - is that intentional?
Comment 29 Mikkel Kruse Johnsen 2010-06-14 02:40:20 PDT
(In reply to comment #28)
> Generally, we prefer to have a separate bug for every patch, when practical. 

I will open separate patches for "Fix for opening local files on windows" and "JPEG patch". 

The "All kinds of fixes" is a mess that needs splitting up and further testing and different fixes. It is hardcoded for windows compiling, needs "if OS_WIN" and stuff in Makefiles. Will try to split it up. Hope Fridrich will help.

> > JPEG patch
> 
> This patch isn't marked for review - is that intentional?

This patch I don't know about, since the change is in "libjpeg" like Erik #27 said it's a jpeg upstream fix, that we need to wait for. But that means changing the API of libjpeg, which maybe be bad. So yes it is intentional that it is not marked for review.

--

Overall I just kept this bug open for people that needs to compile webkit for windows.
Comment 30 Kalev Lember 2012-12-11 02:50:55 PST
I believe all the patches here have either landed in the webkit tree or are obsolete by now, and the bug can be closed.
Comment 31 Alexey Proskuryakov 2012-12-11 10:17:59 PST
Marking fixed per the above two comments.

> Overall I just kept this bug open for people that needs to compile webkit for windows.

If there is some information or patches that cannot be landed in WebKit trunk, WebKit wiki is a better place for that than Bugzilla.
Comment 32 Mikkel Kruse Johnsen 2012-12-12 00:10:31 PST
(In reply to comment #30)
> I believe all the patches here have either landed in the webkit tree or are obsolete by now, and the bug can be closed.


All patches are in the webkit tree. This bug can be closed