gcc make error on hpc - linux

I want to use the hpc in our univerisity, but the gcc version of the system is too old to compile new packages that I need. So I want to install a new version gcc locally.
I downloaded the gcc-5.2.0 package and configured. When I make the files, there are some mistake, which lead to process killed. The last sentence before process killed is
/home/$USERNAME/software/gcc-5.2.0/host-x86_64-unknown-linux-gnu/prev-gcc/xg++ -B/home/$USERNAME/software/gcc-5.2.0/host-x86_64-unknown-linux-gnu/prev-gcc/ -B/home/$USERNAME/local/gcc-5.2.0/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/home/$USERNAME/software/gcc-5.2.0/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/home/$USERNAME/software/gcc-5.2.0/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/home/$USERNAME/software/gcc-5.2.0/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/home/$USERNAME/software/gcc-5.2.0/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include -I/home/$USERNAME/software/gcc-5.2.0/libstdc++-v3/libsupc++ -L/home/$USERNAME/software/gcc-5.2.0/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/home/$USERNAME/software/gcc-5.2.0/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c -g -O2 -gtoggle -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../.././gcc -I../.././gcc/. -I../.././gcc/../include -I../.././gcc/../libcpp/include -I/home/$USERNAME/local/gmp-4.3.2//include -I/home/$USERNAME/local/mpfr-2.4.2/include -I/home/$USERNAME/local/mpc-1.0.1//include -I../.././gcc/../libdecnumber -I../.././gcc/../libdecnumber/bid -I../libdecnumber -I../.././gcc/../libbacktrace -o insn-recog.o -MT insn-recog.o -MMD -MP -MF ./.deps/insn-recog.TPo insn-recog.c
and the error information is
xg++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.
make[3]: *** [insn-recog.o] Error 4
make[3]: Leaving directory '/home/$USERNAME/software/gcc-5.2.0/host-x86_64-unknown-linux-gnu/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory '/home/$USERNAME/software/gcc-5.2.0'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory '/home/$USERNAME/software/gcc-5.2.0'
make: *** [all] Error 2
I have searched some question about this kind of problem, it seems that this is caused by not enough memory. But I run on a hpc with more than 20G memory free. So I don't what the problem is and how to solve it.
The OS version is Red Hat 4.4.7-3

The fact shows that it's still the memory problem. It seems that the login node doesn't use the swap memeory. I have to log into the test node to install softwares.

An internal compiler error (ICE) means that the compiler has detected a bug in itself. It might be that you're using some unusual code construct that causes the compiler to hit this bug. In any case, the first step you should do is to test with a newer compiler, in case the bug has already been fixed, as 5.2 that you're using now is still quite old. The latest version at the time of writing this is 7.2.

Related

Make failed : make: *** [sub-corelib-install_subtargets-ordered] Error 2

I am using the Ubuntu 14.04 in virtual box and 64 bit OS
I try to cross compile Qt-everywhere 4.8.6 with a 'gcc-linaro-arm-linux-gnueabihf-4.7' cross compiler and get the following error while doing the 'make'
make[1]: Entering directory `/home/user/qt-everywhere-opensource-src-4.8.6
/src/corelib'
/usr/local/linaro/bin/arm-linux-gnueabihf-gcc (The path depends where the Toolchain has been installed) -c -pipe -O3 -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard -fvisibility=hidden -Wall -W -D_REENTRANT -fPIC -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -I../../mkspecs/qws/linux-arm-linaro-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-static-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-static-emb-arm -o .obj/release-static-emb-arm/adler32.o ../3rdparty/zlib/adler32.c
/bin/sh: 1: Syntax error: word unexpected (expecting ")")
make[1]: *** [.obj/release-static-emb-arm/adler32.o] Error 2
make[1]: Leaving directory `/home/user/qt-everywhere-opensource-src-4.8.6/src/corelib'
make: *** [sub-corelib-install_subtargets-ordered] Error 2
The .configure script has no problems
Can anyone help out, what causes this?
This text doesn't belong in your call to gcc:
(The path depends where the Toolchain has been installed)
Remove that to get rid of the error.

"fatal error: gnu/stubs-32.h: No such file or directory" but stubs-64.h is present

I'm running Linux as follows:
dbliss#nx4[objdir]> uname -a
Linux nx4.priv 2.6.32-573.3.1.el6.x86_64 #1 SMP Thu Aug 13 22:55:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
dbliss#nx4[objdir]> cat /etc/*release
CentOS release 6.7 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOS release 6.7 (Final)
CentOS release 6.7 (Final)
I just downloaded version 4.8.4 of gcc and attempted to configure and build it as follows:
dbliss#nx4[objdir]> ~/srcdir/configure --prefix=$HOME --with-gmp=$HOME
dbliss#nx4[objdir]> make
The last of these commands raised the following error:
make[5]: Entering directory `/home/despo/dbliss/objdir/x86_64-unknown-linux-gnu/32/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
DEFINES='' HEADERS='/home/despo/dbliss/srcdir/libgcc/config/i386/value-unwind.h' \
/home/despo/dbliss/srcdir/libgcc/mkheader.sh > tmp-libgcc_tm.h
/bin/sh /home/despo/dbliss/srcdir/libgcc/../move-if-change tmp-libgcc_tm.h libgcc_tm.h
echo timestamp > libgcc_tm.stamp
/home/despo/dbliss/objdir/./gcc/xgcc -B/home/despo/dbliss/objdir/./gcc/ -B/home/despo/dbliss/x86_64-unknown-linux-gnu/bin/ -B/home/despo/dbliss/x86_64-unknown-linux-gnu/lib/ -isystem /home/despo/dbliss/x86_64-unknown-linux-gnu/include -isystem /home/despo/dbliss/x86_64-unknown-linux-gnu/sys-include -g -O2 -m32 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fpic -mlong-double-80 -I. -I. -I../../.././gcc -I/home/despo/dbliss/srcdir/libgcc -I/home/despo/dbliss/srcdir/libgcc/. -I/home/despo/dbliss/srcdir/libgcc/../gcc -I/home/despo/dbliss/srcdir/libgcc/../include -I/home/despo/dbliss/srcdir/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c /home/despo/dbliss/srcdir/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/features.h:385:0,
from /usr/include/stdio.h:28,
from /home/despo/dbliss/srcdir/libgcc/../gcc/tsystem.h:87,
from /home/despo/dbliss/srcdir/libgcc/libgcc2.c:27:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
# include <gnu/stubs-32.h>
^
compilation terminated.
make[5]: *** [_muldi3.o] Error 1
make[5]: Leaving directory `/home/despo/dbliss/objdir/x86_64-unknown-linux-gnu/32/libgcc'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory `/home/despo/dbliss/objdir/x86_64-unknown-linux-gnu/libgcc'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory `/home/despo/dbliss/objdir/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/despo/dbliss/objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/despo/dbliss/objdir'
make: *** [all] Error 2
What I get from this is that make expects a file stubs-32.h in /usr/include/gnu/, but can't find it.
However, I do have a file stubs-64.h in this directory:
dbliss#nx4[objdir]> ls /usr/include/gnu
libc-version.h lib-names.h stubs-64.h stubs.h
My question is, should I be specifying somehow in my call to configure that I'm using a 64-bit system and, therefore, that stubs-64.h should be used? Or is stubs-32.h always required? If stubs-32.h is required, what is the best way for me to acquire and install it -- given that I am not an administrator of this computing system and would need to install it locally (and have make find it locally).
On Ubuntu
sudo apt install libc6-dev:i386
On a system like Centos 6, you can get the 32 bit libraries with this command: sudo yum -y install glibc-devel.i686 glibc-devel

Openni2 error when running make

I downloaded Openni2 from github and run $make following the instruction in README. I got this error:
g++ -MD -MP -MT "./../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.d ../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.o" -c -msse3 -Wall -O2 -DNDEBUG -I. -I../../../Include -I../../../ThirdParty/PSCommon/XnLib/Include -fPIC -fvisibility=hidden -o ../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.o org_openni_NativeMethods.cpp
g++ -o ../../../Bin/x86-Release/libOpenNI2.jni.so ./../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/OpenNI.jni.o ./../../../Bin/Intermediate/x86-Release/libOpenNI2.jni.so/org_openni_NativeMethods.o -L../../../Bin/x86-Release -lOpenNI2 -Wl,--no-undefined -shared
/usr/lib/i386-linux-gnu/libc_nonshared.a(stack_chk_fail_local.oS): In function `__stack_chk_fail_local':
(.text+0x10): undefined reference to `__stack_chk_fail'
collect2: error: ld returned 1 exit status
make[1]: *** [../../../Bin/x86-Release/libOpenNI2.jni.so] Error 1
make[1]: Leaving directory `/home/smalleyreaserch/OpenNI2/Wrappers/java/OpenNI.jni'
make: *** [Wrappers/java/OpenNI.jni] Error 2
I have all the required packages installed. Can anyone help me?
My system is Ubuntu 14.04 32 bits but the computer is 64 bits. would that be the reason why Im getting this error?
Some other people had this problem... but it was mainly in i686 computers... anyways, here is a possible solution.
First, make sure you have java and not openjava... I have read that this gives sometimes problems.
Secondly, use
export LDFLAGS+="-lc"
This should fix your problem, if not just leave a comment

Is it necessary to upgrade Glib in Cygwin?

