Binutils build fails on Mac OS X 10.10.5 Yosemite - macos

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.

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.

After build failure , you should clean previously generated object files
So,
make clean
./configure --prefix=/usr --disable-werror
make

Related

Makefile:77: *** missing separator. Stop

Hi I am trying to install systemC on WSL2, when I run sudo make I seem to be getting this error
Making all in src
make[1]: Entering directory '/home/ryans/systemc-2.3.4/src'
Makefile:77: *** missing separator. Stop.
make[1]: Leaving directory '/home/ryans/systemc-2.3.4/src'
make: *** [Makefile:557: all-recursive] Error 1
I have looked at answers, solution 1 and solution2 but they don't seem to apply to my case because the file in question do not have a space or a tab at line 77.
Seems like the right way to install systemC on WSL is the run the following commands in the uncompressed .tar folder,
sudo aclocal
sudo automake --add-missing
sudo autoupdate
before making the objdir with the other instructions can be followed here.

install mpfr: get into multiple errors

I want to install mpfr package as a non root user. I built it using this:
./configure --with-gmp-lib=/data/home/parisa/gmp-6.1.2/lib
, but after make I got the following error
WARNING: 'makeinfo' is missing on your system.
You should only need it if you modified a '.texi' file, or
any other file indirectly affecting the aspect of the manual.
You might want to install the Texinfo package:
<http://www.gnu.org/software/texinfo/>
The spurious makeinfo call might also be the consequence of
using a buggy 'make' (AIX, DU, IRIX), in which case you might
want to install GNU make:
<http://www.gnu.org/software/make/>
make[1]: *** [mpfr.info] Error 127
make[1]: Leaving directory `/data/home/parisa/mpfr-3.1.5/doc'
make: *** [all-recursive] Error 1
I searched this error in Internet, but I couldn't find something useful and easy to understand. So, I tried to install texinfo, but after configuring this warning message appears:
WARNING: 'aclocal-1.15' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
<http://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<http://www.gnu.org/software/autoconf>
<http://www.gnu.org/software/m4/>
<http://www.perl.org/>
make: *** [aclocal.m4] Error 127
I also tried autoreconf -f -i before configuring, but with no success. I tried to use automake installed on our cluster by using LD_LIBRARY_PATH but again nothing changed.

Trying to install LTTng on Raspberry Pi 3 running Raspbian Jessie (Debian)

I'm trying to install LTTng on a Raspberry Pi 3 running Raspian Jessie (Debian). The directions say that with that distribution, I need to build it from source. When I do, and try to execute the make, I get the following error:
/usr/bin/make -C /lib/modules/4.4.34-v7+/build M=/tmp/tmp.tHMTTCom3X/lttng-modules-2.9.0 CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules
make[1]: Entering directory '/lib/modules/4.4.34-v7+/build'
make[1]: *** No rule to make target 'modules'. Stop.
make[1]: Leaving directory '/lib/modules/4.4.34-v7+/build'
Makefile:110: recipe for target 'modules' failed
make: *** [modules] Error 2
(It looks to me that there is a rule for that target.)
Has anyone done this, or have any tips or ideas on how to do this?
Thanks!
You might be missing the headers for the running kernel, try installing the raspberrypi-kernel-headers package :
sudo apt-get install raspberrypi-kernel-headers

Octave install error on Mac El Capitan

When I tried to install Octave (brew install octave --with-gui --HEAD) on OS X 10.11.2 I got this error:
==> ./configure --prefix=/usr/local/Cellar/octave/HEAD --enable-dependency-tracking --enable-link-al
==> make all DOC_TARGETS=
Last 15 lines from /Users/macbookpro/Library/Logs/Homebrew/octave/03.make:
GEN scripts/plot/util/gnuplot_binary.m
GEN doc/interpreter/contributors.texi
GEN etc/icons/octave-logo-256.png
./build-aux/missing: line 81: rsvg-convert: command not found
WARNING: 'rsvg-convert' is missing on your system.
You might have modified some files without having the proper
tools for further handling them. Check the 'README' file, it
often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in
case some other package contains this missing 'rsvg-convert' program.
make[2]: *** [etc/icons/octave-logo-256.png] Error 127
make[2]: *** Waiting for unfinished jobs....
Updating ./doc/liboctave/version-liboctave.texi
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Just install this lib:
brew install librsvg

Building GCC 4.x on Mac 10.11

I'm trying to compile gcc 4.x on osx 10.11 (mainly focusing around 4.9.2 and 4.9.3). No matter what I do, I can't get it to build properly, it always errors out somewhere. Using 5.x is not an option, and neither is using gcc from brew or macports.
I've got Xcode 7.2 and Command Line Tools installed (and updated). The following has worked fine for me on previous versions of osx (such as 10.9, but not sure about 10.10). Here's what I'm using to build it:
cd gcc-4.9.2
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.9.2/configure --prefix=/usr/local/gcc-4.9.2
make
make install
Here's how this errors out (with a lot more ptrdiff_t errors as well):
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:1854:29: error: use of undeclared identifier 'ptrdiff_t'
const ptrdiff_t __m = (~ptrdiff_t(0) ^
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [graphite.o] Error 1
make[3]: *** Waiting for unfinished jobs....
20 errors generated.
make[3]: *** [graphite-blocking.o] Error 1
20 errors generated.
20 errors generated.
make[3]: *** [graphite-clast-to-gimple.o] Error 1
make[3]: *** [graphite-dependences.o] Error 1
20 errors generated.
make[3]: *** [graphite-interchange.o] Error 1
13 warnings generated.
/bin/sh /usr/local/src/objdir/../gcc-4.9.2/gcc/../move-if-change tmp-attrtab.c insn-attrtab.c
/bin/sh /usr/local/src/objdir/../gcc-4.9.2/gcc/../move-if-change tmp-dfatab.c insn-dfatab.c
/bin/sh /usr/local/src/objdir/../gcc-4.9.2/gcc/../move-if-change tmp-latencytab.c insn-latencytab.c
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
So, I guess the question here is if anyone knows any tricks to getting gcc 4.x to build on 10.11. Or if not, any advice for figuring out what's going on here. I've tried searching for days and haven't come up with much of anything. Not really sure how to approach this. I can definitely post more relevant info if needed (just not sure what's relevant).
tar xf gcc-4.9.3.tar.bz2
cd gcc-4.9.3
#fix - os x got now wget
sed -i.bak 's/wget/curl -O/g' contrib/download_prerequisites
./contrib/download_prerequisites
# this fixes your problem !!!!
sed -i.bak '/__need_size_t/d' gmp/gmp-h.in
mkdir build
cd build
#for example
../configure --target=x86_64-apple-darwin15.5.0 --build=x86_64-apple- darwin15.5.0 \
--prefix=/usr/local --program-suffix=-4.9 \
--enable-languages=c,c++ --with-system-zlib --enable-libstdcxx-time=yes \
--enable-stage1-checking --enable-checking=release --enable-lto \
--disable-multilib --disable-nls

Resources