Building DRAMpower - gcc

So i want to build the DRAMpower to simulate the DRAM power model . I have all the dependecies installed that are required such as gcc and libxerces-c-dev. i then run the following command
make -j4
g++ -O -W -pedantic-errors -Wextra -Werror -Wformat -Wformat-
nonliteral -Wpointer-arith -Wcast-align -Wconversion -Wall -Werror -g
-std=c++0x -MMD -MF src/TraceParser.d -iquote src -o src/TraceParser.o
-c src/TraceParser.cc
g++ -O -W -pedantic-errors -Wextra -Werror -Wformat -Wformat-
nonliteral -Wpointer-arith -Wcast-align -Wall -Werror -g -std=c++0x
-MMD -MF src/CmdScheduler.d -iquote src -o src/CmdScheduler.o -c
src/CmdScheduler.cc
g++ -O -W -pedantic-errors -Wextra -Werror -Wformat -Wformat-
nonliteral -Wpointer-arith -Wcast-align -Wconversion -Wall -Werror -g
-std=c++0x -MMD -MF src/cli/drampower.d -iquote src -o
src/cli/drampower.o -c src/cli/drampower.cc
g++ -O -W -pedantic-errors -Wextra -Werror -Wformat -Wformat-
nonliteral -Wpointer-arith -Wcast-align -Wconversion -Wall -Werror -g
-std=c++0x -MMD -MF src/libdrampower/LibDRAMPower.d -iquote src -o
src/libdrampower/LibDRAMPower.o -c src/libdrampower/LibDRAMPower.cc
In file included from src/CommandAnalysis.h:55:0,
from src/TraceParser.h:46,
from src/TraceParser.cc:37:
src/Utils.h:49:1: error: dynamic exception specifications are
deprecated in C++11 [-Werror=deprecated]
throw(std::runtime_error)
^~~~~
In file included from src/CommandAnalysis.h:55:0,
from src/libdrampower/LibDRAMPower.h:48,
from src/libdrampower/LibDRAMPower.cc:42:
src/Utils.h:49:1: error: dynamic exception specifications are
deprecated in C++11 [-Werror=deprecated]
throw(std::runtime_error)
^~~~~
In file included from src/CmdScheduler.h:47:0,
from src/CmdScheduler.cc:37:
src/Utils.h:49:1: error: dynamic exception specifications are
deprecated in C++11 [-Werror=deprecated]
throw(std::runtime_error)
^~~~~
In file included from src/CommandAnalysis.h:55:0,
from src/MemoryPowerModel.h:49,
from src/cli/drampower.cc:44:
src/Utils.h:49:1: error: dynamic exception specifications are
deprecated in C++11 [-Werror=deprecated]
throw(std::runtime_error)
^~~~~
cc1plus: all warnings being treated as errors
Makefile:106: recipe for target 'src/libdrampower/LibDRAMPower.o'
failed
make: *** [src/libdrampower/LibDRAMPower.o] Error 1
make: *** Waiting for unfinished jobs....
cc1plus: all warnings being treated as errors
Makefile:106: recipe for target 'src/cli/drampower.o' failed
make: *** [src/cli/drampower.o] Error 1
cc1plus: all warnings being treated as errors
Makefile:106: recipe for target 'src/TraceParser.o' failed
make: *** [src/TraceParser.o] Error 1
cc1plus: all warnings being treated as errors
Makefile:102: recipe for target 'src/CmdScheduler.o' failed
make: *** [src/CmdScheduler.o] Error 1
Can anyone tell me what does the specific error mean and how to i get around it ?

Related

Caffe-segnet: redefinition of argument 'compiler-bindir'