I'm attempting to compile abiword in my Cygwin environment.
I have cygwin 1.7.25.
The compile fails regarding glib:
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -I/usr/include/fribidi -
I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libgsf-1 -I/usr/include/libxml2
-I/usr/include/wv -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/pixman-1 -
I/usr/include/libpng15 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/gtk-2.0 -
I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -
I/usr/include/gio-unix-2.0/ -I/usr/include/gtk-unix-print-2.0 -I/usr/include/librsvg-2.0 -Wall -
Wextra -Wsign-compare -Wpointer-arith -Wchar-subscripts -Wwrite-strings -Wmissing-noreturn -
Wunused -Wpointer-arith -Wshadow -g -O2 -MT go-cmd-context.lo -MD -MP -MF .deps/go-cmd-
context.Tpo -c goffice/app/go-cmd-context.c -DDLL_EXPORT -DPIC -o .libs/go-cmd-context.o
In file included from ./goffice/app/goffice-app.h:25:0,
from ./goffice/app/go-cmd-context.h:24,
from goffice/app/go-cmd-context-impl.h:4,
from goffice/app/go-cmd-context.c:10:
/usr/include/glib-2.0/glib/gmacros.h:35:2: error: #error "Only <glib.h> can be included directly."
goffice/app/go-cmd-context.c: In function ‘go_cmd_context_get_type’:
goffice/app/go-cmd-context.c:147:3: warning: missing initializer [-Wmissing-field-initializers]
goffice/app/go-cmd-context.c:147:3: warning: (near initialization for ‘go_cmd_context_info.class_init’) [-Wmissing-field-initializers]
Makefile:503: recipe for target `go-cmd-context.lo' failed
make[3]: *** [go-cmd-context.lo] Error 1
make[3]: Leaving directory `/home/kingram/src/abiword-2.8.6/goffice-bits'
Makefile:409: recipe for target `all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/kingram/src/abiword-2.8.6/goffice-bits'
Makefile:670: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kingram/src/abiword-2.8.6'
Makefile:473: recipe for target `all' failed
make: *** [all] Error 2
A google search produced a Redhat bug report suggesting that Glib 2.31 is required.
I'm considering downloading and compiling the latest glib from source as cygwin does not appear to be using it.
However, I'd like some insight on this choice or hear if there are some other experiences around this.
Actually, Glib 2.31 is the culprit; its headers changed so that only the top-level headers may be #included, not the individual class headers.
Cygwin does have the latest stable branch of Glib.
Therefore, in order to get this to compile, you would need to fix the #includes in the code, as indicated in the error messages.
However, I can save you the trouble: Abiword packages are available from Cygwin Ports.

Installing PThread on linux for tophat

Bowtie is a program which is needed for tophat. I need this program to map a few hundredmilion reads against a reference genome. Bowtie does the mapping part, this needs many CPU. In the manual of bowtie there is an option to do this multithreaded, but the library PThread needs to be installed.
I downloaded PThread from this website. Extracted this to my program folder, opened a shell and was standing in this directory. When entering the command 'make', I get this error and I don't know how to solve this.
if /bin/sh ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I. -Wall -g -O2 -MT PThreadRun.lo -MD -MP -MF ".deps/PThreadRun.Tpo" -c -o PThreadRun.lo PThreadRun.cpp; \
then mv -f ".deps/PThreadRun.Tpo" ".deps/PThreadRun.Plo"; else rm -f ".deps/PThreadRun.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I. -Wall -g -O2 -MT PThreadRun.lo -MD -MP -MF .deps/PThreadRun.Tpo -c PThreadRun.cpp -fPIC -DPIC -o .libs/PThreadRun.o
PThreadRun.cpp: In member function 'pthread_t PThreadRun::start()':
PThreadRun.cpp:28:38: error: 'redirectPthreadRun' was not declared in this scope
make: * [PThreadRun.lo] Error 1
make: Leaving directory `/install_dir'
make: * [all-recursive] Error 1
make: Leaving directory `/install_dir'
make: * [all] Error 2
Anyone knows how to solve this?
You need to run configure first. Per the installation instructions:
These are generic installation instructions.
The configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create aMakefile' in each directory of the package.
It may also create one or more .h' files containing system-dependent
definitions. Finally, it creates a shell scriptconfig.status' that
you can run in the future to recreate the current configuration, and a
file config.log' containing compiler output (useful mainly for
debuggingconfigure').
It can also use an optional file (typically called config.cache'
and enabled with--cache-file=config.cache' or simply `-C') that
saves the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how configure' could check whether to do them, and mail
diffs or instructions to the address given in theREADME' so they can
be considered for the next release. If you are using the cache, and
at some point `config.cache' contains results you don't want to keep,
you may remove or edit it.
The file configure.ac' (orconfigure.in') is used to create
configure' by a program calledautoconf'. You only need
configure.ac' if you want to change it or regenerateconfigure'
using a newer version of `autoconf'.
The simplest way to compile this package is:
cd' to the directory containing the package's source code and type
./configure' to configure the package for your system. If you're
using csh' on an old version of System V, you might need to type
sh ./configure' instead to prevent csh' from trying to execute
configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
Type `make' to compile the package.
Optionally, type `make check' to run any self-tests that come with
the package.
Type `make install' to install the programs and any data files and
documentation.
You can remove the program binaries and object files from the
source code directory by typing make clean'. To also remove the
files thatconfigure' created (so you can compile the package for
a different kind of computer), type make distclean'. There is
also amake maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.

Resources