Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5243

Broken Dlang build on Windows

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 0.13.0
    • Fix Version/s: None
    • Component/s: D - Library
    • Labels:
      None
    • Environment:

      Windows 10 Pro 1909

      LDC version 1.20.1

      DUB version 1.19.0

      Thrift 0.13.0

       

      Description

      Can't build on Windows with a recent-ish D compiler (LDC 1.20.1) .

      An immediate problem is that the D library is using a deprecated winsock import (std.c.windows.winsock, has moved to core.sys.windows.winsock2). But fixing that manually reveals a slew of other issues beyond my understanding.

      Just a few from the error output:

      lib\d\src\thrift\async\libevent.d(65,37): Error: function deimos.event2.event.event_new(event_base*, int, short, extern (C) void function(int, short, void*), void*) is not callable using argument types (event_base*, socket_t, int, extern (C) void function(int, short, void*) nothrow @system, void*)
      lib\d\src\thrift\async\libevent.d(65,37): cannot pass argument this.controlReceiveSocket_.handle() of type socket_t to parameter int
      lib\d\src\thrift\async\libevent.d(191,25): Error: template thrift.async.libevent.TLibeventAsyncManager.registerOneshotEvent cannot deduce function from argument types !()(socket_t, short, extern (C) void function(int, short, void*) nothrow @system, const(timeval)*, void delegate(TAsyncEventReason callReason)), candidates are:
      lib\d\src\thrift\async\libevent.d(195,8): registerOneshotEvent(T)(evutil_socket_t fd, short type, event_callback_fn callback, const(timeval)* timeout, T payload)
      lib\d\src\thrift\codegen\async_client_pool.d(99,25): Deprecation: initialization of immutable variable from static this is deprecated.
      lib\d\src\thrift\codegen\async_client_pool.d(99,25): Use shared static this instead.

      Also, while replacing the deprecated winsock imports, I noticed the conditional compilation blocks were using version(Win32) instead of version(Windows). AFAIK the former is only for 32-bit compilation - and I had to replace that to get as far as I did.

      Sorry I can't be of more assistance, but I didn't see any existing issues about this so thought I'd report it. (Not a lot of Thrift D users on Windows, it seems!)

        Attachments

          Activity

            People

            • Assignee:
              danielx10834 Daniel X
              Reporter:
              danielx10834 Daniel X
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: