Uploaded image for project: 'Swift'
  1. Swift
  2. SR-5686

Swift 4 REPL broken on Linux (Docker)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Duplicate
    • Labels:
    • Environment:

      Using Docker for Mac Version 17.07.0-ce-rc2-mac22 (18909)

      MacOS 10.12.4

       

      Description

      Hi there. I'm one of the maintainers of https://github.com/swiftdocker/docker-swift . I've tried w/ the latest (at the time of writing) August 4th Swift 4 develop ubuntu 16.04 image. Importing Foundation and Libdispatch seems to be broken.

      I've attached the REPL output but basically the two errors are:

       

      error: /usr/include/x86_64-linux-gnu/sys/sysmacros.h:22:10: error: could not build module 'SwiftGlibc'
       #include <features.h>
       ^
      error: could not build C module 'CoreFoundation'
      

      and 

       

      error: /usr/include/x86_64-linux-gnu/sys/sysmacros.h:22:10: error: could not build module 'SwiftGlibc'
       #include <features.h>
       ^
      error: could not build C module 'CDispatch'
      

       

      I'm attaching the Dockerfile that I'm using. Note I've commented out the gpg validation in the Dockerfile that we usually do in our image (as requested/recommended by DockerHub for official Docker images) since there aren't new keys available for Swift 4 images yet. Would be great to have that too but can file a separate issue for this if need be

      With the Dockerfile saved you can build and run the image by doing the following

      ```

      docker build . --tag swift4fun

       

      and then

      docker run --privileged -i -t --name swiftFoo swift4fun /bin/bash

       

       

      At that point you should be in a bash prompt and can start the REPL by typing swift

      Happy to explain further and debug further if need be

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              harisamin Haris Amin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: