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

[SR-9080] <unknown>:0: error: cannot load underlying module for 'Dispatch' #642

Open
shahmishal opened this issue Oct 25, 2018 · 10 comments

Comments

@shahmishal
Copy link
Member

Previous ID SR-9080
Radar rdar://problem/45553764
Original Reporter @shahmishal
Type Bug
Additional Detail from JIRA
Votes 0
Component/s libdispatch
Labels Bug
Assignee None
Priority Medium

Watchers: @shahmishal

md5: 8fe1536412bd991aed5ede4f770cccb4

Issue Description:

Error:

<unknown>:0: error: cannot load underlying module for 'Dispatch'

Last successful tag: swift-DEVELOPMENT-SNAPSHOT-2018-10-01-a

First failing tag: swift-DEVELOPMENT-SNAPSHOT-2018-10-19-a

git log --pretty=oneline swift-DEVELOPMENT-SNAPSHOT-2018-10-01-a...swift-DEVELOPMENT-SNAPSHOT-2018-10-19-a

425 commits between two tags.

https://ci.swift.org/job/swift-protobuf-linux-ubuntu-16_04/730/console

@shahmishal
Copy link
Member Author

cc/ @compnerd @benlangmuir @aciidb0mb3r

@shahmishal
Copy link
Member Author

These commits might be interesting to look at:

98ceebe6e8e98be2d396aa8a36e37fb39a8adacd Add dependency on the libdispatch-install step
8d7a26c71109402ebd34207ab3721186cae28e2d [silgenpattern] Unconditionally use the +0 code path to emit enum element dispatch on loadable enum types
c1f17f00c27979a0ccddcbc1c387bda2746f5623 Changed the external project build for libdispatch in tools/SourceKit to use the just-build clang and clang++ rather than the system versions (rdar://45148295). (#19845)
42af92112c463c6b59551a77432993202dccc7e6 Make _swift_dispatch_block_create_with_qos_class NS_RETURNS_RETAINED
b99a0f4af5e30861a117a6f7c93b82d8a95f3497 build: use the exported config for libdispatch
0295a83237f508f7eece78bde1fe0195fdb1fa7f SourceKit: re-package libdispatch, BlocksRuntime
daabc237fa907609401391309b69686acc8df444 SourceKit: libdispatch swift requires swift stdlib

@shahmishal
Copy link
Member Author

Info provided by @aciidb0mb3r

the dispatch modulemap is missing:

root@d1fa04c6e0d3:/toolchain/usr/lib/swift/dispatch# ls -l
total 208
-rwxrwxrwx 1 root root  8155 Oct 24 13:53 base.h
-rwxrwxrwx 1 root root 17651 Oct 24 13:53 block.h
lrwxrwxrwx 1 root root   131 Oct 24 14:57 module.modulemap -> /home/buildnode/jenkins/workspace/oss-swift-package-linux-ubuntu-16_04/swift-corelibs-libdispatch/dispatch/generic/module.modulemap 

@compnerd
Copy link
Collaborator

Interesting. Seems like we are install the the module.modulemap but it is a symlink? Should be possible to adjust the install rules to dereference before installation. Is there an easy way to test this locally?

@ankitspd
Copy link
Member

I built the toolchain locally but it didn't install a symlink so it is very puzzling why its happening on the CI. I used this invocation:

./swift/utils/build-script --assertions --no-swift-stdlib-assertions --swift-enable-ast-verifier=0 --llbuild --swiftpm --xctest --build-ninja --install-swift --install-lldb --install-llbuild --install-swiftpm --install-xctest --install-prefix=/usr '--swift-install-components=autolink-driver;compiler;clang-builtin-headers;stdlib;swift-remote-mirror;sdk-overlay;license;sourcekit-inproc' '--llvm-install-components=llvm-cov;llvm-profdata' --build-swift-static-stdlib --build-swift-static-sdk-overlay --install-destdir=/tmp/swift-nightly-install --installable-package=/tmp/swift-DEVELOPMENT-SNAPSHOT-2018-10-27-a-ubuntu16.04.tar.gz --build-subdir=buildbot_linux --lldb --release --foundation --libdispatch --lit-args=-v --install-foundation --install-libdispatch --reconfigure

@compnerd
Copy link
Collaborator

#412 should address the issue ... @aciidb0mb3r perhaps we should just build a toolchain on CI with that patch?

@ankitspd
Copy link
Member

Yes, that would be the best way to test if the patch works or not.

@gottesmm
Copy link
Member

Looks like dispatch needs an update since it doesn't use a build-preset. I am preparing a new build-preset for it.

@gottesmm
Copy link
Member

apple/swift#20109

@gottesmm
Copy link
Member

@shahmishal once this lands, can you change dispatch to use this instead of using a hard coded build script line?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants