{"action":"created","issue":{"url":"https://api.github.com/repos/Homebrew/homebrew-science/issues/3401","repository_url":"https://api.github.com/repos/Homebrew/homebrew-science","labels_url":"https://api.github.com/repos/Homebrew/homebrew-science/issues/3401/labels{/name}","comments_url":"https://api.github.com/repos/Homebrew/homebrew-science/issues/3401/comments","events_url":"https://api.github.com/repos/Homebrew/homebrew-science/issues/3401/events","html_url":"https://github.com/Homebrew/homebrew-science/issues/3401","id":138990794,"number":3401,"title":"vtk crashes when brewed python is installed","user":{"login":"lantiga","id":191033,"avatar_url":"https://avatars.githubusercontent.com/u/191033?v=3","gravatar_id":"","url":"https://api.github.com/users/lantiga","html_url":"https://github.com/lantiga","followers_url":"https://api.github.com/users/lantiga/followers","following_url":"https://api.github.com/users/lantiga/following{/other_user}","gists_url":"https://api.github.com/users/lantiga/gists{/gist_id}","starred_url":"https://api.github.com/users/lantiga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lantiga/subscriptions","organizations_url":"https://api.github.com/users/lantiga/orgs","repos_url":"https://api.github.com/users/lantiga/repos","events_url":"https://api.github.com/users/lantiga/events{/privacy}","received_events_url":"https://api.github.com/users/lantiga/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Homebrew/homebrew-science/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/Homebrew/homebrew-science/labels/python","name":"python","color":"fef2c0"},{"url":"https://api.github.com/repos/Homebrew/homebrew-science/labels/upstream","name":"upstream","color":"ff7722"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":27,"created_at":"2016-03-07T14:23:46Z","updated_at":"2016-07-26T06:13:51Z","closed_at":null,"body":"### Indicate troubleshooting steps taken\r\n\r\n- [x] Ran `brew update` and retried your prior step?\r\n- [x] Ran `brew doctor`, fixed as many issues as possible and retried your prior step?\r\n- [x] Checked that a similar issue hasn't already been filed?\r\n- [x] Looked up the software bug tracker if reporting a build error?\r\n- [n/a] If you're seeing permission errors tried running `sudo chown -R $(whoami) $(brew --prefix)`?\r\n\r\n### Bug reports / build errors:\r\n\r\nAfter PR #3313 (see also discussion there), which leads vtk to link to system python when it is available, makes it impossible to have vtk coexist with brewed python without segfaulting. This is true both even if one forces building from source.\r\n\r\nScenario 1 (everything works with system python and no brewed python):\r\n- start with no brew python and no brew vtk\r\n- `which python` => `/usr/bin/python`\r\n- `brew install vtk --with-python`\r\n- `mkdir -p /Users/lantiga/Library/Python/2.7/lib/python/site-packages`\r\n`echo 'import site; site.addsitedir(\"/usr/local/lib/python2.7/site-packages\")' >> /Users/lantiga/Library/Python/2.7/lib/python/site-packages/homebrew.pth`\r\n- `python -c \"import vtk\"`\r\n=> Ok\r\n\r\nScenario 2 (brew gets the bottled version, which links against system python, even when brewed python is installed, leading to a segfault):\r\n- start with no brew python and no vtk\r\n- `brew install python`\r\n- `which python` => `/usr/local/bin/python`\r\n- `brew install vtk --with-python`\r\n- `python -c \"import vtk\"` => ```Fatal Python error: PyThreadState_Get: no current thread. Abort trap: 6```\r\n\r\nScenario 3 (building vtk from source doesn't solve the problem, as cmake picks up system python even when brewed python is available and comes first in PATH):\r\n- start with no brew python and no vtk\r\n- `brew install python`\r\n- `which python` => `/usr/local/bin/python`\r\n- `brew install vtk --with-python --build-from-source`\r\n- `python -c \"import vtk\"` => `Fatal Python error: PyThreadState_Get: no current thread. Abort trap: 6`\r\n\r\nAs an aside: - `/usr/bin/python -c \"import vtk\"` => Ok\r\n\r\nTo confirm, in Scenario 3:\r\n`otool -L /usr/local/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so `\r\ngives\r\n```\r\n/usr/local/lib/python2.7/site-packages/vtk/vtkCommonCorePython.so:\r\n\t/usr/local/Cellar/vtk/7.0.0/lib/libvtkCommonCorePython27D-7.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)\r\n\t/usr/local/Cellar/vtk/7.0.0/lib/libvtkWrappingPython27Core-7.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)\r\n\t/usr/local/Cellar/vtk/7.0.0/lib/libvtkCommonCore-7.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)\r\n\t/System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.10)\r\n\t/usr/local/Cellar/vtk/7.0.0/lib/libvtksys-7.0.1.dylib (compatibility version 1.0.0, current version 1.0.0)\r\n\t/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)\r\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)\r\n```\r\n\r\nAnother nuisance: anyone who got vtk 6.3 through brew --with-python in the past also got brewed python, which means that they now will see python crashing when they upgrade.\r\n"},"comment":{"url":"https://api.github.com/repos/Homebrew/homebrew-science/issues/comments/235172529","html_url":"https://github.com/Homebrew/homebrew-science/issues/3401#issuecomment-235172529","issue_url":"https://api.github.com/repos/Homebrew/homebrew-science/issues/3401","id":235172529,"user":{"login":"iMichka","id":3406519,"avatar_url":"https://avatars.githubusercontent.com/u/3406519?v=3","gravatar_id":"","url":"https://api.github.com/users/iMichka","html_url":"https://github.com/iMichka","followers_url":"https://api.github.com/users/iMichka/followers","following_url":"https://api.github.com/users/iMichka/following{/other_user}","gists_url":"https://api.github.com/users/iMichka/gists{/gist_id}","starred_url":"https://api.github.com/users/iMichka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iMichka/subscriptions","organizations_url":"https://api.github.com/users/iMichka/orgs","repos_url":"https://api.github.com/users/iMichka/repos","events_url":"https://api.github.com/users/iMichka/events{/privacy}","received_events_url":"https://api.github.com/users/iMichka/received_events","type":"User","site_admin":false},"created_at":"2016-07-26T06:13:51Z","updated_at":"2016-07-26T06:13:51Z","body":"It's okay I did all the testing myself. A patch was merged to VTK; then reverted because it introduced 2 regressions. I fixed the first one yesterday. You'll have to wait until my patch goes in."}}
{"actor":{"display_login":"iMichka"}}