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

D language docker images need demios for libevent and openssl fixed to re-enable make cross on dlang

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.11.0
    • 0.12.0
    • Build Process, D - Library
    • None
    • docker:ubuntu-xenial

    Description

      I had to disable the deimos hooks for libevent and openssl because they were causing build failures in 0.11.0. A result of this change is that dlang is NOT tested in "make cross" at all, because the test executables are only generated if openssl support exists, and it does not.

      It turns out this is some sort of link ordering issue. On further diagnosis, the dmd command outputs this build line when you add -v:

      root@f82a62661052:/thrift/src/lib/d/test# cc client_pool_test.o -o client_pool_test -m64 -levent -lssl -lcrypto -L/usr/lib/x86_64-linux-gnu -Xlinker --export-dynamic ../../../lib/d/libthriftd.a ../libthriftd-event.a ../libthriftd-ssl.a -Xlinker -Bstatic -lphobos2 -Xlinker -Bdynamic -lpthread -lm -lrt -ldl
      ../libthriftd-event.a(libevent_1_846.o): In function `_D6thrift5async8libevent21TLibeventAsyncManager6__ctorMFZC6thrift5async8libevent21TLibeventAsyncManager':
      src/thrift/async/libevent.d:(.text._D6thrift5async8libevent21TLibeventAsyncManager6__ctorMFZC6thrift5async8libevent21TLibeventAsyncManager+0x11): undefined reference to `event_base_new'
      src/thrift/async/libevent.d:(.text._D6thrift5async8libevent21TLibeventAsyncManager6__ctorMFZC6thrift5async8libevent21TLibeventAsyncManager+0xa3): undefined reference to `event_new'
      src/thrift/async/libevent.d:(.text._D6thrift5async8libevent21TLibeventAsyncManager6__ctorMFZC6thrift5async8libevent21TLibeventAsyncManager+0xb1): undefined reference to `event_add'
      

      If you add Wl,-start-group before the event library, OR move event, ssl, and crypto to the end of the library list, the link completes.

      Attachments

        Issue Links

          Activity

            People

              jking3 James E. King III
              jking3 James E. King III
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: