0

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.

Omnik
  • 126
  • 1
  • 11

2 Answers2

2

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.

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • thanks for the post. Now i have successfully installed binutils, but how am I suppose to run the tools inside it? For example if I want to run objdump, have no idea how to make it work. – Omnik Aug 23 '15 at 02:06
  • oh I figured it out myself, all the tools have a prefix of 'g' objdump becomes gobjdump, ar -> gar (although I have no idea why is there a 'g' added before). But I'm able to use all the tools now. Thanks for the post again. – Omnik Aug 23 '15 at 03:35
1

After build failure , you should clean previously generated object files

So,

make clean

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

make