Git Product home page Git Product logo

Comments (27)

findingorder avatar findingorder commented on May 25, 2024

P.S.
Earlier in the output, it says

==> Installing dependencies for hello: patchelf, zlib, binutils, linux-headers, glibc, m4, gmp, mpfr, libmpc, [email protected] and gcc
==> Installing hello dependency: patchelf
error: unknown option `local'
usage: git config [options]
...

The "unknown option 'local'" message might mean brew is using the older get, the one found in /usr/bin. So is there a bug in brew where it does not respect the PATH and uses /usr/bin/git regardless of what is in the path?

from brew.

sjackman avatar sjackman commented on May 25, 2024

Hi, Phil. This is a bug in Linuxbrew. Try…

export HOMEBREW_GIT_PATH=$HOME/bin/git
brew config | grep Git
brew install hello

from brew.

findingorder avatar findingorder commented on May 25, 2024

Tried that just now, same error. BTW, I installed Linuxbrew using a variation of the "Alternative Installation" instructions, like this:

git clone https://github.com/Homebrew/brew ~/linuxbrew/Homebrew
mkdir ~/linuxbrew/bin
ln -s ../Homebrew/bin/brew ~/linuxbrew/bin
eval $(~/linuxbrew/bin/brew shellenv)

The only thing I did differently from the instructions was to make the "linuxbrew" directory visible, not hidden, by omitting the "."

from brew.

sjackman avatar sjackman commented on May 25, 2024

Consider installing Linuxbrew in /home/linuxbrew/.linuxbrew/ if possible so that you can use precompiled binary packages (known as bottles) for non-relocatable formula like glibc.

If it's an option for you, you could open a ticket with your information systems department to ask that they create a linuxbrew role account with home directory /home/linuxbrew.

The precompiled binary bottles of non-relocatable bottles can only be used if you install in /home/linuxbrew/.linuxbrew, otherwise they have to be built from source. See the documentation below. On macOS the default installation directory is /usr/local. On Linux the default installation directory is /home/linuxbrew/.linuxbrew.

from brew.

sjackman avatar sjackman commented on May 25, 2024

Try…

export HOMEBREW_GIT_PATH=$HOME/bin/git
export HOMEBREW_NO_ENV_FILTERING=1
brew config | grep Git
brew install hello

Please report the output of brew config | grep Git

from brew.

findingorder avatar findingorder commented on May 25, 2024
> brew config | grep Git
Git: 1.7.1 => /usr/bin/git

So brew is configured to grab the wrong git version. Any way to change the brew config?

from brew.

findingorder avatar findingorder commented on May 25, 2024

Using your suggested environment variables,

export HOMEBREW_GIT_PATH=$HOME/bin/git
export HOMEBREW_NO_ENV_FILTERING=1

resolves the error I reported, and allows hello to be installed. The only anomaly I see is at the very beginning:

brew install hello
/home/m24390/linuxbrew/Homebrew/brew/Library/Homebrew/brew.sh: line 61: printf: g7755635: invalid number
/home/m24390/linuxbrew/Homebrew/brew/Library/Homebrew/brew.sh: line 61: printf: g7755635: invalid number
/home/m24390/linuxbrew/Homebrew/brew/Library/Homebrew/brew.sh: line 61: printf: g7755635: invalid number
==> Installing dependencies for curl: patchelf, zlib, binutils, linux-headers, glibc, m4, gmp, mpfr, libmpc, [email protected], gcc, openssl and pkg-config
==> Installing curl dependency: patchelf
==> Downloading https://linuxbrew.bintray.com/bottles/patchelf-0.9_1.x86_64_linux.bottle.tar.gz
Updating Homebrew...
######################################################################## 100.0%
==> Pouring patchelf-0.9_1.x86_64_linux.bottle.tar.gz
�  /home/m24390/linuxbrew/Cellar/patchelf/0.9_1: 6 files, 1.2MB
...

from brew.

sjackman avatar sjackman commented on May 25, 2024

You can ignore invalid number error. Though it's annoying, it's harmless.

brew install git and it may work without needing to set these environment variables. Let me know if that works.

from brew.

findingorder avatar findingorder commented on May 25, 2024

For both brew install hello and brew install git, it appears to download and install, but then throws the error:

configure: error:
*** These critical programs are missing or too old: compiler
*** Check the INSTALL file for required versions.

I can provide the complete install readout if you like.
So a workaround might be to clone and build whatever it means by "compiler". I searched for a file called INSTALL but couldn't find it. Can anyone tell me what "compiler" I would need to install to make brew happy?

from brew.

sjackman avatar sjackman commented on May 25, 2024

Consider installing Linuxbrew in /home/linuxbrew/.linuxbrew/ if possible so that you can use precompiled binary packages (known as bottles) for non-relocatable formula like glibc.
Try…

sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

from brew.

sjackman avatar sjackman commented on May 25, 2024

You can if you like afterward create a symlink from /home/linuxbrew/.linuxbrew to ~/linuxbrew.

from brew.

findingorder avatar findingorder commented on May 25, 2024

Sorry, I don't have access to /home, it's locked down. BTW,

> gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)

from brew.

sjackman avatar sjackman commented on May 25, 2024

If it's an option for you, you could open a ticket with your information systems department to ask that they create a linuxbrew role account with home directory /home/linuxbrew.

from brew.

findingorder avatar findingorder commented on May 25, 2024

Not really an option. Big company, big IT infrastructure, centrally managed, super tight security.

from brew.

sjackman avatar sjackman commented on May 25, 2024

Compiling glibc from source requires GCC 4.7 or newer. Do you have access to a more recent C compiler?

from brew.

findingorder avatar findingorder commented on May 25, 2024

I could clone and build a more recent C compiler in my home directory. Which do you recommend? GitHub URL? Perhaps this: https://jdhao.github.io/2017/09/04/install-gcc-newer-version-on-centos/ ?

from brew.

sjackman avatar sjackman commented on May 25, 2024

This is a bit tricky, but you can try building GCC 4.9 from source…

brew install -s [email protected]

from brew.

sjackman avatar sjackman commented on May 25, 2024

These instructions are a bit out of date, but they may help you: https://github.com/Linuxbrew/brew/wiki/CentOS6

from brew.

findingorder avatar findingorder commented on May 25, 2024

Trying brew install -s [email protected], I get the same compiler too old error. So I think I'll need to clone and make rather than using brew to install.

from brew.

sjackman avatar sjackman commented on May 25, 2024

Try…

HOMEBREW_NO_AUTO_UPDATE=1 brew install -s gcc --without-glibc

from brew.

findingorder avatar findingorder commented on May 25, 2024

Try…

HOMEBREW_NO_AUTO_UPDATE=1 brew install -s gcc --without-glibc
error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.

Looks like I'll have to traverse the dependency tree manually.
My versions, in Homebrew:
gmp 6.1.2_2
mpfr 4.0.1
libmpc 1.1.0

from brew.

sjackman avatar sjackman commented on May 25, 2024

brew deps --include-build gcc may be helpful to you.

from brew.

findingorder avatar findingorder commented on May 25, 2024

brew deps --include-build gcc may be helpful to you.

binutils
glibc
gmp
[email protected]
libmpc
linux-headers
m4
mpfr
zlib

from brew.

sjackman avatar sjackman commented on May 25, 2024

Try…

export HOMEBREW_NO_AUTO_UPDATE=1
brew install patchelf binutils linux-headers zlib
brew install -s gmp [email protected] libmpc mpfr m4
brew install -s gcc --without-glibc
brew install -s glibc

from brew.

findingorder avatar findingorder commented on May 25, 2024

export HOMEBREW_NO_AUTO_UPDATE=1
brew install patchelf binutils linux-headers zlib
brew install -s gmp [email protected] libmpc mpfr m4
brew install -s gcc --without-glibc

Same error as before, error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.... It seems brew is not seeing its own versions of those libraries, which as you can see in one of my previous comments, are all greater than the versions given in the error message.
I would attempt to use the --with-gmp, --with-mpfr, and --with-mpc flags as suggested in the error message, but I don't think those flags are for brew install. It would be up to brew to provide those flags to the compile/make command(s).

from brew.

sjackman avatar sjackman commented on May 25, 2024

I'm not entirely sure what's going on, but try…

brew remove gmp [email protected] libmpc mpfr m4
brew install -s gmp [email protected] libmpc mpfr m4
brew install -s gcc --without-glibc

from brew.

sjackman avatar sjackman commented on May 25, 2024

If that fails, please report the output of brew gist-logs gcc

from brew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.