Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 has wrong LINKFORSHARED in module sysconfig #21212

Closed
4 of 5 tasks
count0 opened this issue Nov 30, 2017 · 10 comments
Closed
4 of 5 tasks

python3 has wrong LINKFORSHARED in module sysconfig #21212

count0 opened this issue Nov 30, 2017 · 10 comments
Labels
python Python use is a significant feature of the PR or issue

Comments

@count0
Copy link
Contributor

count0 commented Nov 30, 2017

Please always follow these steps:

  • Confirmed this is a problem with brew installing one, specific Homebrew/homebrew-core formula (not cask or tap) and not every time you run brew? If it's a general brew problem please file this issue at https://github.com/Homebrew/brew/issues/new. If it's a brew cask problem please file this issue at https://github.com/caskroom/homebrew-cask/issues/new. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed all issues and retried your prior step?
  • Ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • If brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

This is a regression of: Homebrew/legacy-homebrew#37923

When using python3, and running:

import distutils.sysconfig
distutils.sysconfig.get_config_var('LINKFORSHARED')

it returns '-Wl,-stack_size,1000000 -framework CoreFoundation Python.framework/Versions/3.4/Python'

Like we observe in https://github.com/Homebrew/homebrew-science/issues/6461, automake builds like graph-tool calls this method. Then it looks for Python.framework/Versions/3.4/Python in /System/Library/Frameworks. This directory does not exist since it is in #{HOMEBREW_PREFIX}/Cellar/python3/3.4.3/Frameworks instead.

@stale
Copy link

stale bot commented Dec 23, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale No recent activity label Dec 23, 2017
@songololo
Copy link
Contributor

Not stale

@stale stale bot removed the stale No recent activity label Dec 23, 2017
@ilovezfs
Copy link
Contributor

@zmwangx any idea what's going on here?

@ilovezfs ilovezfs added the python Python use is a significant feature of the PR or issue label Dec 24, 2017
@zmwangx
Copy link
Contributor

zmwangx commented Dec 24, 2017

@ilovezfs Not sure. We appear to be setting the variable correctly, but Python's not picking it up:

$ /usr/local/Cellar/python3/3.6.4/bin/python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_makefile_filename()); print(distutils.sysconfig.get_config_var("LINKFORSHARED"))'
/usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin/Makefile
-Wl,-stack_size,1000000  -framework CoreFoundation Python.framework/Versions/3.6/Python
$ grep -E '^(LINKFORSHARED|PYTHONFRAMEWORKINSTALLDIR)' /usr/local/Cellar/python3/3.6.4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin/Makefile
LINKFORSHARED=	-Wl,-stack_size,1000000  -framework CoreFoundation $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
PYTHONFRAMEWORKINSTALLDIR= /usr/local/opt/python3/Frameworks/Python.framework

I'll test a non-Homebrew build later to see if this is brew-specific. So Tim's no longer available?

@ilovezfs
Copy link
Contributor

@zmwangx formally, no. Homebrew/brew@e504caa#diff-04c6e90faac2675aa89e2176d2eec7d8

But we could always try pinging him if you think it's necessary :)

@zmwangx
Copy link
Contributor

zmwangx commented Dec 24, 2017

Yeah I know he formally stepped down, just wondering if his activities stopped completely.

@ilovezfs
Copy link
Contributor

He's still participating on IRC but hasn't opened any PRs of late.

@zmwangx
Copy link
Contributor

zmwangx commented Dec 24, 2017

This should be fixed by #22103.

zmwangx added a commit to zmwangx/homebrew-core that referenced this issue Dec 25, 2017
@ilovezfs
Copy link
Contributor

@count0 @Shongololo @tommyjiang This should be fixed now, thanks to @zmwangx, if you brew update && brew reinstall python3

@songololo
Copy link
Contributor

@count0 @ilovezfs @zmwangx I can confirm all is now working with graph-tool on python version 3

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
python Python use is a significant feature of the PR or issue
Projects
None yet
Development

No branches or pull requests

4 participants