Linuxbrew-core: binutils bottle broken on Centos6 without glibc

Created on 1 Nov 2018  路  4Comments  路  Source: Homebrew/linuxbrew-core

  • [ ] have a problem with brew install (or upgrade, reinstall) a single formula? Problem is with bottle, not install process
  • [x] ran brew update and can still reproduce the problem?
  • [ ] ran brew doctor, fixed all issues and can still reproduce the problem? git version is only problem shown here
  • [ ] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link? Formula didn't fail
  • [ ] if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

Have been trying to help diagnose the LLVM issue in #9611. Have been following the CentOS6 wiki instructions to get a working glibc. Up to a couple of days ago these worked, however now installing glibc fails with an error when running the compiler.

The error is with running as from binutils, which just had a couple of bottle updates. This Dockerfile reproduces the error message exactly:

FROM centos:6

RUN yum install -y gcc git automake make gcc-c++ pkgconfig patch

#聽Create user and target folder
RUN useradd -m brewser && \
    mkdir -p /opt/brew/rh6 && \
    chown brewser:brewser /opt/brew/rh6
USER brewser
WORKDIR /opt/brew/rh6

#聽Install linuxbrew base
RUN git clone https://github.com/Linuxbrew/brew.git .
ENV PATH="/opt/brew/rh6/bin:${PATH}"

RUN HOMEBREW_NO_AUTO_UPDATE=1 brew install binutils
RUN as

Which gives the error message:

as: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by as)

Presumably the bottle is built with a more recent version now (CentOS6 has 2.12). I guess either:

  1. This is a mistake building the bottle and it needs to be rebuilt
  2. binutils now needs to be built explicitly in the CentOS6 instructions e.g. with
 HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_BUILD_FROM_SOURCE=1 brew install binutils
[...install gcc/glibc...]
HOMEBREW_NO_AUTO_UPDATE=1 brew remove binutils gcc
HOMEBREW_NO_AUTO_UPDATE=1 brew install binutils gcc

Changing the CentOS6 instructions to do this lets me build the newer glibc, and I guess will become inevitable as CentOS6 gets older and older? Not sure if I strictly need to reinstall binutils from bottle afterwards but it seems to work.

bug outdated

Most helpful comment

Yes, this works fine now - thanks.

All 4 comments

I built the bottle following these instructions: https://github.com/Linuxbrew/brew/wiki/Build-a-portable-bottle

It was done in a centos 6 docker container with glibc 2.12. I used the same instructions for the previous build and it worked back then. I am wondering what went wrong this time.

I believe this issue should be resolved by the binutils 2.31.1_2 bottle. Let me know how it works out for you.

Yes, this works fine now - thanks.

Glad to hear it! Thanks for the bug report and for following up, Nicholas.

Was this page helpful?
0 / 5 - 0 ratings