swiftlang / swiftlang/swift-corelibs-libdispatch

[SR-9050] error: cannot load underlying module for 'Dispatch'

Open
#643 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug libdispatch
Dominant language
C
Stars
2.6k
Forks
496
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Previous ID SR-9050
Radar None
Original Reporter @norio-nomura
Type Bug
Status Reopened
Resolution
Environment

swift-tensorflow DEVELOPMENT-2018-11-21-a. on ubuntu 16.04

Additional Detail from JIRA
Votes 1
Component/s libdispatch
Labels Bug
Assignee None
Priority Medium

md5: bd4d55d426fcb147ee55d10380a3fa3b

Issue Description:

Log:

$ docker run --privileged -it --rm norionomura/swift:20181019a swift
Welcome to Swift version 4.2-dev (LLVM c4a0883115, Clang 0a99881462, Swift a640fe7dd6).
Type :help for assistance.
  1> import Dispatch
warning: Swift error in fallback scratch context: error: repl.swift:1:8: error: cannot load underlying module for 'Dispatch'
import Dispatch
       ^



note: This error message is displayed only once. If the error displayed above is due to conflicting search paths to Clang modules in different images of the debugged executable, this can slow down debugging of Swift code significantly, since a fresh Swift context has to be created every time a conflict is encountered.

expression failed to parse, unknown error
  1>  

On swift-DEVELOPMENT-SNAPSHOT-2018-10-19-a, it seems /usr/lib/swift/dispatch/module.modulemap changed to symbolic link against /home/buildnode/jenkins/workspace/oss-swift-package-linux-ubuntu-16_04/swift-corelibs-libdispatch/dispatch/generic/module.modulemap that does not exists.

 ls -la /usr/lib/swift/dispatch/
total 216
drwxr-xr-x  2 root root  4096 Oct 19 16:44 .
drwxr-xr-x 11 root root  4096 Oct 19 16:44 ..
-rw-r--r--  1 root root  8155 Oct 19 15:42 base.h
-rw-r--r--  1 root root 17651 Oct 19 15:42 block.h
-rw-r--r--  1 root root 10865 Oct 19 15:42 data.h
-rw-r--r--  1 root root  1994 Oct 19 15:42 dispatch.h
-rw-r--r--  1 root root  8412 Oct 19 15:42 group.h
-rw-r--r--  1 root root  4894 Oct 19 15:42 introspection.h
-rw-r--r--  1 root root 25802 Oct 19 15:42 io.h
lrwxrwxrwx  1 root root   131 Oct 19 16:46 module.modulemap -> /home/buildnode/jenkins/workspace/oss-swift-package-linux-ubuntu-16_04/swift-corelibs-libdispatch/dispatch/generic/module.modulemap
-rw-r--r--  1 root root 17247 Oct 19 15:42 object.h
-rw-r--r--  1 root root  3633 Oct 19 15:42 once.h
-rw-r--r--  1 root root 50416 Oct 19 15:42 queue.h
-rw-r--r--  1 root root  3321 Oct 19 15:42 semaphore.h
-rw-r--r--  1 root root 27456 Oct 19 15:42 source.h
-rw-r--r--  1 root root  3020 Oct 19 15:42 time.h

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the documented Docker command and inspect /usr/lib/swift/dispatch/module.modulemap, especially its broken symlink target. Compare the installed module map with the DEVELOPMENT-2018-11-21-a and 2018-10-19-a snapshots, then verify that importing Dispatch succeeds and the installed link points to an existing file.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, docker, swift
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.