{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5602","repository_url":"https://api.github.com/repos/travis-ci/travis-ci","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5602/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5602/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5602/events","html_url":"https://github.com/travis-ci/travis-ci/issues/5602","id":132788321,"number":5602,"title":"clang++ not found after sudo","user":{"login":"jmmv","id":879272,"avatar_url":"https://avatars.githubusercontent.com/u/879272?v=3","gravatar_id":"","url":"https://api.github.com/users/jmmv","html_url":"https://github.com/jmmv","followers_url":"https://api.github.com/users/jmmv/followers","following_url":"https://api.github.com/users/jmmv/following{/other_user}","gists_url":"https://api.github.com/users/jmmv/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmv/subscriptions","organizations_url":"https://api.github.com/users/jmmv/orgs","repos_url":"https://api.github.com/users/jmmv/repos","events_url":"https://api.github.com/users/jmmv/events{/privacy}","received_events_url":"https://api.github.com/users/jmmv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-10T19:00:15Z","updated_at":"2016-02-10T22:12:43Z","closed_at":null,"body":"I have a build that runs almost fully as root. Basically, the build script does the following:\r\n\r\n1. Run `autoreconf`.\r\n1. Run `./configure`.\r\n1. Run `sudo -H make distcheck`.\r\n\r\nWith the migration to the new infrastructure for Precise builds (not container-based), something strange is happening. The first `configure` run as non-root properly finds `clang++`. The second `configure` run that happens from within `distcheck` fails saying that `clang++` is missing.\r\n\r\nThe strange thing is that the `PATH` when running as root looks reasonable and is reported as this in `config.log` after the failure:\r\n\r\n```\r\nPATH: /usr/local/sbin\r\nPATH: /usr/local/bin\r\nPATH: /usr/sbin\r\nPATH: /usr/bin\r\nPATH: /sbin\r\nPATH: /bin\r\n````\r\n\r\nSetting `sudo: required` in `.travis.yml` made no difference.\r\n\r\nThis is the full log with the new infrastructure, which fails:\r\n\r\nhttps://travis-ci.org/jmmv/kyua/jobs/108347711\r\n\r\nThis is the full log with the legacy infrastructure that I forced by setting `group: legacy` in my `.travis.yml` file, which passes:\r\n\r\nhttps://travis-ci.org/jmmv/kyua/jobs/108350922\r\n\r\nNeedless to say, figuring this out has been a waste of time because my builds have started failing magically for reasons outside of my control and I could not reproduce this locally on a Precise VM.\r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/182602965","html_url":"https://github.com/travis-ci/travis-ci/issues/5602#issuecomment-182602965","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5602","id":182602965,"user":{"login":"jmmv","id":879272,"avatar_url":"https://avatars.githubusercontent.com/u/879272?v=3","gravatar_id":"","url":"https://api.github.com/users/jmmv","html_url":"https://github.com/jmmv","followers_url":"https://api.github.com/users/jmmv/followers","following_url":"https://api.github.com/users/jmmv/following{/other_user}","gists_url":"https://api.github.com/users/jmmv/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmv/subscriptions","organizations_url":"https://api.github.com/users/jmmv/orgs","repos_url":"https://api.github.com/users/jmmv/repos","events_url":"https://api.github.com/users/jmmv/events{/privacy}","received_events_url":"https://api.github.com/users/jmmv/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T22:12:42Z","updated_at":"2016-02-10T22:12:42Z","body":"Maybe... but `clang++` should be in `/usr/bin` in Precise unless Travis is doing fancy stuff, and the `configure` run as root had the correct path values."}}