It's been days trying to compile caffe-segnet, and now stuck at this error, I m using gcc gcc (Ubuntu 4.8.5-4ubuntu8) 4.8.5
to compile caffe-segnet. I'm using Cuda 9.0, cudnn v2 and opencv 3.3.0 as mentionned in the documentation of caffe and opencv. Disabling cudnn or not in the Makefile.config doesn't change anything as mentioned here.
Before that I was using cuda 10.0 and cudnn 7.0 and deleted all because when starting my model there was so many errors. Here is the output error when using make all:
CXX src/caffe/common.cpp
/usr/bin/g++-4.8 src/caffe/common.cpp -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -std=c++11 -MMD -MP -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -c -o .build_release/src/caffe/common.o 2> .build_release/src/caffe/common.o.warnings.txt \
|| (cat .build_release/src/caffe/common.o.warnings.txt; exit 1)
CXX src/caffe/internal_thread.cpp
/usr/bin/g++-4.8 src/caffe/internal_thread.cpp -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -std=c++11 -MMD -MP -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -Wall -Wno-sign-compare -c -o .build_release/src/caffe/internal_thread.o 2> .build_release/src/caffe/internal_thread.o.warnings.txt \
|| (cat .build_release/src/caffe/internal_thread.o.warnings.txt; exit 1)
NVCC src/caffe/layers/upsample_layer.cu
/usr/local/cuda/bin/nvcc -D_FORCE_INLINES -ccbin=/usr/bin/g++-4.8 -Xcompiler -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -std=c++11 -ccbin=/usr/bin/g++-4.8 -Xcompiler -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -I/usr/local/hdf5 -I/usr/local/hdf5/include -I.build_release/src -I./src -I./include -I/usr/local/cuda/include -M src/caffe/layers/upsample_layer.cu -o .build_release/cuda/src/caffe/layers/upsample_layer.d \
-odir .build_release/cuda/src/caffe/layers
nvcc fatal : redefinition of argument 'compiler-bindir'
Makefile:544: recipe for target '.build_release/cuda/src/caffe/layers/upsample_layer.o' failed
make: *** [.build_release/cuda/src/caffe/layers/upsample_layer.o] Error 1
and the line 544 in Makefile which the error come from:
...
# cat $#.$(WARNS_EXT)
$(BUILD_DIR)/cuda/%.o: %.cu | $(ALL_BUILD_DIRS)
544> # echo NVCC $<
$(Q)$(CUDA_DIR)/bin/nvcc $(NVCCFLAGS) $(CUDA_ARCH) -M $< -o ${#:.o=.d} \
-odir $(#D)
...
Notice that I tried compiling it with gcc 5 and gcc 7 and the same error occur ! Any idea guys ?
EDIT 1:
I also added this CUSTOM_CXX := /usr/bin/g++-4.8 to Makefile.config
Since no one aswered I finaly found a solution, the error is caused because the same argument is called twice, in my Makefile I added those lines of code:
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) -std=c++11
LINKFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
to avoid this error /usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
In the same file in the complete build flags, we have the same flag:
...
# Complete build flags.
COMMON_FLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)
NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)
# mex may invoke an older gcc that is too liberal with -Wuninitalized
...
what I did is commenting my flag I added:
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
#NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) -std=c++11
LINKFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS) -std=c++11
and add -std=c++11 argument to NVCCFLAGS in the complete build flags section, it turned to be something like this:
...
# Complete build flags.
COMMON_FLAGS += $(foreach includedir,$(INCLUDE_DIRS),-I$(includedir))
CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)
NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS) -std=c++11
# mex may invoke an older gcc that is too liberal with -Wuninitalized
...
Before doing a make all after editing your Makefile, make sure you do a make clean or you'll get the same error !

Problems compiling Qt with OCI sql plugin on Linux

I am having serious trouble compiling Qt with the OCI plugin.
The Qt version is 5.6.1, and the Oracle instant client version is 12.1.0.2.0. I have installed both the basic and SDK versions, as the Qt online manual asks.
I then try to run the following command:
./configure -I /usr/include/oracle/12.1/client64/ -L /usr/lib/oracle/12.1/client64/lib -prefix /online/daq/antonin/qt_build -plugin-sql-oci -qt-xcb -v
Which produces this output:
+ cd qtbase
+ /online/daq/antonin/qt_source/5.6/Src/qtbase/configure -top-level -I /usr/include/oracle/12.1/client64/ -L /usr/lib/oracle/12.1/client64/lib -prefix /online/daq/antonin/qt_build -plugin-sql-oci -qt-xcb -v
Which edition of Qt do you want to use ?
Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.
o
This is the Qt Open Source Edition.
You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) versions 3.
Type '3' to view the GNU Lesser General Public License version 3.
Type 'L' to view the Lesser GNU General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.
Do you accept the terms of either license? yes
Running configuration tests (phase 1)...
Precompiled-headers support enabled.
g++ -c -fvisibility=hidden fvisibility.c
Symbol visibility control enabled.
cc1plus: error: unrecognized command line option "-fuse-ld=gold"
g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
Symbolic function binding enabled.
DEFAULT_INCDIRS="/usr/include/c++/4.4.7
/usr/include/c++/4.4.7/x86_64-redhat-linux
/usr/include/c++/4.4.7/backward
/usr/local/include
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include
/usr/include
"
DEFAULT_LIBDIRS="/lib64
/usr/lib64
/online/daq/lib
/usr/lib
/lib
/usr/lib/gcc/x86_64-redhat-linux/4.4.7
"
Done running configuration tests.
Creating qmake...
gmake: Nothing to be done for `first'.
Running configuration tests (phase 2)...
Found pkg-config from $PATH: /usr/bin/pkg-config
Determining architecture... ()
g++ -c -pipe -g -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../mkspecs/linux-g++ -o arch.o arch.cpp
g++ -o arch arch.o -L/usr/lib/oracle/12.1/client64/lib
Found architecture in binary
CFG_ARCH="x86_64"
CFG_CPUFEATURES=" mmx sse sse2"
System architecture: 'x86_64'
Host architecture: 'x86_64'
C++11 auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o c++11.o c++11.cpp
g++ -Wl,-O1 -o c++11 c++11.o -L/usr/lib/oracle/12.1/client64/lib
C++11 enabled.
C++14 auto-detection... ()
g++ -c -pipe -O2 -std=gnu++1y -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o c++14.o c++14.cpp
cc1plus: error: unrecognized command line option "-std=gnu++1y"
gmake: *** [c++14.o] Error 1
C++14 disabled.
default C++ standard edition auto-detection... ()
g++ -pipe -O2 -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o c++default.ii -E c++default.cpp
default C++ standard edition enabled.
64-bit std::atomic auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o atomic64.o atomic64.cpp
atomic64.cpp:34:18: error: atomic: No such file or directory
atomic64.cpp:37: error: expected unqualified-id before '<' token
atomic64.cpp:37: error: expected ')' before '<' token
atomic64.cpp:37: error: expected initializer before '<' token
gmake: *** [atomic64.o] Error 1
64-bit std::atomic disabled.
64-bit std::atomic in -latomic auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o atomic64.o atomic64.cpp
atomic64.cpp:34:18: error: atomic: No such file or directory
atomic64.cpp:37: error: expected unqualified-id before '<' token
atomic64.cpp:37: error: expected ')' before '<' token
atomic64.cpp:37: error: expected initializer before '<' token
gmake: *** [atomic64.o] Error 1
64-bit std::atomic in -latomic disabled.
sse2 auto-detection... ()
g++ -c -pipe -msse2 -g -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o sse2.o sse2.cpp
g++ -o sse2 sse2.o -L/usr/lib/oracle/12.1/client64/lib
sse2 enabled.
sse3 auto-detection... ()
g++ -c -pipe -msse3 -g -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o sse3.o sse3.cpp
g++ -o sse3 sse3.o -L/usr/lib/oracle/12.1/client64/lib
sse3 enabled.
ssse3 auto-detection... ()
g++ -c -pipe -mssse3 -g -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o ssse3.o ssse3.cpp
g++ -o ssse3 ssse3.o -L/usr/lib/oracle/12.1/client64/lib
ssse3 enabled.
sse4_1 auto-detection... ()
g++ -c -pipe -msse4.1 -g -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o sse4_1.o sse4_1.cpp
g++ -o sse4_1 sse4_1.o -L/usr/lib/oracle/12.1/client64/lib
sse4_1 enabled.
sse4_2 auto-detection... ()
g++ -c -pipe -msse4.2 -g -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o sse4_2.o sse4_2.cpp
g++ -o sse4_2 sse4_2.o -L/usr/lib/oracle/12.1/client64/lib
sse4_2 enabled.
avx auto-detection... ()
g++ -c -pipe -mavx -g -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o avx.o avx.cpp
g++ -o avx avx.o -L/usr/lib/oracle/12.1/client64/lib
avx enabled.
avx2 auto-detection... ()
g++ -c -pipe -mavx2 -g -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o avx2.o avx2.cpp
cc1plus: error: unrecognized command line option "-mavx2"
gmake: *** [avx2.o] Error 1
avx2 disabled.
ipc_sysv auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o ipc.o ipc.cpp
g++ -Wl,-O1 -o ipc_sysv ipc.o -L/usr/lib/oracle/12.1/client64/lib
ipc_sysv enabled.
zlib auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o zlib.o zlib.cpp
g++ -Wl,-O1 -o zlib zlib.o -L/usr/lib/oracle/12.1/client64/lib -lz
zlib enabled.
mtdev auto-detection... ()
Project ERROR: mtdev development package not found
mtdev disabled.
libjpeg auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o libjpeg.o libjpeg.cpp
libjpeg.cpp: In function 'int main(int, char**)':
libjpeg.cpp:43: warning: 'cinfo' is used uninitialized in this function
g++ -Wl,-O1 -o libjpeg libjpeg.o -L/usr/lib/oracle/12.1/client64/lib -ljpeg
libjpeg enabled.
libpng auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o libpng.o libpng.cpp
g++ -Wl,-O1 -o libpng libpng.o -L/usr/lib/oracle/12.1/client64/lib -lpng
libpng enabled.
libdl auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o libdl.o libdl.cpp
g++ -Wl,-O1 -o libdl libdl.o -L/usr/lib/oracle/12.1/client64/lib -ldl
libdl enabled.
DB2 auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o db2.o db2.cpp
db2.cpp:34:20: error: sqlcli.h: No such file or directory
db2.cpp:35:21: error: sqlcli1.h: No such file or directory
gmake: *** [db2.o] Error 1
DB2 disabled.
InterBase auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o ibase.o ibase.cpp
ibase.cpp:34:19: error: ibase.h: No such file or directory
gmake: *** [ibase.o] Error 1
InterBase disabled.
MySQL (thread-safe) auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -isystem /usr/include/mysql -I../../../mkspecs/linux-g++ -o mysql.o ../mysql/mysql.cpp
g++ -Wl,-O1 -o mysql_r mysql.o -L/usr/lib/oracle/12.1/client64/lib -L/usr/lib64/mysql -lz -lcrypt -lnsl -lm -lpthread -lssl -lcrypto -lmysqlclient_r
MySQL (thread-safe) enabled.
OCI auto-detection... ()
g++ -c -pipe -O2 -std=gnu++0x -Wall -W -fPIC -I. -isystem /usr/include/oracle/12.1/client64 -I../../../mkspecs/linux-g++ -o oci.o oci.cpp
g++ -Wl,-O1 -o oci oci.o -L/usr/lib/oracle/12.1/client64/lib -lclntsh
/usr/lib/oracle/12.1/client64/lib/libclntsh.so: undefined reference to `lxXmlCvEsc0'
/usr/lib/oracle/12.1/client64/lib/libclntsh.so: undefined reference to `lxXmlGEntEscImpl'
/usr/lib/oracle/12.1/client64/lib/libclntsh.so: undefined reference to `slnxmul'
/usr/lib/oracle/12.1/client64/lib/libclntsh.so: undefined reference to `zt_init'
/usr/lib/oracle/12.1/client64/lib/libclntsh.so: undefined reference to `slnxadd'
/usr/lib/oracle/12.1/client64/lib/libclntsh.so: undefined reference to `slnxsub'
collect2: ld returned 1 exit status
gmake: *** [oci] Error 1
OCI disabled.
Oracle (OCI) support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to /online/daq/antonin/qt_source/5.6/Src/qtbase/configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to /online/daq/antonin/qt_source/5.6/Src/qtbase/configure to continue.
As you can see, there are several undefined references for one of the the OCI .so files. I have tried checking online, but I have found barely any references to these symbols.
Any idea what could be causing this? A missing .so file? Wrong version of the library?

gcc 4.9.2 build error on RHEL6

I'm trying to build gcc 4.9.2 on RHEL6, as follows:
unpack the source tarball (to ~/gcc-4.9.2)
in the source dir:
./contrib/download_prerequisites
create a separate build directory ~/gcc-4.9.2-build
in the build dir:
~/gcc-4.9.2/configure --prefix=/usr/local/gcc-4.9.2
make
This fails with:
make[6]: Entering directory `/root/gcc-4.9.2-build-try0/x86_64-unknown-linux-gnu/libjava/classpath/native/jni/java-math'
/bin/sh ../../../libtool --tag=CC --mode=compile /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/root/gcc-4.9.2/libjava/classpath/native/jni/java-math -I../../../include -I/root/gcc-4.9.2/libjava/classpath/include -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I/root/gcc-4.9.2/libjava/classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/include -g -O2 -MT gnu_java_math_GMP.lo -MD -MP -MF .deps/gnu_java_math_GMP.Tpo -c -o gnu_java_math_GMP.lo /root/gcc-4.9.2/libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c
libtool: compile: /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/root/gcc-4.9.2/libjava/classpath/native/jni/java-math -I../../../include -I/root/gcc-4.9.2/libjava/classpath/include -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I/root/gcc-4.9.2/libjava/classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/include -g -O2 -MT gnu_java_math_GMP.lo -MD -MP -MF .deps/gnu_java_math_GMP.Tpo -c /root/gcc-4.9.2/libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c -fPIC -DPIC -o .libs/gnu_java_math_GMP.o
mv -f .deps/gnu_java_math_GMP.Tpo .deps/gnu_java_math_GMP.Plo
/bin/sh ../../../libtool --tag=CC --mode=link /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -I/usr/include -g -O2 -module -version-info 0:0:0 -no-undefined -lgmp -avoid-version -o libjavamath.la -rpath /usr/local/gcc-4.9.2/lib/../lib64/gcj-4.9.2-15 gnu_java_math_GMP.lo ../../../native/jni/classpath/jcl.lo -lrt
libtool: link: /root/gcc-4.9.2-build-try0/./gcc/xgcc -B/root/gcc-4.9.2-build-try0/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -shared .libs/gnu_java_math_GMP.o ../../../native/jni/classpath/.libs/jcl.o /root/gcc-4.9.2-build-try0/./gmp/.libs/libgmp.a -lrt -Wl,-soname -Wl,libjavamath.so -o .libs/libjavamath.so
/usr/bin/ld: /root/gcc-4.9.2-build-try0/./gmp/.libs/libgmp.a(mp_set_fns.o): relocation R_X86_64_32 against `__gmp_default_allocate' can not be used when making a shared object; recompile with -fPIC
/root/gcc-4.9.2-build-try0/./gmp/.libs/libgmp.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[6]: *** [libjavamath.la] Error 1
make[6]: Leaving directory `/root/gcc-4.9.2-build-try0/x86_64-unknown-linux-gnu/libjava/classpath/native/jni/java-math'
A little googling pointed me at the --disable-shared option, which sort of helped, but now:
in the build dir:
~/gcc-4.9.2/configure --prefix=/usr/local/gcc-4.9.2 --disable-shared
make
yielded a slightly different error:
make[8]: Entering directory `/root/gcc-4.9.2-build/x86_64-unknown-linux-gnu/32/libjava/classpath/native/jni/classpath'
/bin/sh ../../../libtool --tag=CC --mode=compile /root/gcc-4.9.2-build/./gcc/xgcc -B/root/gcc-4.9.2-build/./gcc/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/lib/ -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/include -isystem /usr/local/gcc-4.9.2/x86_64-unknown-linux-gnu/sys-include -m32 -DHAVE_CONFIG_H -I. -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I../../../include -I/root/gcc-4.9.2/libjava/classpath/include -I/root/gcc-4.9.2/libjava/classpath/native/jni/classpath -I/root/gcc-4.9.2/libjava/classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -fexceptions -fasynchronous-unwind-tables -g -O2 -m32 -MT jcl.lo -MD -MP -MF .deps/jcl.Tpo -c -o jcl.lo /root/gcc-4.9.2/libjava/classpath/native/jni/classpath/jcl.c
libtool: compile: not configured to build any kind of library
libtool: compile: See the libtool documentation for more information.
libtool: compile: Fatal configuration error.
make[8]: *** [jcl.lo] Error 1
make[8]: Leaving directory `/root/gcc-4.9.2-build/x86_64-unknown-linux-gnu/32/libjava/classpath/native/jni/classpath'
Adding the --enable-static option made no difference.
Any suggestions on what might be wrong?
BTW, gcc 4.9.1 gave the same errors.
System: Linux 2.6.32-431.29.2.el6.x86_64 #1 SMP Sun Jul 27 15:55:46 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
System is RHEL6, fully updated via Redhat, and has no custom RPMs that I know of.
Just completed building 4.9.2 on a CentOS 6.4 VM using 4.4.7 gcc. Ran into an out of space issue, which caused the build to fail, but once resolved, everything else went smoothly.
Looks like your build is failing in the Java side of town? Not sure if you need the Java support, so have you tried compiling just the c/c++ language support?
~/gcc-4.9.2/configure --enable-languages=c,c++ ...
I also don't require 32-bit binaries, so I add --disable-multilib to the list of configure parameters.

Compiling HDF5 API Using Cygwin

I have been trying to install the HDF5 API in Windows using MinGW and Cygwin. I have given up on MinGW (after failing to compile HDF5-1.8.11 on it) because I need to use HDF5 on Fortran.
Using Cygwin with HDF5-1.8.11 produces errors when running the configure (bash) script and therefore it does not even start to compile. I read on this link that the HDF5-1.8 compiles on Cygwin including the Fortran module. I downloaded an older version (HDF5-1.8.0) and the configure works fine, but the compile (2nd make) gives the following error:
Making all in src
make[1]: Entering directory `/cygdrive/c/hdf5-1.8.0/src'
make all-am
make[2]: Entering directory `/cygdrive/c/hdf5-1.8.0/src'
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/cygdrive/c/cygwin/usr/include -DNDEBUG -UH5_DEBUG_API -ansi -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -O3 -fomit-frame-pointer -finline-functions -MT H5Omtime.lo -MD -MP -MF .deps/H5Omtime.Tpo -c -o H5Omtime.lo H5Omtime.c
gcc -DHAVE_CONFIG_H -I. -I/cygdrive/c/cygwin/usr/include -DNDEBUG -UH5_DEBUG_API -ansi -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -O3 -fomit-frame-pointer -finline-functions -MT H5Omtime.lo -MD -MP -MF .deps/H5Omtime.Tpo -c H5Omtime.c -o H5Omtime.o
In file included from H5private.h:29:0,
from H5Omtime.c:24:
H5public.h:154:18: warning: ISO C90 does not support ‘long long’ [-Wlong-long]
H5public.h:155:16: warning: ISO C90 does not support ‘long long’ [-Wlong-long]
H5Omtime.c: In function ‘H5O_mtime_decode’:
H5Omtime.c:194:9: warning: implicit declaration of function ‘tzset’ [-Wimplicit-function-declaration]
H5Omtime.c:194:9: warning: nested extern declaration of ‘tzset’ [-Wnested-externs]
H5Omtime.c:230:17: error: ‘timezone’ undeclared (first use in this function)
H5Omtime.c:230:17: note: each undeclared identifier is reported only once for each function it appears in
Makefile:813: recipe for target `H5Omtime.lo' failed
make[2]: *** [H5Omtime.lo] Error 1
make[2]: Leaving directory `/cygdrive/c/hdf5-1.8.0/src'
Makefile:488: recipe for target `all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory `/cygdrive/c/hdf5-1.8.0/src'
Makefile:410: recipe for target `all-recursive' failed
make: *** [all-recursive] Error 1
I would appreciate any help on this! Thanks!
I was able to reproduce this error. It seems that the configure script sets a number of #define flags which indicate the presence of the timezone global variable, which in reality is not present within the cygwin environment and is thus reported missing in the error message. By removing the #define H5_HAVE_TIMEZONE from the header file H5pubconf.h I was able to get rid of this error.
Unfortunately, then still another error occurs during the make process, which can also be avoided by removing the #define H5_HAVE_GETPWUID from the same header file H5pubconf.h.
Although this does not explain what really went wrong during configure, with these two modifications I am able to successfully compile the library.

GNU scientific library linking

My GNU scientific library (http://www.gnu.org/software/gsl/) installed in the path: /home/myname/gsl-1.6
My mlRho 1.7-stat prog (http://guanine.evolbio.mpg.de/mlRho/mlRho_1.7.tgz) which uses GNU scientific library-installed in:/home/myname/MlRho_1.7
my operating system: Fedora 16
original make file in mlRho
cd /home/myname/MlRho_1.7/
vim make
CC=gcc
CFLAGS= -O3 -Wall -Wshadow -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVER32 \
-I/opt/local/include/ -L/opt/local/lib/
I have changed path in mlRho
CC=gcc
CFLAGS= -O3 -Wall -Wshadow -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVER32 \
-I/home/myname/gsl-1.6 -L/home/myname/gsl-1.6
after making changes, I tried running make, it gives error
make
gcc -O3 -Wall -Wshadow -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVER32 -I/home/myname/gsl-1.6/include/ -L/home/myname/gsl-1.6/lib/ -c -o mlRho.o mlRho.c
In file included from mlRho.c:16:0:
mlComp.h:7:30: fatal error: gsl/gsl_sf_gamma.h: No such file or directory
compilation terminated.
make: *** [mlRho.o] Error 1
when i do make test- it gives me error below
make test
make[1]: Entering directory `/home/myname/MlRho_1.7/TestMlPi'
gcc -O3 -Wall -Wshadow -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVER32 -I/opt/local/include/ -L/opt/local/lib/ -c -o testMlPi.o testMlPi.c
testMlPi.c: In function ‘main’:
testMlPi.c:62:67: warning: variable ‘sderr’ set but not used [-Wunused-but-set-variable]
testMlPi.c:62:60: warning: variable ‘sdhet’ set but not used [-Wunused-but-set-variable]
gcc -O3 -Wall -Wshadow -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVER32 -I/opt/local/include/ -L/opt/local/lib/ -c -o interface.o interface.c
gcc -O3 -Wall -Wshadow -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVER32 -I/opt/local/include/ -L/opt/local/lib/ -c -o eprintf.o eprintf.c
gcc -O3 -Wall -Wshadow -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVER32 -I/opt/local/include/ -L/opt/local/lib/ -c -o ranNum.o ranNum.c
gcc -O3 -Wall -Wshadow -pedantic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DVER32 -I/opt/local/include/ -L/opt/local/lib/ -o testMlPi testMlPi.o interface.o eprintf.o ranNum.o -lm
make[1]: Leaving directory `/home/myname/MlRho_1.7/TestMlPi'
Output from testMlPi:
pi: 5.00e-05 epsilon: 4.90e-04 -log(L): 1.40e+05
Output from mlRho:
make: ./mlRho: Command not found
make: *** [testPi] Error 127
Output from mlRho:
make: ./mlRho: Command not found
make: *** [testPi] Error 127
It somehow GNU library not linking to mlRho programme. How to fix it?

Resources