-
Notifications
You must be signed in to change notification settings - Fork 296
Standalone installation of Linuxbrew #107
Comments
Short answer: See if that gets you further. I'll try a more complete response later. |
Hmm, okay great! That sounds promising. I'll remove glibc and all the dependencies and will see how it goes tomorrow. |
I tried
This leads me to two questions: (2) Under Linux, would it be appropriate to eliminate "--program-prefix=g" from the binutils formula? |
Hmmm, while the installation of glibc went swimmingly, it seems to have broken any further builds. It always complains with errors like the following:
I tried uninstalling and reinstalling my linuxbrew version of gcc, but with glibc 2.19 installed it gets equally angry with my (old) system version of gcc such that I cannot get the linuxbrew formula for gcc to build.
|
You'll have to clear your LD_LIBRARY_PATH: |
That's not the issue -- it's already done. (If I hadn't cleared my LD_LIBRARY_PATH then no system coreutils would work, since the system is using an older glibc version.)
Wait, I'm confused... I thought that the whole point of the RPATH patch was to force brewed programs to use the proper libraries, even when they differ from binary to binary. So after I install glibc 2.19, why don't existing programs use the (old) system glibc with which they were brewed, and newly brewed programs use 2.19? If I have to unlink glibc in order to keep things working, then what's the point of installing it in the first place? |
Programs patched with |
I tried to test whether this was the case but Following this procedure on the bottle branch:
Then
Does PS, I am using the old system
Haha, no rush and thank you for your help so far! I've actually gotten things to a good state using gcc-4.8/vim/libraries from the master branch of linuxbrew, so your work has already helped me. I'm testing the bottle branch and glibc because I'm interested in their possibilities, but it's not a time-critical matter at all. |
I have the same issue. I don't know why the newly installed
I've created a new wiki page with instructions for a Standalone Installation of Linuxbrew. |
I've merged the branch |
Hi,
Any advice please ? Best, |
By the way, here is what I found in the config.log
|
My problem might be related to this: at the end of of the glibc installation, I have plenty of patchelf errors:
After unlinking glibc, patchelf works again, but the glibc installation might not be complete right ?:
Best, |
I've managed to reproduce this error, but I have no idea what's causing it. I'll try to sort it out and get back to you. |
Here's a related thread: |
@jrevillard What distribution of Linux are you using, and what version of GCC are you using to bootstrap the system? |
@jrevillard The following patch may fix your issue. After applying the patch, try brew update
brew reinstall glibc
cd `brew --prefix`
chmod +x lib/ld-linux-x86-64.so.2 lib/libc.so.6
brew test glibc diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb
index 9d067a6..1f484dd 100644
--- a/Library/Homebrew/extend/ENV/std.rb
+++ b/Library/Homebrew/extend/ENV/std.rb
@@ -57,7 +57,7 @@ module Stdenv
append 'LDFLAGS', '-Wl,-headerpad_max_install_names' if OS.mac?
- if OS.linux?
+ if OS.linux? && formula != "glibc"
# Set the dynamic library search path
append "LDFLAGS", "-Wl,-rpath,#{HOMEBREW_PREFIX}/lib"
self["LD_RUN_PATH"] = "#{HOMEBREW_PREFIX}/lib" |
Hi, I'm building linuxbrew on a old Scientific Lunix 5 OS.
Best, |
By the way, the boostrap gcc version is old of course
|
I restarted from scratch, in fact now, with the fixes even the patchelf installation does not work properly:
|
@jrevillard The short answer is |
@sjackman, using Fantastic work with the standalone instructions, but I have a few issues with my machine setup. I will address them in a separate comment shortly. |
PS, whoops sorry for closing. |
So, my issues with the standalone instructions all relate to problems with gcc-4.9 so far rather than anything with the instructions themselves. I have different problems on an old system and a new system, so I've separated them below: Old system: On a system with an old system installation of The error it throws is:
I have newer versions of gcc installed elsewhere on the system (not managed by this Linuxbrew branch). However, there is no way to use these versions in lieu of New system (Fedora Core 20, using I get the same error as @aktau in #123. Mike |
@mbsullivan To use a newer version of GCC, try ln -s /usr/bin/gcc44 ~/.linuxbrew/bin/gcc-4.4
ln -s /usr/bin/g++44 ~/.linuxbrew/bin/g++-4.4
ln -s /usr/bin/gfortran44 ~/.linuxbrew/bin/gfortran-4.4
export HOMEBREW_CC=~/.linuxbrew/bin/gcc-4.4 |
@sjackman, no can do. No admin access. EDIT: Wait, I read that backwards. I see now. Lemme try. EDIT 2: It gets the same error linking to a system installation of |
Looking at #7 was very educational and I may have solved my problem using patchelf. Thanks for your help. |
Using patchelf I modified |
I'm glad to hear that you're making progress. Those packages you mention should all be installed |
I need to install those packages just to get to that point. My system has too old a version of |
Ah, I see. Can you post the complete log in a gist? |
https://gist.github.com/7b4ffca62106ffa6bda4.git /usr/local/linuxbrew/tmp/gcc-H92WgH/gcc-4.9.2/build/./gcc/xgcc -B/usr/local/linuxbrew/tmp/gcc-H92WgH/gcc-4.9.2/build/./gcc/ -B/usr/local/linuxbrew/Cellar/gcc/4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/linuxbrew/Cellar/gcc/4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/linuxbrew/Cellar/gcc/4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/linuxbrew/Cellar/gcc/4.9.2/x86_64-unknown-linux-gnu/sys-include -O2 -g -O2 -Os -w -pipe -march=core2 -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o ./libgcc_s.so.1.tmp -g -O2 -Os -w -pipe -march=core2 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o cpuinfo_s.o sfp-exceptions_s.o addtf3_s.o divtf3_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o fixunstfti_s.o floattitf_s.o floatuntitf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o getf2_s.o letf2_s.o eqtf2_s.o _divtc3_s.o _multc3_s.o _powitf2_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so |
okay, the problem is fixed by executing the above command adding |
I don't see an error message in that gist, only a successful run of configure: |
Sorry my bad the configure runs fine, it's make that breaks. Where would I find a log for make? |
More info: the error given by the above command is: /usr/local/linuxbrew/Cellar/binutils/2.24/x86_64-unknown-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
/usr/local/linuxbrew/Cellar/binutils/2.24/x86_64-unknown-linux-gnu/bin/ld: cannot find /usr/lib64/libc_nonshared.a I can get rid of the first by linking |
Maybe the issue is related to line in Standalone guide: |
Found my logs: https://gist.github.com/jbaum98/02b3c012c5a98fdf36d4 |
Symlinks are relative to the location of the symlink itself.
Don't skip this command. |
That being said, I don't think that the |
I can do that with |
In the debug shell I set |
I'm not sure. I've confirmed that my |
I also get an error setting |
The solution I think requires finding a configure flag to specify to either Am I correct in understanding that you don't have |
/usr/local/linuxbrew/Cellar/glibc/2.19/lib/crti.o
/usr/local/linuxbrew/lib/crti.o
/usr/local/lib/crti.o
/mnt/stateful_partition/dev_image/linuxbrew/Cellar/glibc/2.19/lib/crti.o
/mnt/stateful_partition/dev_image/linuxbrew/lib/crti.o
/mnt/stateful_partition/dev_image/lib/crti.o I'm not positive about |
I found how to split it up into the 3 stages, and it doesn't even make it past stage 1 before it starts using |
It might have something to do with |
The real question is how to configure binutils/glibc when glibc is installed in a non-standard location. |
This may be just a chromebook specific issue, but at least for me |
|
http://www.tldp.org/HOWTO/Glibc2-HOWTO-6.html This seems to talk about that but I can't really understand what it's saying maybe you can make sense of it? The part that confuses me is what should be substituted for |
I believe these issues are resolved. I'm closing this ticket. Feel free to open a new ticket if some of the issues raised here are still current. |
I just tested the installation of glibc under the bottle branch; it went pretty well, but there may be a couple missing dependencies. (I am installing it on a machine running CentOS 5.5, which is quite outdated.)
I haven't yet looked into how dependencies/version requirements are dictated in Homebrew/Linuxbrew, so I'll just describe the procedure I went through to get it installed. Here's what happened:
(1) prepared the bottle branch and installed patchelf using Linuxbrew's local gcc:
(2) tried glibc
brew install glibc -v --cc=glibc
, it fails with:It seems to me like this means that a new version of binutils is a dependency.
(3) installed binutils
brew install binutils -v --cc=gcc-4.8
.(4) The binutils recipe uses a program prefix 'g' (leading to
gld
andgas
), which is non-standard for Linux distros I've used. This led to some errors, so I had to manually symlink $LINUXBREW/bin/ld and $LINUXBREW/bin/gas to the generated programs. Would this be considered a bug in linuxbrew's binutils?(5) With the new binutils, an installation of glibc now runs into old kernel header files:
It seems like this means that a new version of linux-headers is a dependency.
(4) Installed linux-headers with
brew install linux-headers -v --cc=gcc-4.8
. Something weird happened here... It seemed to not respect the --cc= version I gave it, and ended up using an old-and-busted gcc on the system path. (Any idea why this would happen?) I took this version of gcc out of my path and continued.(5) With new binutils and linux-headers installed, glibc 2.19 installed like a charm.
One more thing: I might add a caveat to the installer to warn the user to unset LD_LIBRARY_PATH immediately if they've left it pointing to $LINUXBREW/lib/. Otherwise the new glibc will minorly hose your system if it expects an older one.
The text was updated successfully, but these errors were encountered: