Page MenuHomePhabricator

hphpize inject $PWD used at time of building to HHVM_INCLUDE_DIRS
Closed, ResolvedPublic

Description

Forked from bug 63120

Ori quoted a discussion from Giuseppe:

hphpize adds to the list of paths it configures the $PWD at the time of building
so when people try to use hphpize from the package I built, cmake complains it
cannot find /root/joe/hhvm

After running cmake ., the CMakeLists.txt file has something like:

set(HHVM_INCLUDE_DIRS;<snip>;/root/joe/hhvm)

That causes the build to abort with:

cc1plus: error: /root/hhvm/joe/hhvm: Permission denied

The workaround for Jenkins is to use sed to strip the invalid path entirely.


Version: wmf-deployment
Severity: normal

Details

Reference
bz68944

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:41 AM
bzimport set Reference to bz68944.

Change 150895 had a related patch set uploaded by Hashar:
Workaround hphpize injecting some bad include path

https://gerrit.wikimedia.org/r/150895

Using sed in Jenkins to get rid of the incorrect path has let Jenkins build the FastStringSearch extension!

https://integration.wikimedia.org/ci/job/php-FastStringSearch-hhvm-build/2/console

Change 150895 merged by jenkins-bot:
Workaround hphpize injecting some bad include path

https://gerrit.wikimedia.org/r/150895

I have updated the Trusty Jenkins slave:

Unpacking hhvm-dev (3.3-dev+20140728+wmf7) over (3.3-dev+20140728+wmf5) ...

I have reran a job and it fails: https://integration.wikimedia.org/ci/job/php-FastStringSearch-hhvm-build/10/console

00:00:03.176 cc1plus: error: /root/hhvm/joe/hhvm: Permission denied

This reopening.

Change 160447 had a related patch set uploaded by Hashar:
Revert "Workaround hphpize injecting some bad include path"

https://gerrit.wikimedia.org/r/160447

CWD is still injected with hhvm 3.3-dev+20140728+wmf7

Apparently it has been fixed upstream by da0635499 https://github.com/facebook/hhvm/pull/3323

hphp/tools/hphpize/CMakeLists.txt

+ elseif(dir STREQUAL "${HPHP_HOME}")
+ # omit: base dir should not be included

I guess we want to cherry pick that patch on our hhvm build.

  • Bug 71177 has been marked as a duplicate of this bug. ***

Assigning to Giuseppe who can ensure the upstream fix makes it into our HHVM binary packages.

A new package for hhvm-3.3.0 is in our apt repo. I just confirmed this bug is fixed

Change 160447 merged by jenkins-bot:
Revert "Workaround hphpize injecting some bad include path"

https://gerrit.wikimedia.org/r/160447

$ jenkins-jobs --conf jenkins_jobs.ini update config/ '*hhvm-build'
INFO:root:Updating jobs in ['config/'] (['*hhvm-build'])
INFO:jenkins_jobs.builder:Reconfiguring jenkins job php-FastStringSearch-hhvm-build
INFO:jenkins_jobs.builder:Reconfiguring jenkins job php-luasandbox-hhvm-build
INFO:jenkins_jobs.builder:Reconfiguring jenkins job php-wikidiff2-hhvm-build

Job pass now https://integration.wikimedia.org/ci/job/php-FastStringSearch-hhvm-build/11/console

Thank you!