Binutils build fails on Mac OS X 10.10.5 Yosemite

落爺英雄遲暮 提交于 2019-12-02 16:13:09

问题


After downloading the package of GNU Binutils 2.25

I followed the instructions on "Installing Binutils":

./cnofigure

make

errors happened after build:

../../binutils-gdb/binutils/nm.c:1733:28: error: 'sbrk' is deprecated [-Werror,-Wdeprecated-declarations]
      char *lim = (char *) sbrk (0);

/usr/include/unistd.h:582:7: note: 'sbrk' has been explicitly marked deprecated here
void    *sbrk(int);

1 error generated.
make[4]: *** [nm.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-binutils] Error 2
make: *** [all] Error 2

I did some research on net and they said using this command

./configure --prefix=/usr --disable-werror

and I get

/Library/Developer/CommandLineTools/usr/bin/make  all-recursive   
make[8]: Nothing to be done for 'all-am'. 
make[1]: Nothing to be done for 'all-target'.

(what does that mean "nothing to be done for all-am and all-target")

I don't know what to do anymore. Is it a bug or it's me doing something wrong?

Please help.


回答1:


You really would make life easier for yourself if you used homebrew as a package manager on OSX.

Goto the homebrew website and copy and paste the one-line install script into your Terminal.

Then you can install binutils simply by typing

brew install binutils

If, down the line, you want to find GNU sed, or ImageMagick, you can just do

brew search sed

or

brew search imagemagick

then

brew install sed

If you have any problems, just run

brew doctor

If you want to update all your packages, just run

brew update
brew upgrade --all

More cool ideas and suggestions here.




回答2:


After build failure , you should clean previously generated object files

So,

make clean

./configure --prefix=/usr --disable-werror

make


来源:https://stackoverflow.com/questions/32151840/binutils-build-fails-on-mac-os-x-10-10-5-yosemite

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!