Comments (10)
I have this exact same issue, without the ability to update /usr/bin/gcc. I know the Mac guys are pedantic about hardcoding paths, but for linux, one really needs the ability to set CC/CXX (or at least HOMEBREW_CC/CXX or something), because there's just too much variation. I also can't seem to get linuxbrew to pick up another compiler with any amount of hacking or symlinks.
from legacy-linuxbrew.
Note that on the Mac side there's experimental support for non-Apple compilers which would allow you to set arbitrary GCC versions. For Mac it will be dependent on their being Homebrew-installed but that requirement could be laxed for Linuxbrew. Homebrew/legacy-homebrew#20251
from legacy-linuxbrew.
Wow, that seems like exactly what we'd need. To be fair, I'm using an ancient linux/gcc version, so this probably doesn't affect most users, but being able to do this would be a big help. Perhaps I will try pulling this into a linuxbrew fork...
from legacy-linuxbrew.
Feel free to hack on the fails_with
code that's holding it up from landing in Homebrew core! Once that happens it's a simple merge and tweak to get it into mainline Linuxbrew.
from legacy-linuxbrew.
Linuxbrew doesn't currently use superenv, because it currently requires XCode (xcrun). We should fix that.
from legacy-linuxbrew.
I've been struggling with gcc choice on Linuxbrew installations and wondering about the current state of this issue. It looks like the arbitrary GCC version patch got accepted (Homebrew/legacy-homebrew#20251) but I'm not sure how to enable it.
The behaviour I'm seeing is that brew always seems to prefer using /usr/bin/gcc
. On many of the systems I'm supporting this system version is quite old, with modules supplying the newer versions. Ideally what I'd like to do is use the gcc/g++ in the PATH by default, instead of manually setting CC/CXX to /usr/bin
versions. Is this possible? If not, any pointers on ways to move in this direction? I know this is not ideal on Macs, but is the standard setup on a lot of Linux systems.
Thanks for any thoughts and pointers.
from legacy-linuxbrew.
@chapmanb You can select a compiler by doing --cc=foo, e.g. --cc=gcc-4.8. For non-Xcode compilers, the compiler has to have been built by Homebrew, however. Linuxbrew might want to customize that behaviour?
from legacy-linuxbrew.
@mistydemeo Is there a way to configure Homebrew to set the default compiler to --cc=gcc-4.8
? Does HOMEBREW_CC=gcc-4.8
work?
from legacy-linuxbrew.
Misty and Shaun;
Thanks much for the clarification, and all your work on this. Unfortunately on the systems I'm working on there isn't a version specific gcc-4.8
style target to force. It's dictated by the gcc on the PATH, injected in via modules.
I know that's far from Homebrew/Mac specific problems, but I guess I was hoping for a flag on Linuxbrew that tells brew not to do any magic and only grab CC/CXX from versions on the PATH. I'm still trying to find my way through the code trying to understand the env/compilers setup. Thanks again.
from legacy-linuxbrew.
@sjackman There isn't a way to set it globally. (Was by design, since it's not totally tested on OS X, nor will it work with everything.) So, it does need to be specified every time brew
is run. fails_with
will choose Homebrew-installed GCCs though.
You may want to customize the default_compiler
logic for Linuxbrew to select a newer compiler if available though - I do something similar in Tigerbrew, so that gcc-4.2 is picked over gcc-4.0 even if the OS's default is gcc-4.0 (as it was on Xcode 2.5).
from legacy-linuxbrew.
Related Issues (20)
- vim not getting build HOT 4
- `cairo` fails on Linux Mint 17.3 Rosa XFCE x64 HOT 3
- CEGMA 2.5 ? HOT 1
- where is the file .bashrc or .zshrc? HOT 8
- 'brew install llvm --with-lldb' fails HOT 1
- Error: SHA256 mismatch
- -e:1:in `flock': Function not implemented (Errno::ENOSYS) HOT 1
- Advantage of Linuxbrew over Chromebrew? HOT 2
- cannot execute binary file: Exec format error HOT 3
- Error: undefined method `rebuild' HOT 6
- util-linux: Conflicts with bash-completions HOT 25
- Error: Unsupported special dependency :perl HOT 1
- libxcb install but not exist HOT 2
- Support installation with out git installed HOT 4
- brew instal mpd HOT 1
- node: Error: Unsupported special dependency :perl HOT 1
- Unsupported special dependency: Perl HOT 1
- troubleshooting link is not working HOT 2
- gcc bad configured after fresh installation HOT 15
- homebrew upgrade error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from legacy-linuxbrew.