Skip to content

Add pty to Glibc modulemap #3926

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

Merged
merged 1 commit into from
Aug 5, 2016
Merged

Add pty to Glibc modulemap #3926

merged 1 commit into from
Aug 5, 2016

Conversation

aciidgh
Copy link
Contributor

@aciidgh aciidgh commented Aug 2, 2016

What's in this pull request?

This adds the header pty.h to the Glibc modulemap.

Resolved bug number: (SR-)


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
All supported platforms @swift-ci Please smoke test and merge
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

A smoke test on macOS does the following:

  1. Builds the compiler incrementally.
  2. Builds the standard library only for macOS. Simulator standard libraries and
    device standard libraries are not built.
  3. lldb is not built.
  4. The test and validation-test targets are run only for macOS. The optimized
    version of these tests are not run.

A smoke test on Linux does the following:

  1. Builds the compiler incrementally.
  2. Builds the standard library incrementally.
  3. lldb is built incrementally.
  4. The swift test and validation-test targets are run. The optimized version of these
    tests are not run.
  5. lldb is tested.

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
All supported platforms @swift-ci Please test and merge
OS X platform @swift-ci Please test OS X platform
OS X platform @swift-ci Please benchmark
Linux platform @swift-ci Please test Linux platform

Lint Testing

Language Comment
Python @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@@ -21,6 +21,7 @@
module SwiftGlibc [system] {
% if CMAKE_SDK in ["LINUX", "FREEBSD", "CYGWIN"]:
link "pthread"
link "util"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unfortunate we can't make this a directive in the submodule, as this is going to cause everything to link with util. However, that is consistent with the current Glibc module design (and Darwin), so it does seem to fit into the current model.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why it doesn't link at all if its in the submodule?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a limitation of the current Clang modules implementation, unfortunately. My understanding it is non-trivial to fix that.

@ddunbar ddunbar assigned gribozavr and unassigned ddunbar Aug 2, 2016
@ddunbar
Copy link
Contributor

ddunbar commented Aug 2, 2016

This looks reasonable to me given the information in https://www.gnu.org/software/gnulib/manual/html_node/openpty.html, the imposition of -lutil on every client of Glibc is unfortunate but as noted inline I'm not sure we have a design for an alternative (other than simply not supporting this function).

@gribozavr can you review or delegate to someone else?

@ddunbar
Copy link
Contributor

ddunbar commented Aug 2, 2016

@swift-ci please smoke test

@aciidgh
Copy link
Contributor Author

aciidgh commented Aug 4, 2016

@gribozavr friendly ping, swiftpm has two PR dependant on this 😄

@gribozavr
Copy link
Contributor

@aciidb0mb3r Could you also add includes for utmp.h, which defines login() and logout() that are included in -lutil?

Could you also add a fixme near the link "util" line that explains that this dependency is only needed for a few rarely-used functions and is not usually necessary?

@aciidgh
Copy link
Contributor Author

aciidgh commented Aug 5, 2016

@gribozavr Done

@gribozavr
Copy link
Contributor

@swift-ci Please smoke test

@aciidgh
Copy link
Contributor Author

aciidgh commented Aug 5, 2016

is the Linux failure is related to this?

@gribozavr
Copy link
Contributor

Does not look related indeed. Merging!

If you want to submit swiftpm fixes that depend on this change, I would recommend submitting a PR of this change for the swift-3.0-branch, this way we would be able to cherry-pick dependent swiftpm changes, if such a need arises.

@gribozavr gribozavr merged commit 92d19ae into swiftlang:master Aug 5, 2016
@aciidgh
Copy link
Contributor Author

aciidgh commented Aug 5, 2016

@gribozavr Thanks!
I opened a PR on swift 3 branch #4039

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants