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
brew install gcc: postinstall broken (gcc-13) #137991
Comments
Additional information:
|
Reminding me of this: #132852 |
@fxcoudert, It's very much like #132852. In fact, there is a link to one of my older issues on that issue. I was under the impression that all of that had been resolved, so I created this issue thinking it unrelated. |
Might be related: I think this happens on systems where
That’s fair. I don’t know why Side note: odds are, |
If you have a working
I recommend taking a look at this issue: |
Thanks, but I think that is an unrelated issue. The one I'm posting about is due to a SEGV, segmentation violation. |
I think the segmentation fault will go away once the postinstall goes through. |
glibc v2.28 should be fine. Update: After reading thoroughly through #135068 to which you link above, maybe you're onto something. glibc was installed to my linuxbrew, glibc@2.35_1; however, as can be seen in my |
Does anyone know if this is due to the known patchelf issue or is this something else? I had assumed that the patchelf issue had been fixed. |
You’re right, v2.28 is higher than Homebrew’s requirement. Though to rule it out, I’d try to link binutils and see if that fixes it. I don’t know if
I’m not sure what the N/A means. That might just be a minor bug in All I know is that:
To the best of my knowledge, yes the patchelf issue was fixed, but not 100% sure. Though I’d assume the error message due to the patchelf issue was different than the error that happens when the host glibc is old. |
Well, I tried the I'm experiencing a different issue than that reported at #135068. From #135068:
From my machine (even after linking binutils):
That's what was happening with the patchelf issue. |
@jwhite007 do you still get the error with several formulae just like back in or just with |
Of the applications that I mention on #116841, interestingly only ccat results in a segmentation fault. R and more from util-linux are seemingly fine. So could it be that the patchelf issue has been rectified, but there are certain stragglers that have yet to be re-built using it? Could that be the case with ccat and gcc@13? |
Are you able to get any logs that might be of help? I’d try to run (I’m assuming |
Maybe so for |
@jwhite007 does building from source (as a workaround) fix it?
|
|
What does |
Attempting to build ccat from source, as you suggest, results in a seg fault from go, on of ccat's build dependencies.
|
The reason I think this might be useful is through a quick search I found it might have to do with the loader? Also try to |
Well, during the week I have to revert to my old installation of Linuxbrew as others on my team depend on it; however, I can do the following.
|
Do the files referenced in these two commands all exist? |
Well, I cannot find linux-vdso.so.1 anywhere, but the other files are there; however, I wouldn't suspect this to be a problem as the ldd output from ccat which works in my older Linuxbrew instance is exactly the same as can be seen below.
Interestingly, ccat in both the older, functional Linuxbrew instance and the latest, dysfuctional instance appear to be the same version, 1.1.0, so it's probably some updated dep version that's causing the seg fault. |
Is the
If you get this output, it is likely that |
To be clear, I'm switching between two different Linuxbrew instances on the same system, so all of the system libs are the same. The only libs that would be different would be the Linuxbrew-installed libs and linux-vdso.so.1 is found in neither of those.
|
My impression is that, going forward, Linuxbrew just isn't going to work all that well on RHEL or CentOS. |
You might be correct. It’s hard to tell without being able to replicate the error on my end. Like I said above, I have been using Homebrew on CentOS 7 just fine. Both in an HPC computing cluster and in containers. Let me know if you’re able to replicate the error in a VM such as VirtualBox or in a fresh install of a certain ISO. |
Well, I suppose it may be time to start looking into using the Nix package manager. |
This is getting a little off-topic, but yeah |
I have this same issue. Any updates? I know there was a suggested workaround to revert the patchelf.rb update. Wondering if there is a permanent fix in the works |
@cloudvii27 could you paste To the best of my understanding, the mentioned patchelf.rb error was resolved but the postinstall gcc fails in some systems and I don’t know if it’s for a related reason. It might help if it’s a reproducible bug by minimally replicating your environment on a different machine. |
@osalbahr, below is the output from
and
|
Not sure if this is the patchelf.rb error, CC @carlocab is this related? @cloudvii27 I'm assuming I tried to replicate your error in a ==> Installing gcc
==> Pouring gcc--13.1.0.x86_64_linux.bottle.tar.gz
==> Creating the GCC specs file: /home/linuxbrew/.linuxbrew/Cellar/gcc/13.1.0/bin/../lib/gcc/current/gcc/x86_64-pc-linux-gnu/13
🍺 /home/linuxbrew/.linuxbrew/Cellar/gcc/13.1.0: 1,668 files, 320.0MB
==> Running `brew cleanup gcc`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
[linuxbrew@13329514f7e9 ~]$ cat > hello.c
#include <stdio.h>
int main() {
puts("Hello, RockyLinux8.8");
}
[linuxbrew@13329514f7e9 ~]$ /home/linuxbrew/.linuxbrew/bin/gcc-13 hello.c -o hello
/usr/bin/ld: /home/linuxbrew/.linuxbrew/Cellar/gcc/13.1.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/13/liblto_plugin.so: error loading plugin: /usr/lib64/libc.so.6: version `GLIBC_2.33' not found (required by /home/linuxbrew/.linuxbrew/Cellar/gcc/13.1.0/bin/../libexec/gcc/x86_64-pc-linux-gnu/13/liblto_plugin.so)
collect2: error: ld returned 1 exit status
[linuxbrew@13329514f7e9 ~]$ brew link --force binutils
Linking /home/linuxbrew/.linuxbrew/Cellar/binutils/2.41... 87 symlinks created.
If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/home/linuxbrew/.linuxbrew/opt/binutils/bin:$PATH"' >> /home/linuxbrew/.bash_profile
[linuxbrew@13329514f7e9 ~]$ /home/linuxbrew/.linuxbrew/bin/gcc-13 hello.c -o hello
[linuxbrew@13329514f7e9 ~]$ ./hello
Hello, RockyLinux8.8
[linuxbrew@13329514f7e9 ~]$ brew doctor
Your system is ready to brew.
[linuxbrew@13329514f7e9 ~]$ brew config
HOMEBREW_VERSION: 4.1.7
ORIGIN: https://github.com/Homebrew/brew
HEAD: d4444b563e24ac7c05a93121c464c02dfa04d44f
Last commit: 20 hours ago
Core tap JSON: 28 Aug 16:10 UTC
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 1
Homebrew Ruby: 2.6.10 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.10_1/bin/ruby
CPU: single-core 64-bit skylake
Clang: N/A
Git: 2.39.3 => /bin/git
Curl: 7.61.1 => /bin/curl
Kernel: Linux 6.4.11-200.fc38.x86_64 x86_64 GNU/Linux
OS: Rocky Linux release 8.8 (Green Obsidian)
Host glibc: 2.28
/usr/bin/gcc: 8.5.0
/usr/bin/ruby: N/A
glibc: 2.35_1
gcc@11: N/A
gcc: 13.1.0
xorg: N/A Container info: [linuxbrew@13329514f7e9 ~]$ brew install -q fastfetch
==> Fetching fastfetch
==> Caveats
Bash completion has been installed to:
/home/linuxbrew/.linuxbrew/etc/bash_completion.d
==> Summary
🍺 /home/linuxbrew/.linuxbrew/Cellar/fastfetch/2.0.5: 38 files, 1.6MB
==> Running `brew cleanup fastfetch`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
[linuxbrew@13329514f7e9 ~]$ fastfetch
__wgliliiligw_, linuxbrew@13329514f7e9
_williiiiiiliilililw, ----------------------
_%iiiiiilililiiiiiiiiiii_ OS: Rocky Linux 8.8 x86_64
.Qliiiililiiiiiiililililiilm. Host: KVM/QEMU Standard PC (Q35 + ICH9, 2009) (pc-q35-8.1)
_iiiiiliiiiiililiiiiiiiiiiliil, Kernel: 6.4.11-200.fc38.x86_64
.lililiiilililiiiilililililiiiii, Uptime: 28 mins
_liiiiiiliiiiiiiliiiiiF{iiiiiilili, Packages: 13 (brew)
jliililiiilililiiili@` ~ililiiiiiL Shell: bash 4.4.20
iiiliiiiliiiiiiili>` ~liililii Display (QEMU Monitor): 1280x800
liliiiliiilililii` -9liiiil Cursor: Adwaita
iiiiiliiliiiiii~ "4lili Terminal: xterm
4ililiiiiilil~| -w, )4lf Terminal Font: fixed (8.0pt)
-liiiiililiF' _liig, )' CPU: 06/8e @ 2.304037 GHz
)iiiliii@` _QIililig, Memory: 286.90 MiB / 1.91 GiB (15%)
)iiii>` .Qliliiiililw Locale: C.UTF-8
)<>~ .mliiiiiliiiiiil,
_gllilililiililii~ ████████████████████████
giliiiiiiiiiiiiT` ████████████████████████
-^~$ililili@~~' |
@osalbahr No worries, here's the output from
could this warning about coreutils be related to the problem I'm experiencing? Thanks for the suggestion about trying to replicate the problem in a container. I'm not experienced with containers, but I'll follow the steps you performed above and see what happens. |
Not sure. I haven’t seen this error before. |
Sorry for a potentially unrelated drive-by but I'm getting similar glibc problems on by rhe7 machine. I've recently started gettng this with a bunch of recipes:
Which is weird since my system glibc is 2.17 and homebrew's version is 2.35, so I don't know where |
If you are ever experiencing the same problems as reported on a specific github issue, it's best to not only show your error output but also your output of "brew gist-logs link OR |
@lewis6991 Looking at the output, I am assuming you are building from source due to using non-default prefix. You will know if you run Regardless, my advice, as a workaround, is to use the same prefix on an Ubuntu machine (virtualized or bare metal) then |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I'm still having this issue on a clean RHEL8 install. @jwhite007 were you able to resolve this with a permanent fix? |
@cloudvii27, I have mostly given up on using Linuxbrew in RHEL8. I'll keep using Homebrew on my Macs, of course, on which the Framework works very well. I don't expect the maintainers of Linuxbrew, to whom I already owe a lot of respect for what they do, to put in a whole lot of effort into this as seemingly those of us who want to use Linuxbrew in RHEL8 are surely a minority, a small minority. I'm currently exploring other options for RHEL8 such as the Nix package manager; however, that appears to be quite some effort for what I need. I think the best bet for the use cases at my company, is to use a Conda env. We already use Conda envs for our production bioinformatics pipelines. We do switch into Conda using pyenv which is currently now installed via Linuxbrew. I'll probably install pyenv or possibly just Conda without using a package manager. If I do get some sort of idea about the problem popping into my head, and I somehow stumble upon a fix, I'll post a comment here about the solution. |
@jwhite007 I tried installing gcc on a RHEL9 machine and it did not cause this error. Haven't thoroughly used Linuxbrew on RHEL9, but I'll probably move to it if it continues to work. |
@cloudvii27, thanks so much for that information. That's good news; however, now I have to convince our IT to upgrade to RHEL 9. |
@cloudvii27, have you been testing on RHEL 9.2, the latest stable? |
I wasn't sure, so I checked and it is indeed RHEL 9.2. I haven't done too much testing on it, but the install of gcc at least worked |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
output$ brew postinstall --debug gcc
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading gcc from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading glibc from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading linux-headers@5.15 from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading gcc from API
/usr/bin/env /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/shared/git --version
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading gmp from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading m4 from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading isl from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading libmpc from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading mpfr from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading zstd from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading lz4 from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading xz from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading cmake from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading openssl@3 from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading ca-certificates from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading ncurses from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading pkg-config from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading gpatch from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading zlib from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading binutils from API
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaAPILoader): loading bison from API
==> Postinstalling gcc
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb (Formulary::FromPathLoader): loading /home/linuxbrew/.linuxbrew/opt/gcc/.brew/gcc.rb
Warning: The post-install step did not complete successfully
You can try again using:
brew postinstall gcc
==> An exception occurred within a child process:
ErrorDuringExecution: Failure while executing;
/home/linuxbrew/.linuxbrew/Cellar/gcc/13.1.0/bin/gcc-13 -print-libgcc-file-name
was terminated by uncaught signal SEGV. Here's the output:/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:12:in
'popen_read' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils/popen.rb:16:in
safe_popen_read'/home/linuxbrew/.linuxbrew/opt/gcc/.brew/gcc.rb:151:in
post_install' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1255:in
block (2 levels) in run_post_install'/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1055:in
with_logging' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1254:in
block in run_post_install'/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:499:in
with_env' /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula.rb:1250:in
run_post_install'/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/postinstall.rb:24:in `
The text was updated successfully, but these errors were encountered: