Comments (13)
gmp hasn't yet been patched to remove the MacOS-specific stuff. A pull request would be happily accepted. Use if OS.mac?
as necessary.
from legacy-linuxbrew.
@sjackman How to use and where to place if OS.mac?
?
from legacy-linuxbrew.
@sjackman I have figured out how to add if OS.mac?
for gmp4
and mpfr2
, so where should these changes be pulled?
from legacy-linuxbrew.
@sjackman Hi, I found make check
failed because it can not find keg-only library. For example, when make check
mpfr2
, gmp4
's lib directory should be in LD_LIBRARY_PATH
. Currently, I made the following changes:
system "make check" if OS.mac?
system "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:#{gmp4.opt_prefix}/lib && make check" if OS.linux?
Is that OK?
from legacy-linuxbrew.
If the patch won't be merged upstream into Homebrew, I prefer as small a patch as possible, to reduce merge conflicts. In this case, I'd just use:
system "make check" unless OS.linux? # Fails without LD_LIBRARY_PATH
The real solution is to make sure on Linux systems that the LD_LIBRARY_PATH environment variable is not cleared by superenv.
from legacy-linuxbrew.
@sjackman I think we can not put the installed gmp4
, mpfr2
and so on into LD_LIBRARY_PATH
, since they may cause conflicts with the system ones. I don't know why it is OK in Mac.
from legacy-linuxbrew.
@sjackman I have successfully installed gcc49
, but libgcc_s.so
in .linuxbrew/opt/gcc49/lib/gcc/x86_64-unknown-linux-gnu/{lib32, lib64}
is not linked into .linuxbrew/opt/gcc49/lib/gcc/x86_64-unknown-linux-gnu/4.9.0
, and this cause
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
When I $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.linuxbrew/opt/gcc49/lib/gcc/x86_64-unknown-linux-gnu/lib64
, the error is gone.
from legacy-linuxbrew.
@dongli On Mac OS, the path to libgcc_s.1.dylib
is hardcoded in the executable:
$ gcc-4.8 hello.c -o hello
$ otool -L hello
hello:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
/usr/local/Cellar/gcc48/4.8.2/gcc/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
$ otool -l hello |grep gcc_s
name /usr/local/Cellar/gcc48/4.8.2/gcc/lib/libgcc_s.1.dylib (offset 24)
from legacy-linuxbrew.
@dongli I've compiled gcc48 on Linux and reproduced your error:
$ gcc-4.8 hello.c -o hello
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status
from legacy-linuxbrew.
So what should we do to remove this little inconvenience?
from legacy-linuxbrew.
I don't have a quick fix. It's going to require some troubleshooting.
from legacy-linuxbrew.
This appears to be a known issue, bug 32415.
This workaround worked for me:
cd `brew --prefix gcc48`/lib/gcc/x86_64-unknown-linux-gnu/4.8.2
ln -s ../lib64/libgcc_s.so* .
from legacy-linuxbrew.
I've created a new issue, #66.
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.