• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Valloric / ycmd / 1698 / 1
94%
master: 94%

Build:
DEFAULT BRANCH: master
Ran 02 Mar 2016 02:38AM UTC
Files 42
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Mar 2016 01:54AM UTC coverage: 84.637%. Remained the same
USE_CLANG_COMPLETER=true YCMD_PYTHON_VERSION=2.7 COVERAGE=true

push

travis-ci

homu
Auto merge of #406 - puremourning:fix-annoying-osx-warning, r=micbou

[READY] Prevent annoying on OS X El Capitan when using system python

# Problem

In OS X El Capitan, Apple introduced System Integrity Protection.  Amongst other things, this introduces features to the dynamic loader (dyld) which cause it to "sanitise" (and complain about) embedded LC_RPATH entries which contain @executable_path when then are loaded into "restricted" binaries.  For our purposes, "restricted" here means "supplied by Apple" and includes the system versions of python.  For unknown reasons, the libclang.dylib that comes from llvm.org includes an LC_RPATH entry '@executable_path/../lib' which causes the OS X dynamic loader to print a cryptic warning to stderr of the form:

> dyld: warning, LC_RPATH @executable_path/../lib in /path/to/ycmd/libclang.dylib being ignored in restricted program because of @executable_path

Note: This does not happen when using homebrew, pyenv or any other non-Apple versions of python.

# Mysteries

As far as I can tell, this warning/behaviour should have been present (at least) since OS X 10.11 (El Capitan), though it only started printing to the terminal (and interfering with terminal vim's default display) after commit <a class=hub.com/Valloric/ycmd/commit/<a class="double-link" href="https://git"><a class=hub.com/Valloric/ycmd/commit/599de71575d542d4fc5c33344c65b3931e4d7ed2">599de7157.

It is not clear precisely why this is now visible, but the change to remove `ycm_client_support.so` was the change when this started to *become* visible.

I'm almost certain that previously the warning (which is printed to stderr I believe) was getting eaten by the specific series of initialisations that was going on, but I have literally no evidence to this other than provably checking out `599de71575d542d4fc5c33344c65b3931e4d7ed2^` and building/running does not have the problem, whereas anything at `599de71575d542d4fc5c33344c65b3931e4d7ed2` or after it does.

# Solution

In order to prevent this harmless and annoying message appearing, we simply strip the rpath entry from the dylib.  There's no way any @executable_path that python might have could be in any way useful to libclang.dylib, and we always take a _copy_ of any system or externally supplied libclang, so this seems perfectly safe.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/406)
<!-- Reviewable:end -->

2975 of 3515 relevant lines covered (84.64%)

0.85 hits per line

Source Files on job 1698.1 (USE_CLANG_COMPLETER=true YCMD_PYTHON_VERSION=2.7 COVERAGE=true)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1698
  • Travis Job 1698.1
  • a489ae73 on github
  • Prev Job for USE_CLANG_COMPLETER=true YCMD_PYTHON_VERSION=2.7 COVERAGE=true on master (#1688.1)
  • Next Job for USE_CLANG_COMPLETER=true YCMD_PYTHON_VERSION=2.7 COVERAGE=true on master (#1701.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc