After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 685180 - Vala fails to compile for Windows
Vala fails to compile for Windows
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: GObject Introspection
0.18.x
Other Windows
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-01 06:41 UTC by Arnel Borja
Modified: 2012-11-03 06:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (4.47 KB, patch)
2012-10-01 06:41 UTC, Arnel Borja
reviewed Details | Review
Patch with return types fixed (4.48 KB, patch)
2012-11-01 08:37 UTC, Arnel Borja
committed Details | Review

Description Arnel Borja 2012-10-01 06:41:35 UTC
Created attachment 225466 [details] [review]
Patch

I'm cross-compiling Vala for Windows, but it is failing because of some POSIX calls not available in Windows. There are also some other problems, mostly about executable extensions.

I created a patch to fix these errors. I still haven't tested it well enough, but C code generation seems to work fine. I can't test it when it directly compiles a source to an executable, I don't have a working MinGW compiler right now. I just created a dummy "cc.exe" then run my cross-compiler with the options passed by valac, and it compiled fine.
Comment 1 Jürg Billeter 2012-10-20 08:24:50 UTC
Review of attachment 225466 [details] [review]:

Thanks for the patch. It looks fine with one small exception.

::: gobject-introspection/scanner.c
@@ +1612,3 @@
+   */
+  extern __stdcall WaitForSingleObject(void*, int);
+  extern __stdcall GetExitCodeProcess(void*, int*);

The return type is missing.
Comment 2 Arnel Borja 2012-11-01 08:37:53 UTC
Created attachment 227783 [details] [review]
Patch with return types fixed

Sorry, only noticed your review today.

I only copied the way GetFullPathNameA in gobject-introspection/grealpath.h is declared which doesn't have the return type. It should be "unsigned long" (DWORD) if you want to fix it.

Thanks for reviewing my patch.
Comment 3 Jürg Billeter 2012-11-03 06:37:32 UTC
commit fd2b222a9ad7382bf0f802d50a9702d455195ef3
Author: Arnel A. Borja <kyoushuu@yahoo.com>
Date:   Sun Sep 30 18:33:56 2012 +0800

    Fix build for Windows
    
    - Replace POSIX calls for spawning process with functions from Windows
      API when compiling for Windows
    - Add EXEEXT to valac and vapigen paths
    - Remove EXEEXT from scripts
    
    Fixes bug 685180.