Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Removing the header files breaks go's ability to install the cross compilers. #12507

Closed
fd opened this issue May 30, 2012 · 8 comments
Closed

Comments

@fd
Copy link
Contributor

fd commented May 30, 2012

The headers should not be removed form the keg. Instead they should not be symlinked.

suggested solution:

well, go dist expects the headers to exist in $HOMEBREW_PREFIX/Cellar/go/1.0.1/include. Maybe the headers can be moved out of the way before linking the keg and then be moved back.

[ISSUE SPLIT]: #12457 (comment)

@Sharpie
Copy link
Contributor

Sharpie commented May 30, 2012

Maybe the headers can be moved out of the way before linking the keg and then be moved back.

Currently, this is not possible as there is no way to add code that gets run post-link. The only way to prevent files from being symlinked is to install them to a place like libexec.

I think the real problem is that if Go duplicates system headers, then they should be installing to and searching somewhere like include/go/ instead of the top-level include/.

This is much better than relying on the ability and foresight of a package manager to selectively sandbox items from a common directory.

@fd
Copy link
Contributor Author

fd commented May 30, 2012

I think the real problem is that if Go duplicates system headers, then they should be installing to and searching somewhere like include/go/ instead of the top-level include/.

I totally agree with you but in the mean time I still need to be able to build the cross compilers. Maybe a san alternative solution the cross compilers could be build (optionally) when installing go.

@Sharpie
Copy link
Contributor

Sharpie commented May 30, 2012

Maybe a san alternative solution the cross compilers could be build (optionally) when installing go.

I don't like the idea of an option for this. The problem is that when go installs headers other things start to break silently which makes this a hard bug to track down. Users often fail to report that they invoked the --with-borked-headers option when installing go.

@fd
Copy link
Contributor Author

fd commented May 30, 2012

What I intended to say was: As only the cross compilers need the headers when being build themselves. It might be an option to do this (building the cross compiler) when installing go. Like this the headers can be removed without preventing people from installing the cross compilers.

@mistydemeo
Copy link
Member

Judging from the go maintainer's comment on the bug, the headers aren't meant to be installed; adding an option to build the cross-compiler while building go sounds like the best route to me.

@jacknagel
Copy link
Contributor

Yes, what @mistydemeo said.

It would be nice if whoever makes this change would rework the go formula to perform the build first (i.e., in the temporary build directory) and then install files into prefix, not the other way around.

@fd
Copy link
Contributor Author

fd commented Jun 1, 2012

Ok, I changed the formula: #12547

@adamv
Copy link
Contributor

adamv commented Sep 14, 2012

Closing in favor of #12547.

@adamv adamv closed this as completed Sep 14, 2012
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants