I'm attempting to compile gcc 4.7.1 on Mint Linux with gcc 4.7.2 and get the following output:
[snip]
ar rc .libs/libgmp.a assert.o compat.o errno.o [snip]
rm -fr .libs/libgmp.lax
creating libgmp.la
(cd .libs && rm -f libgmp.la && ln -s ../libgmp.la libgmp.la)
make[5]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build/gmp'
make[4]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build/gmp'
make[3]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build/gmp'
make[2]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/justin/projects/os/linux/src/gcc-4.7.0/build'
make: *** [all] Error 2
I don't even know where to start looking since I don't get a descriptive error! It looks like it compiles GMP successfully and then fails after that, unable to complete whatever the next step should be.
The question is answered in its comments above. To sum up: The error was due to an improper global (presumably environment) variable, much earlier in the scrollback; that because OP was using a -j flag and other currently active branches did continue building.
Related
I am trying to compile a gcc from source since I cannot use yum, apt-get and so forth. My steps are simple:
-I download the source GCC (I tried gcc-4.8.4 and gcc-5.3.0) in my pc and I used:
./contrib/download_prerequisites
-After this, I send this my gcc source file to my system using powerPC y Linux.
mkdir objdir
cd objdir
../gcc-4.6.2/configure --prefix=/usr --enable-languages=c,c++,fortran,go
make
I have got the next error:
In file included from ../../gcc-4.9.2/gcc/genmddeps.c:19:0:
../../gcc-4.9.2/gcc/system.h:205:20: fatal error: cstring: No such file or directory
# include <cstring>
^
compilation terminated.
make[3]: *** [build/genmddeps.o] Error 1
make[3]: Leaving directory `/home/root/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/root/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/root/build'
make: *** [all] Error 2
Any idea about what it is going wrong?
Best regards
Some advice: first, compile (notably for learning purposes) something simpler than GCC, e.g. GNU make if you never compiled GNU stuff from source code.
Then compile a recent GCC (so 5.3 in january 2016) - building issues would be the same with 4.8, and GCC 5 is better! You need the gcc & libc-dev & g++ & libstdc++-dev for your host machine (the one running your future cross-compiler). I am not sure your --prefix=/usr is a good idea. Consider perhaps a --program-suffix=-mine option (otherwise, your system's /usr/bin/gcc could be overwritten, which you don't want to happen)
You could leave the default --prefix=/usr/local and later add appropriately /usr/local/bin/ into your PATH
bit of a newbie to Ubuntu here and this has really been confusing me.
Currently trying to build OpenImageIO using make, following the steps outlined here: https://sites.google.com/site/openimageio/checking-out-and-building-openimageio
As far as I'm aware, I have installed all of the dependencies, however trying to run make gives me the following error:
platform=linux64, hw=x86_64
OPENIMAGEIO_SITE = shanesimmsart-pc
dist_dir = dist/linux64
INSTALLDIR = /home/shanesimmsart/oiio
( cd build/linux64 ; make )
make[1]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
make[2]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
make[3]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
make[3]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make[3]: Entering directory `/home/shanesimmsart/oiio/build/linux64'
[ 0%] Building CXX object src/libutil/CMakeFiles/OpenImageIO_Util.dir/strutil.cpp.o
/home/shanesimmsart/oiio/src/libutil/strutil.cpp: In function ‘OpenImageIO::v1_6::string_view OpenImageIO::v1_6::Strutil::parse_nested(OpenImageIO::v1_6::string_view&, bool)’:
/home/shanesimmsart/oiio/src/libutil/strutil.cpp:768:28: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for ( ; nesting && len < p.size(); ++len) {
^
cc1plus: all warnings being treated as errors
make[3]: *** [src/libutil/CMakeFiles/OpenImageIO_Util.dir/strutil.cpp.o] Error 1
make[3]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make[2]: *** [src/libutil/CMakeFiles/OpenImageIO_Util.dir/all] Error 2
make[2]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/shanesimmsart/oiio/build/linux64'
make: *** [cmake] Error 2
Does anyone have any idea what I might be doing wrong / might be missing?
The package you're using has enabled the -Werror flag by default, which forces the compiler to treat all warnings as errors. This is always a bad idea for shipping code to users, because users will have a wide variety of different compilers and versions of compilers, so users will get different warnings than developers. When developers build the code they should absolutely use -Werror. When developers ship code to users, they should absolutely not enable -Werror by default.
Anyway, looking at the code in Git it appears that if you do this:
make STOP_ON_WARNING=no
it will disable -Werror.
I try to compile gcc with make install and it gives me this:
make[1]: Entering directory `/media/BOSS/sources/gcc-build'
/bin/bash ../gcc-4.8.1/mkinstalldirs /tools /tools
/bin/bash: line 3: cd: ./fixincludes: No such file or directory
make[1]: *** [install-fixincludes] Error 1
make[1]: Leaving directory `/media/BOSS/sources/gcc-build'
make: *** [install] Error 2
I am currently compiling it for lfs also I am in a seprate directory on a 32 bit computer
It seems the issue is caused by the target install. So my advice is to check the line in MakeFile which relates to [install].
Perhaps you may want to share more details for better solutions.
I tried to compile xcbproto 1.7 in linux and get an error message when type make install command
Making install in xcbgen
make[1]: Entering directory `/home/reham/miriad_files/xcb-proto-1.7/xcbgen'
make[2]: Entering directory `/home/reham/miriad_files/xcb-proto-1.7/xcbgen'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/lib/python2.5/site-packages/xcbgen" || /bin/mkdir -p "/usr/local/lib/python2.5/site-packages/xcbgen"
/usr/bin/install -c -m 644 __init__.py error.py expr.py matcher.py state.py xtypes.py '/usr/local/lib/python2.5/site-packages/xcbgen'
/home/reham/Desktop/Fermi/ScienceTools-v9r15p2-fssc-20090808-i686-pc-linux-gnu-libc2.5/i686-pc-linux-gnu-libc2.5/bin/python: error while loading shared libraries: libpython2.5.so.1.0: cannot open shared object file: No such file or directory
make[2]: *** [install-pkgpythonPYTHON] Error 127
make[2]: Leaving directory `/home/reham/miriad_files/xcb-proto-1.7/xcbgen'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/reham/miriad_files/xcb-proto-1.7/xcbgen'
make: *** [install-recursive] Error 1
What is the problem?
It seems there's a problem with a custom python version you seem to have installed on your system. Namely this one:
/home/reham/Desktop/Fermi/ScienceTools-v9r15p2-fssc-20090808-i686-pc-linux-gnu-libc2.5/i686-pc-linux-gnu-libc2.5/bin/python
This seems to depend on the shared library libpython2.5.so.1.0 which isn't found by the linker.
Most probably the custom python version you installed brought this shared library along and it just isn't found as it is not in one of the standard directories.
To fix this you might either try to use the python version installed on your system or add the path containing libpython2.5.so.1.0 to the ones searched by the linker.
My guess is it will be somewhere below /home/reham/Desktop/Fermi/ScienceTools-v9r15p2-fssc-20090808-i686-pc-linux-gnu-libc2.5/i686-pc-linux-gnu-libc2.5/
Most probably in the subdirectory /lib .
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
what is arm-linux-gcc and how to install this in ubuntu
While I'm trying this command
$ make ARCH=arm devkit8000 defconfig
I get this error:
make[1]: arm-linux-gcc: Command not found
make[1]: arm-linux-gcc: Command not found
scripts/kconfig/conf -s arch/arm/Kconfig
***
*** You have not yet configured your kernel!
*** (missing kernel .config file)
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[3]: *** [silentoldconfig] Error 1
make[2]: *** [silentoldconfig] Error 2
make[1]: *** No rule to make target `devkit8000'. Stop.
make: *** [devkit8000] Error 2
How can i solve this error?
Do you have ARM toolchain installed? If there is no such package in Ubuntu you can download it from the internet and add it to your $PATH.
Take a look at what is arm-linux-gcc and how to install this in ubuntu
EDIT:
It might be, that your makefile is looking for different filenames, than you have.
Try locating arm-linux-gnueabi-gcc file. Go to that directory and you may create links for each file with arm-linux-gnueabi- prefix.
Try after sudo su:
ln -s arm-linux-gnueabi-gcc arm-linux-gcc
ln -s arm-linux-gnueabi-cc arm-linux-cc
etc.
Might help, but I do not guarantee. Usually works ;-)