Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support #146

Open
elegaanz opened this issue Jan 9, 2016 · 27 comments
Open

Windows support #146

elegaanz opened this issue Jan 9, 2016 · 27 comments
Labels
Milestone

Comments

@elegaanz
Copy link

elegaanz commented Jan 9, 2016

Hello,

I'm developing with Vala on Windows (I'm the only one, I think :p ). I tried your framework with Vala 0.20, but it doesn't seems to work ...

Is a Windows support planned ? And excuse me if I have done some mistakes with English ... I'm learning. 😄

@arteymix
Copy link
Member

arteymix commented Jan 9, 2016

It's not planned, but it should be done whenever it would be sufficiently stable for production use.

The framework rely essentially upon portable libraries, so it should not take too much effort to build a working DLL.

What kind of issues are you experiencing?

@elegaanz
Copy link
Author

Here is my errors.

`using Gee;
      ^^^
vsgi-fastcgi.vala:19.7-19.13: error: The namespace name `FastCGI' could not be found
using FastCGI;
      ^^^^^^^
vsgi-fastcgi.vala:65.18-65.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream @in { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:67.49-67.63: error: The symbol `FastCGI' could not be found
                public StreamInputStream (GLib.Socket socket, global::FastCGI.Stream @in) {
                                                              ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:65.18-65.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream @in { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:65.18-65.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream @in { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:65.18-65.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream @in { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:118.18-118.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream @out { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:120.18-120.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream err { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:125.50-125.64: error: The symbol `FastCGI' could not be found
                public StreamOutputStream (GLib.Socket socket, global::FastCGI.Stream @out, global::FastCGI.Stream err) {
                                                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:125.79-125.93: error: The symbol `FastCGI' could not be found
                public StreamOutputStream (GLib.Socket socket, global::FastCGI.Stream @out, global::FastCGI.Stream err) {
                                                                                            ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:118.18-118.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream @out { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:118.18-118.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream @out { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:118.18-118.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream @out { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:120.18-120.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream err { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:120.18-120.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream err { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:120.18-120.32: error: The symbol `FastCGI' could not be found
                public unowned global::FastCGI.Stream err { construct; get; }
                               ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:321.5-321.19: error: The symbol `FastCGI' could not be found
                                global::FastCGI.request request;
                                ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:375.20-375.34: error: The symbol `FastCGI' could not be found
                        private unowned global::FastCGI.request request;
                                        ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:391.38-391.52: error: The symbol `FastCGI' could not be found
                        public Connection (Server server, global::FastCGI.request request) {
                                                          ^^^^^^^^^^^^^^^
vsgi-fastcgi.vala:33.37-33.51: error: The symbol `FastCGI' could not be found
        private inline void process_error (global::FastCGI.Stream stream) throws IOError {
                                           ^^^^^^^^^^^^^^^
valum-view.vala:38.19-38.22: error: The symbol `Ctpl' could not be found
                private unowned Ctpl.Token tree;
                                ^^^^
valum-view.vala:45.10-45.13: error: The symbol `Ctpl' could not be found
                public Ctpl.Environ environment = new Ctpl.Environ ();
                       ^^^^
valum-view.vala:164.44-164.53: error: The type name `Collection' could not be found
                public void push_collection (string key, Collection collection) {
                                                         ^^^^^^^^^^
valum-view.vala:166.28-166.43: error: The type name `Collection' could not be found
                                this.push_ints (key, ((Collection<long>) collection).to_array ());
                                                       ^^^^^^^^^^^^^^^^
valum-view.vala:170.30-170.47: error: The type name `Collection' could not be found
                                this.push_floats (key, ((Collection<double>) collection).to_array ());
                                                         ^^^^^^^^^^^^^^^^^^
valum-view.vala:174.31-174.48: error: The type name `Collection' could not be found
                                this.push_strings (key, ((Collection<string>) collection).to_array ());
                                                          ^^^^^^^^^^^^^^^^^^
valum-view.vala:189.37-189.55: error: The type name `Map' could not be found
                public void push_map (string key, Map<string, Value?> map) {
                                                  ^^^^^^^^^^^^^^^^^^^
valum-view.vala:190.13-190.23: error: The type name `MapIterator' could not be found
                        foreach (MapIterator elem in map) {
                                 ^^^^^^^^^^^
valum-view.vala:198.44-198.62: error: The type name `Map' could not be found
                public void push_string_map (string key, Map<string, string> map) {
                                                         ^^^^^^^^^^^^^^^^^^^
valum-view.vala:199.13-199.23: error: The type name `MapIterator' could not be found
                        foreach (MapIterator elem in map) {
                                 ^^^^^^^^^^^
valum-view.vala:207.41-207.57: error: The type name `Map' could not be found
                public void push_int_map (string key, Map<string, long> map) {
                                                      ^^^^^^^^^^^^^^^^^
valum-view.vala:208.13-208.23: error: The type name `MapIterator' could not be found
                        foreach (MapIterator elem in map) {
                                 ^^^^^^^^^^^
valum-view.vala:221.49-221.72: error: The type name `MultiMap' could not be found
                public void push_string_multimap (string key, MultiMap<string, string> multimap) {
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^
valum-view.vala:232.46-232.67: error: The type name `MultiMap' could not be found
                public void push_int_multimap (string key, MultiMap<string, long> multimap) {
                                                           ^^^^^^^^^^^^^^^^^^^^^^
Compilation failed: 35 error(s), 0 warning(s)

But I have issues with Gee, I can't compile packaging it.

@arteymix
Copy link
Member

Gee has been removed along with CTPL, so you should try this release v0.2.6.

The FastCGI namespace is provided by a VAPI https://github.com/valum-framework/valum/blob/master/vapi/fcgi.vapi It's likely a build issue.

@elegaanz
Copy link
Author

Ok, i'll try to build with it. Thanks.

@elegaanz
Copy link
Author

Ok, I have just one last problem (I hope). Soup.Status doesn't seems to exist in my version of libsoup (I have 2.4). Which version are you using ?

@arteymix
Copy link
Member

Minimal dependencies are described here: http://valum-framework.readthedocs.org/en/latest/installation.html#dependencies

It requires at least libsoup-2.4 (>=2.38). You can check the version in libsoup-2.4.pc which should be in pkgconfig in the DLL folder (but I'm just guessing here).

@arteymix
Copy link
Member

It's possible that the VAPI is not up-to-date though: it ships along with Vala.

@elegaanz
Copy link
Author

That too complicated. I stop trying to install Valum. I'll install Linux. Thanks for your help !

@arteymix
Copy link
Member

@Bat41

I'm only half sorry to hear that! I'll have to get my hands dirty some days I suppose.

You should use Fedora, Valum comes packaged and batteries-included from that copr https://copr.fedoraproject.org/coprs/arteymix/valum-framework/

@elegaanz
Copy link
Author

I have recently build Val 0.32 for Windows. I tried to recompile Valum using this version, and i can compile just with few changes (6 lines). Yey ! But i still get this error :

error: program does not contain a static `main' method

Can you help me, please ? 😄

@elegaanz elegaanz reopened this Feb 16, 2016
@arteymix
Copy link
Member

Could you gist me the whole build log?

If examples are not enabled, it should not build a program, but rather a shared library.

@elegaanz
Copy link
Author

@elegaanz
Copy link
Author

How do you tell to the compiler to output a library (.vapi I supose) ?

@arteymix
Copy link
Member

Just add --library=valum and it should work :)

@arteymix
Copy link
Member

Otherwise, just build everything along your application.

It would be nice to adapt the build with waf though.

@arteymix
Copy link
Member

Then, maybe work CI out with AppVeyor

@elegaanz
Copy link
Author

Thanks. Now Vala compilation works, but C don't. I just have to add headers file.

@elegaanz
Copy link
Author

I have got some problems ... https://gist.github.com/Bat41/7e07829451dbde71cb7e

I think it's not today I could start using Valum. 😭

@arteymix
Copy link
Member

@Bat41 This is supposed to be automated by pkg-config.

In short, I would just like to hear it working, I think it would motivate me to port the build. Have you tried waf on Windows?

How about being (eventually) in charge of testing the build on Windows?

@arteymix
Copy link
Member

@Bat41 You can use Vagrant to work in a virtual environment in the meantime

@elegaanz
Copy link
Author

I tried waf long time ago, but i didn't worked, so I made my own script. But I could try again ...

@arteymix arteymix assigned arteymix and unassigned arteymix Feb 17, 2016
@elegaanz
Copy link
Author

Waf doesn't detect gcc. 😑

But can't I just add the source in the folder of my website sources ? Without compilation.

@elegaanz
Copy link
Author

I tried, and it's not possible. 😞

@arteymix
Copy link
Member

There's a couple of things to do for Windows support:

  • conditionally build with gio-unix-2.0 (not portable)
  • fix the build (waf should work on Windows)
  • setup CI on AppVeyor
  • test with IIS HTTP server

As I said, all of Valum's dependencies are portable, so it's just a matter of how we build.

FastCGI uses UnixInputStream and UnixOutputStream to provide polling on streams. There should be a graceful fallback, probably Windows-specific.

SCGI is fully portable, but I plan on supporting UNIX domain socket as well, so it has to be conditionally enabled.

CGI work with UNIX streams too, so it should be adapted.

@arteymix
Copy link
Member

@Bat41 By the way I've just successfully cross-compiled for mingwn using Meson. There's still some work to do it get it right though

There's a couple of changes to make so that the framework can be fully portable.

It would basically allow anyone to cross-compile a Web app into a Windows executable.

arteymix added a commit that referenced this issue Oct 27, 2016
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

For FastCGI, gracefully fallback with no fd-based async I/O.
arteymix added a commit that referenced this issue Oct 27, 2016
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

For FastCGI, gracefully fallback with no fd-based async I/O.

Add basic cross files to target 32 and 64 bit targets.
arteymix added a commit that referenced this issue Oct 27, 2016
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

For FastCGI, gracefully fallback with no fd-based async I/O.

Add basic cross files to target 32 and 64 bit targets.
arteymix added a commit that referenced this issue Oct 27, 2016
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

For FastCGI, gracefully fallback with no fd-based async I/O.

Add basic cross files to target 32 and 64 bit targets.
arteymix added a commit that referenced this issue Oct 30, 2016
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

Disable '--socket' option if 'gio-unix-2.0' is not available.

For FastCGI, use 'GLib.Win32InputStream' and 'GLib.Win32OutputStream'
and gracefully fallback with basic I/O wrapper.

Add basic cross files to target 32 and 64 bit targets with MinGW.

Drop non-portable 'fork' for an eventual portable strategy involving
'GLib.Subprocess'.
arteymix added a commit that referenced this issue Oct 30, 2016
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

Disable '--socket' option if 'gio-unix-2.0' is not available.

For FastCGI, use 'GLib.Win32InputStream' and 'GLib.Win32OutputStream'
and gracefully fallback with basic I/O wrapper.

Add basic cross files to target 32 and 64 bit targets with MinGW.

Drop non-portable 'fork' for an eventual portable strategy involving
'GLib.Subprocess'.
arteymix added a commit that referenced this issue Oct 30, 2016
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

Disable '--socket' option if 'gio-unix-2.0' is not available.

For FastCGI, use 'GLib.Win32InputStream' and 'GLib.Win32OutputStream'
and gracefully fallback with basic I/O wrapper.

Add basic cross files to target 32 and 64 bit targets with MinGW.

Drop non-portable 'fork' for an eventual portable strategy involving
'GLib.Subprocess'.
arteymix added a commit that referenced this issue Oct 30, 2016
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

Disable '--socket' option if 'gio-unix-2.0' is not available.

For FastCGI, use 'GLib.Win32InputStream' and 'GLib.Win32OutputStream'
and gracefully fallback with basic I/O wrapper.

Add basic cross files to target 32 and 64 bit targets with MinGW.

Drop non-portable 'fork' for an eventual portable strategy involving
'GLib.Subprocess'.
@arteymix arteymix mentioned this issue Feb 19, 2017
5 tasks
arteymix added a commit that referenced this issue Feb 19, 2017
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

Use 'add_project_arguments' instead of 'vala_defines'

Disable '--socket' option if 'gio-unix-2.0' is not available.

For FastCGI, use 'GLib.Win32InputStream' and 'GLib.Win32OutputStream'
and gracefully fallback with basic I/O wrapper.

Add basic cross files to target 32 and 64 bit targets with MinGW.
arteymix added a commit that referenced this issue Feb 20, 2017
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

Use 'add_project_arguments' instead of 'vala_defines'

Disable '--socket' option if 'gio-unix-2.0' is not available.

For FastCGI, use 'GLib.Win32InputStream' and 'GLib.Win32OutputStream'
and gracefully fallback with basic I/O wrapper.

Add basic cross files to target 32 and 64 bit targets with MinGW.
@arteymix arteymix modified the milestone: 0.4.0 Feb 22, 2017
@ZanderBrown
Copy link

Having just attempted to build under MSYS2 i've come to the conclusion this is impossible because of the dependency on gio-unix

@arteymix
Copy link
Member

@ZanderBrown There's work in progress for making it optional, see #198 is using gio-windows instead and almost all tests are passing

arteymix added a commit that referenced this issue Mar 20, 2017
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

Use 'add_project_arguments' instead of 'vala_defines'

Disable '--socket' option if 'gio-unix-2.0' is not available.

For FastCGI, use 'GLib.Win32InputStream' and 'GLib.Win32OutputStream'
and gracefully fallback with basic I/O wrapper.

Add basic cross files to target 32 and 64 bit targets with MinGW.
arteymix added a commit that referenced this issue Mar 20, 2017
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

Use 'add_project_arguments' instead of 'vala_defines'

Disable '--socket' option if 'gio-unix-2.0' is not available.

For FastCGI, use 'GLib.Win32InputStream' and 'GLib.Win32OutputStream'
and gracefully fallback with basic I/O wrapper.

Add basic cross files to target 32 and 64 bit targets with MinGW.
arteymix added a commit that referenced this issue Mar 20, 2017
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

Use 'add_project_arguments' instead of 'vala_defines'

Disable '--socket' option if 'gio-unix-2.0' is not available.

For FastCGI, use 'GLib.Win32InputStream' and 'GLib.Win32OutputStream'
and gracefully fallback with basic I/O wrapper.

Add basic cross files to target 32 and 64 bit targets with MinGW.
arteymix added a commit that referenced this issue Mar 20, 2017
Make both platform-dependant 'gio-unix-2.0' and 'gio-windows-2.0'
dependencies optional and use features accordingly via 'GIO_UNIX' and
'GIO_WINDOWS' definitions.

Use 'add_project_arguments' instead of 'vala_defines'

Disable '--socket' option if 'gio-unix-2.0' is not available.

For FastCGI, use 'GLib.Win32InputStream' and 'GLib.Win32OutputStream'
and gracefully fallback with basic I/O wrapper.

Add basic cross files to target 32 and 64 bit targets with MinGW.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants