Skip to content

build: improve libedit handling for builds #25275

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
Jul 7, 2019

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Jun 5, 2019

Use the FindLibEdit.cmake module from LLDB to properly control where
the libedit libraries are searched for and linked from as well as where
the headers come from. This uses the standard mechanisms which allows
users to control where libedit is pulled from (which is important for
cross-compilation).

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@compnerd
Copy link
Member Author

compnerd commented Jun 5, 2019

@compnerd
Copy link
Member Author

compnerd commented Jun 5, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Jun 6, 2019

Build failed
Swift Test OS X Platform
Git Sha - 6aafad63fc10e7b23ef5c30fb3794fc5f0d67e46

@compnerd
Copy link
Member Author

compnerd commented Jun 6, 2019

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Jun 6, 2019

Build failed
Swift Test OS X Platform
Git Sha - 6aafad63fc10e7b23ef5c30fb3794fc5f0d67e46

@jrose-apple
Copy link
Contributor

HAVE_UNICODE_LIBEDIT was specifically checking for a libedit that supports Unicode. I don't see where the replacement code is doing that?

@compnerd
Copy link
Member Author

compnerd commented Jun 6, 2019

Hmm, I didn't see anything in libedit that implied that the w* versions were optional. Did I miss something?

@jrose-apple
Copy link
Contributor

jrose-apple commented Jun 6, 2019

Maybe there was a really old libedit lying around on an older macOS, and then we copied this forward without thinking about it. If @akyrtzi isn't worried then I guess it's fine (but then we should not bother having two names for whether or not it's available).

@compnerd
Copy link
Member Author

compnerd commented Jun 6, 2019

Unfortunately, we do need two names for it - the preprocessor macro shouldn't use the CMake naming. CMake uses <package>_FOUND while the preprocessing side tends to use HAVE_<package>. Or perhaps I misunderstood the two names that you are referring to? I'm happy to rename HAVE_UNICODE_LIBEDIT to HAVE_LIBEDIT though if you would like.

@compnerd
Copy link
Member Author

compnerd commented Jun 7, 2019

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Jun 7, 2019

Build failed
Swift Test OS X Platform
Git Sha - 6aafad63fc10e7b23ef5c30fb3794fc5f0d67e46

@jrose-apple
Copy link
Contributor

Oh, I didn't think about the fact that the second CMake name was still needed for configure_file. I do think the rename is a good idea but that's less important.

@compnerd
Copy link
Member Author

compnerd commented Jun 9, 2019

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Jun 9, 2019

Build failed
Swift Test OS X Platform
Git Sha - 6aafad63fc10e7b23ef5c30fb3794fc5f0d67e46

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 6aafad63fc10e7b23ef5c30fb3794fc5f0d67e46

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 6aafad63fc10e7b23ef5c30fb3794fc5f0d67e46

@compnerd
Copy link
Member Author

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 6aafad63fc10e7b23ef5c30fb3794fc5f0d67e46

Use the `FindLibEdit.cmake` module from LLDB to properly control where
the libedit libraries are searched for and linked from as well as where
the headers come from.  This uses the standard mechanisms which allows
users to control where libedit is pulled from (which is important for
cross-compilation).
@compnerd
Copy link
Member Author

compnerd commented Jul 6, 2019

@swift-ci please test

@compnerd compnerd merged commit 08af3bc into swiftlang:master Jul 7, 2019
@compnerd compnerd deleted the editing-editing branch July 7, 2019 00:05
@beccadax
Copy link
Contributor

beccadax commented Jul 7, 2019

I think this change may have broken the build on our 14.04 bots:

05:14:24 lib/libswiftImmediate.a(REPL.cpp.o):/home/buildnode/jenkins/workspace/oss-swift-incremental-RA-linux-ubuntu-14_04/swift/lib/Immediate/REPL.cpp:function swift::runREPL(swift::CompilerInstance&, std::vector<std::string, std::allocator<std::string> > const&, bool): error: undefined reference to 'el_wgets'
05:14:24 lib/libswiftImmediate.a(REPL.cpp.o):/home/buildnode/jenkins/workspace/oss-swift-incremental-RA-linux-ubuntu-14_04/swift/lib/Immediate/REPL.cpp:function swift::runREPL(swift::CompilerInstance&, std::vector<std::string, std::allocator<std::string> > const&, bool): error: undefined reference to 'el_wgets'

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.

4 participants