ycm-cmake-modules icon indicating copy to clipboard operation
ycm-cmake-modules copied to clipboard

System-wide libedit not found on macOS

Open Nicogene opened this issue 7 years ago • 1 comments

@claudiofantacci reported:

Describe the bug macOS comes with a system-wide libedit located in /usr/local that is usually found by CMake and used, e.g., to enhance the UX of YARP RPC ports (command line like input, tokenization, etc.). System-wide libedit is no longer found by CMake and the only way to get it trough is to install libedit with brew and to force link it brew install libedit && brew link --force libedit.

To Reproduce Configure YARP with Xcode version 9+. I'm not sure how Xcode actually as an impact on this, and in particular with CMake, but this correlation is also confirmed by our Travis builds:

Expected behavior System-wide libedit found without the need to force link libedit under brew.

Configuration (please complete the following information):

  • OS: 10.13.4
  • yarp version: 3.1.100+20180802.3+git013120125
  • compiler: Apple LLVM version 9.0.0 (clang-900.0.39.2)

Additional context My only guess so far is that by upgrading to Xcode 9+ the (possibly present, I can't check it) pkg-config libedit.pc has been removed and the standard_find_module (invoked here) is no longer able to find the library. As a matter of the fact, by force linking libedit with brew, standard_find_module indeed finds the libedit.pc that is shipped with it.

Additional comments As a matter of the fact/consequence, the Travis command related to brew install libedit is useless unless it is brew link --force libedit. By checking the Travis log it is clearly reported that the formula is keg-only, i.e. it is not symlinked because libedit is shipped with the OS.

Nicogene avatar Aug 29 '18 15:08 Nicogene

Original post https://github.com/robotology/yarp/issues/1829#issuecomment-412502099

Ok, I might have missed a bit the "stack" for the cmake calls.

Then, yes. I can confirm that the .pc has been removed as I triggered it 🤣 IMHO there is no need to use the brew version, but we should create the FindLibedit.cmake to handle the case where the system provides the library.

claudiofantacci avatar Mar 28 '19 08:03 claudiofantacci