I am trying to compile G-Wrap from http://www.nongnu.org/g-wrap/download.html.
When I go through the usual steps (configure, make, make install) however, I get some errors in the make step:
Step 1: ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for ranlib... ranlib
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver #FILE support... #
checking for strip... strip
checking for ranlib... (cached) ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking size of long... 8
checking whether byte ordering is bigendian... no
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for long long int... yes
checking for unsigned long long int... yes
checking for stdint.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking for EOVERFLOW... yes
checking for vasnprintf... no
checking for long double... yes
checking for wchar_t... yes
checking for wint_t... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for intmax_t... yes
checking for inline... inline
checking for alloca as a compiler built-in... yes
checking for stdint.h... (cached) yes
checking for SIZE_MAX... yes
checking absolute name of <stdint.h>... ///usr/lib/gcc/x86_64-linux-gnu/7/include/stdint.h
checking whether stdint.h conforms to C99... yes
checking absolute name of <stdio.h>... ///usr/include/stdio.h
checking for ptrdiff_t... yes
checking for snprintf... yes
checking for wcslen... yes
checking for vasprintf... yes
checking whether <wchar.h> is standalone... yes
checking for stdint.h... (cached) yes
checking for alloca as a compiler built-in... (cached) yes
checking for vasprintf... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBFFI... yes
checking size of size_t... 8
checking size of ssize_t... 8
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: checking for guile 2.2
configure: found guile 2.2
checking for guile... /usr/local/bin/guile
checking for Guile version >= 2.2... 2.2.3
checking for guild... /usr/local/bin/guild
checking for guile-config... /usr/local/bin/guile-config
checking for ld used by gcc... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking for GUILE... yes
checking for guile-2.2... no
configure: Using /usr/local/bin/guile
checking for GLIB... yes
configure: building GLib 2.0 support
checking whether gcc accepts -std=gnu99... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating g-wrap/Makefile
config.status: creating test/Makefile
config.status: creating guile/Makefile
config.status: creating guile/g-wrap-2.0-guile.pc
config.status: creating guile/g-wrap/Makefile
config.status: creating guile/g-wrap/gw/Makefile
config.status: creating guile/test/Makefile
config.status: creating guile/run-guile
config.status: creating guile/examples/Makefile
config.status: creating scheme48/Makefile
config.status: creating scheme48/g-wrap/Makefile
config.status: creating scheme48/g-wrap/gw/Makefile
config.status: creating scheme48/test/Makefile
config.status: creating doc/Makefile
config.status: creating g-wrap-config
config.status: creating config.h
config.status: config.h is unchanged
config.status: creating g-wrap/ffi-support.h
config.status: g-wrap/ffi-support.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing run-guile-exec commands
Step 2: make
make all-recursive
make[1]: Entering directory '/home/user/development/GuileScheme/g-wrap-1.9.15'
Making all in lib
make[2]: Entering directory '/home/user/development/GuileScheme/g-wrap-1.9.15/lib'
make all-am
make[3]: Entering directory '/home/user/development/GuileScheme/g-wrap-1.9.15/lib'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/user/development/GuileScheme/g-wrap-1.9.15/lib'
make[2]: Leaving directory '/home/user/development/GuileScheme/g-wrap-1.9.15/lib'
Making all in g-wrap
make[2]: Entering directory '/home/user/development/GuileScheme/g-wrap-1.9.15/g-wrap'
make all-am
make[3]: Entering directory '/home/user/development/GuileScheme/g-wrap-1.9.15/g-wrap'
make[3]: Leaving directory '/home/user/development/GuileScheme/g-wrap-1.9.15/g-wrap'
make[2]: Leaving directory '/home/user/development/GuileScheme/g-wrap-1.9.15/g-wrap'
Making all in test
make[2]: Entering directory '/home/user/development/GuileScheme/g-wrap-1.9.15/test'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/user/development/GuileScheme/g-wrap-1.9.15/test'
Making all in guile
make[2]: Entering directory '/home/user/development/GuileScheme/g-wrap-1.9.15/guile'
Making all in g-wrap
make[3]: Entering directory '/home/user/development/GuileScheme/g-wrap-1.9.15/guile/g-wrap'
Making all in .
make[4]: Entering directory '/home/user/development/GuileScheme/g-wrap-1.9.15/guile/g-wrap'
CC guile-runtime.lo
guile-runtime.c: In function 'gw_guile_add_subr_method':
guile-runtime.c:182:9: error: 'scm_class_top' is deprecated [-Werror=deprecated-declarations]
specializers = scm_cons (scm_class_top, specializers);
^~~~~~~~~~~~
In file included from /usr/local/include/guile/2.2/libguile.h:128:0,
from ../../guile/g-wrap/guile-compatibility.h:25,
from guile-runtime.c:32:
/usr/local/include/guile/2.2/libguile/deprecated.h:168:20: note: declared here
SCM_DEPRECATED SCM scm_class_top;
^~~~~~~~~~~~~
guile-runtime.c:189:5: error: 'scm_class_top' is deprecated [-Werror=deprecated-declarations]
specializers = scm_append_x (scm_list_2 (specializers, scm_class_top));
^~~~~~~~~~~~
In file included from /usr/local/include/guile/2.2/libguile.h:128:0,
from ../../guile/g-wrap/guile-compatibility.h:25,
from guile-runtime.c:32:
/usr/local/include/guile/2.2/libguile/deprecated.h:168:20: note: declared here
SCM_DEPRECATED SCM scm_class_top;
^~~~~~~~~~~~~
guile-runtime.c:225:23: error: 'scm_class_method' is deprecated [-Werror=deprecated-declarations]
scm_list_5 (scm_class_method,
^~~~~~~~~~
In file included from /usr/local/include/guile/2.2/libguile.h:128:0,
from ../../guile/g-wrap/guile-compatibility.h:25,
from guile-runtime.c:32:
/usr/local/include/guile/2.2/libguile/deprecated.h:180:20: note: declared here
SCM_DEPRECATED SCM scm_class_method;
^~~~~~~~~~~~~~~~
guile-runtime.c: In function 'allocate_generic_variable':
guile-runtime.c:355:28: error: 'scm_class_generic' is deprecated [-Werror=deprecated-declarations]
scm_list_3 (scm_class_generic, k_name, sym));
^~~~~~~~~~
In file included from /usr/local/include/guile/2.2/libguile.h:128:0,
from ../../guile/g-wrap/guile-compatibility.h:25,
from guile-runtime.c:32:
/usr/local/include/guile/2.2/libguile/deprecated.h:174:20: note: declared here
SCM_DEPRECATED SCM scm_class_generic;
^~~~~~~~~~~~~~~~~
guile-runtime.c:357:3: error: 'scm_class_generic' is deprecated [-Werror=deprecated-declarations]
} else if (scm_is_true (scm_call_2 (is_a_p_proc, scm_variable_ref (var),
^
In file included from /usr/local/include/guile/2.2/libguile.h:128:0,
from ../../guile/g-wrap/guile-compatibility.h:25,
from guile-runtime.c:32:
/usr/local/include/guile/2.2/libguile/deprecated.h:174:20: note: declared here
SCM_DEPRECATED SCM scm_class_generic;
^~~~~~~~~~~~~~~~~
guile-runtime.c:357:3: error: 'scm_class_generic' is deprecated [-Werror=deprecated-declarations]
} else if (scm_is_true (scm_call_2 (is_a_p_proc, scm_variable_ref (var),
^
In file included from /usr/local/include/guile/2.2/libguile.h:128:0,
from ../../guile/g-wrap/guile-compatibility.h:25,
from guile-runtime.c:32:
/usr/local/include/guile/2.2/libguile/deprecated.h:174:20: note: declared here
SCM_DEPRECATED SCM scm_class_generic;
^~~~~~~~~~~~~~~~~
guile-runtime.c:367:28: error: 'scm_class_generic' is deprecated [-Werror=deprecated-declarations]
scm_list_5 (scm_class_generic,
^~~~~~~~~~
In file included from /usr/local/include/guile/2.2/libguile.h:128:0,
from ../../guile/g-wrap/guile-compatibility.h:25,
from guile-runtime.c:32:
/usr/local/include/guile/2.2/libguile/deprecated.h:174:20: note: declared here
SCM_DEPRECATED SCM scm_class_generic;
^~~~~~~~~~~~~~~~~
guile-runtime.c: In function 'gw_guile_handle_wrapper_error':
guile-runtime.c:759:7: error: 'scm_memory_error' is deprecated [-Werror=deprecated-declarations]
scm_memory_error(func_name);
^~~~~~~~~~~~~~~~
In file included from /usr/local/include/guile/2.2/libguile.h:128:0,
from ../../guile/g-wrap/guile-compatibility.h:25,
from guile-runtime.c:32:
/usr/local/include/guile/2.2/libguile/deprecated.h:148:21: note: declared here
SCM_DEPRECATED void scm_memory_error (const char *subr) SCM_NORETURN;
^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:592: recipe for target 'guile-runtime.lo' failed
make[4]: *** [guile-runtime.lo] Error 1
make[4]: Leaving directory '/home/user/development/GuileScheme/g-wrap-1.9.15/guile/g-wrap'
Makefile:656: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/user/development/GuileScheme/g-wrap-1.9.15/guile/g-wrap'
Makefile:518: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/user/development/GuileScheme/g-wrap-1.9.15/guile'
Makefile:673: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/user/development/GuileScheme/g-wrap-1.9.15'
Makefile:479: recipe for target 'all' failed
make: *** [all] Error 2
It says: cc1: all warnings being treated as errors. That makes warnings about deprecations pop up as errors, which then cancel the compilation process.
How can I fix the use of deprecated code or alternatively: Can I somehow savely ignore these and continue compiling despite usage of deprecated code?
System Info
Ubuntu 17.04
G-Wrap version: 1.9.15
GCC version: gcc (Ubuntu 7.2.0-8ubuntu3.2) 7.2.0
Guile version: 2.2.3
I am trying to compile G-Wrap .... g-wrap-1.9.15.tar.gz
"g-wrap-1.9.15" : sudo apt install g-wrap
If you really want to build it, install the default guile-2.0.13: sudo apt install guile-2.0-dev ... I.e. g-wrap is too old (2016) to use guile-2.2 .
cd g-wrap-1.9.15/
./configure
make // no errors
Related
I'm having trouble cross-compiling systemtap under ubuntu 18.04
Here are the compile-time errors
➜ systemtap-master ./configure --prefix=$PWD/_install --host=aarch64-linux-gnu --with-elfutils=/home/zhongyi/tools/elfutils-0.188 CXXFLAGS=-static CFLAGS=-static LIBS=-lz CPPFLAGS=-I/home/zhongyi/tools/elfutils-0.188/_install/include LDFLAGS="-L/home/zhongyi/tools/zlib-1.2.13/_install/lib -L/home/zhongyi/tools/elfutils-0.188/_install/lib"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for aarch64-linux-gnu-strip... aarch64-linux-gnu-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for aarch64-linux-gnu-gcc... aarch64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether aarch64-linux-gnu-gcc accepts -g... yes
checking for aarch64-linux-gnu-gcc option to accept ISO C89... none needed
checking whether aarch64-linux-gnu-gcc understands -c and -o together... yes
checking dependency style of aarch64-linux-gnu-gcc... gcc3
checking how to run the C preprocessor... aarch64-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether ln -s works... yes
checking for aarch64-linux-gnu-gcc... (cached) aarch64-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether aarch64-linux-gnu-gcc accepts -g... (cached) yes
checking for aarch64-linux-gnu-gcc option to accept ISO C89... (cached) none needed
checking whether aarch64-linux-gnu-gcc understands -c and -o together... (cached) yes
checking dependency style of aarch64-linux-gnu-gcc... (cached) gcc3
checking for aarch64-linux-gnu-g++... no
checking for aarch64-linux-gnu-c++... no
checking for aarch64-linux-gnu-gpp... no
checking for aarch64-linux-gnu-aCC... no
checking for aarch64-linux-gnu-CC... no
checking for aarch64-linux-gnu-cxx... no
checking for aarch64-linux-gnu-cc++... no
checking for aarch64-linux-gnu-cl.exe... no
checking for aarch64-linux-gnu-FCC... no
checking for aarch64-linux-gnu-KCC... no
checking for aarch64-linux-gnu-RCC... no
checking for aarch64-linux-gnu-xlC_r... no
checking for aarch64-linux-gnu-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... aarch64-linux-gnu-gcc -E
checking for aarch64-linux-gnu-ar... aarch64-linux-gnu-ar
checking the archiver (aarch64-linux-gnu-ar) interface... ar
checking for aarch64-linux-gnu-ranlib... aarch64-linux-gnu-ranlib
checking whether make sets $(MAKE)... (cached) yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for ppoll... yes
checking for openat... yes
checking for a sed that does not truncate output... /bin/sed
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld used by aarch64-linux-gnu-gcc... /usr/aarch64-linux-gnu/bin/ld
checking if the linker (/usr/aarch64-linux-gnu/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for python... /usr/bin/python
checking whether /usr/bin/python is version 2 or 3... 2
checking for a Python interpreter with version >= 2.6... python2
checking for python2... /usr/bin/python2
checking for python2 version... 2.7
checking for python2 platform... linux2
checking for python2 script directory... ${prefix}/lib/python2.7/site-packages
checking for python2 extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for python3... /usr/bin/python3
checking for python3 version... 3.6
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.6/site-packages
checking for python3 extension module directory... ${exec_prefix}/lib/python3.6/site-packages
checking to see if prologue searching should be the default... no
checking to see if sdt probes should be the default... yes
checking whether g++ supports C++11 features by default... yes
configure: Compiling with gcc -fstack-protector-all et al.
configure: Compiling with gcc pie et al.
checking whether to use debuginfod... auto
checking for aarch64-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for debuginfod... no
configure: WARNING: libdebuginfod is missing or unusable; some features may be unavailable.
checking for sqlite3... no
checking for latex... no
checking for dvips... no
checking for ps2pdf... yes
configure: will only install prebuilt documentation
checking for xmlto... no
checking for fop... no
checking for nss... no
checking for openssl... yes
configure: using dracut module directory /usr/lib/dracut/modules.d/99stap
configure: using dracut binary /sbin
configure: WARNING: will not build systemtap compile server, cannot find nss headers
configure: WARNING: compile-server client functionality will be disabled, cannot find nss development files
checking for avahi... no
configure: WARNING: some compile-server functionality will be restricted, cannot find avahi development files
checking for rpmtsInitIterator in -lrpm... no
checking for rpmdbNextIterator in -lrpmdb... no
checking for rpmFreeCrypto in -lrpmio... no
checking how to link readline libs... none
checking for ebl_strtabinit in -lebl... no
checking for dwfl_module_getsym in -ldw... no
configure: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)
➜ systemtap-master make && make install
/bin/bash ./git_version.sh -k -s . -o git_version.h
git_version.sh: Output is new file, creating git_version.h
make all-recursive
make[1]: Entering directory '/home/zhongyi/tools/systemtap-master'
Making all in .
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master'
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master'
Making all in java
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/java'
make all-am
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master/java'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master/java'
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/java'
Making all in python
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/python'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/python'
Making all in stapdyn
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/stapdyn'
make -C .. git_version.stamp
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master'
/bin/bash ./git_version.sh -k -s . -o git_version.h
git_version.sh: Not a git repo, keeping existing git_version.h
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master'
make all-am
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master/stapdyn'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master/stapdyn'
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/stapdyn'
Making all in staprun
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/staprun'
make -C .. git_version.stamp
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master'
/bin/bash ./git_version.sh -k -s . -o git_version.h
git_version.sh: Not a git repo, keeping existing git_version.h
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master'
make all-am
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master/staprun'
CC staprun-staprun.o
CC staprun-staprun_funcs.o
CC staprun-ctl.o
CC staprun-common.o
CXX ../staprun-privilege.o
CXX ../staprun-util.o
CC libstrfloctime_a-strfloctime.o
AR libstrfloctime.a
aarch64-linux-gnu-ar: `u' modifier ignored since `D' is the default (see `U')
CXXLD staprun
/usr/bin/ld: libstrfloctime.a(libstrfloctime_a-strfloctime.o): Relocations in generic ELF (EM: 183)
libstrfloctime.a(libstrfloctime_a-strfloctime.o): error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:677: recipe for target 'staprun' failed
make[3]: *** [staprun] Error 1
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master/staprun'
Makefile:528: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/staprun'
Makefile:2105: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/zhongyi/tools/systemtap-master'
Makefile:789: recipe for target 'all' failed
make: *** [all] Error 2
I specified the option --host=aarch64-linux-gnu at compiling. Why is there still an error?
Cross-compilation toolchain has been installed on ubuntu. Zlib and elfutils can be cross-compiled normally.
I can't find the detailed tutorial of cross-compilation on the official website of systemtap.
I am trying to install TooN, libCVD and Gvars3 for PTAM . This link shows the recommended installation steps. I started with installing
freeglut3-dev,
liblapacke-dev,
liblapack3,
libopenblas-base,
libopenblas-dev
using sudo apt-get install.
Then I installed TooN:
git clone git#github.com:edrosten/TooN.git
cd TooN/
./configure && make && sudo make install
Then I tested the TooN installation with make test and it passed all of the tests.
slice Passed
vector_resize Passed
gauss_jordan Passed
chol_toon Passed
fill Passed
so3 Passed
complex Passed
gr_svd Passed
diagonal_matrix Passed
gaussian_elimination Passed
zeros Passed
swap Passed
initializer_list Passed
initializer_list_fail_1 Passed
initializer_list_fail_2 Passed
sim3 Passed
eigen-sqrt Passed
chol_lapack Passed
sym_eigen Passed
qr Passed
lu Passed
determinant Passed
Then I tried to install libCVD.
cd ..
git clone git#github.com:edrosten/libcvd.git
cd libcvd/
./configure
The output of ./configure is as follows:
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for gawk... no
checking for mawk... mawk
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ supports C++14 features by default... no
checking whether g++ supports C++14 features with -std=gnu++14... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ranlib... ranlib
checking how to run the C++ preprocessor... g++ -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking if compiler flag -Wall works... yes
checking if compiler flag -Wextra works... yes
checking if compiler flag -pipe works... yes
checking for main in -lpthread... yes
checking if compiler flag -ggdb works... yes
checking if compiler flag -fPIC works... yes
------------------------------------
Checking processor specific features
------------------------------------
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for MMX support... yes
checking for MMXEXT support... yes
checking for SSE support... yes
checking for SSE2 support... yes
checking for SSE3 support... yes
checking size of void*... 8
checking for inline asm statement... yes
checking assembler supports .type pseudo-op... yes
-----------------------------------------------
Checking for operating system specific features
-----------------------------------------------
checking dc1394/dc1394.h usability... yes
checking dc1394/dc1394.h presence... yes
checking for dc1394/dc1394.h... yes
checking for main in -ldc1394... yes
checking for v4l2... yes
-------------------------------
Checking for optional libraries
-------------------------------
checking for X... libraries , headers
checking for glDrawPixels in -lGL... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for gluGetString in -lGLU... yes
checking for TooN... yes
checking libuvc/libuvc.h usability... no
checking libuvc/libuvc.h presence... no
checking for libuvc/libuvc.h... no
checking for uvc_stream_get_frame in -luvc... no
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_init_io in -lpng... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_destroy_decompress in -ljpeg... yes
checking JPEG read buffer size... 1 (safe reading)
checking tiffio.h usability... yes
checking tiffio.h presence... yes
checking for tiffio.h... yes
checking for TIFFReadRGBAImage in -ltiff... yes
checking for ffmpeg headers... checking for main in -lavutil... yes
checking for avformat_open_input in -lavformat... yes
checking for av_read_frame in -lavformat... yes
checking for avcodec_open2 in -lavcodec... yes
checking for sws_getContext in -lswscale... yes
checking for avdevice_register_all in -lavdevice... no
checking for doxygen... docs
-----------------------------------
Checking for platform compatibility
-----------------------------------
checking whether feenableexcept is declared... yes
--------------------------------
Checking for extra build options
--------------------------------
Options:
inline_asm assembler dc1394v2 v4l2buffer videodisplay toon png jpeg tiff
Missing options for linux-gnu:
ffmpeg libuvc
Dodgy things:
SIMD support:
mmx mmxext sse sse2 sse3
Missing SIMD support for x86_64-pc-linux-gnu:
-g -O2 -std=gnu++14 -Wall -Wextra -pipe -ggdb -fPIC -mmmx -msse -msse -msse2 -msse3
-ltiff -ljpeg -lpng -lGLU -lGL -ldc1394 -lpthread -lX11 -lXext
configure: creating ./config.status
config.status: creating Makefile
config.status: creating cvd/config.h
config.status: creating cvd_src/config_internal.h
Then I received the following error when I ran make
g++ -I. -I. -g -O2 -std=gnu++14 -Wall -Wextra -pipe -ggdb -fPIC -mmmx -msse -msse -msse2 -msse3 -c cvd_src/diskbuffer2.cc -o cvd_src/diskbuffer2.o -MMD -MP -MF cvd_src/diskbuffer2.d
In file included from ./cvd/image_ref.h:185:0,
from ./cvd/image.h:17,
from ./cvd/videoframe.h:13,
from ./cvd/localvideoframe.h:18,
from ./cvd/localvideobuffer.h:4,
from ./cvd/diskbuffer2.h:10,
from cvd_src/diskbuffer2.cc:2:
./cvd/internal/image_ref_implementation.hh: In member function ‘constexpr int& CVD::ImageRef::operator[](int)’:
./cvd/internal/image_ref_implementation.hh:194:1: error: expression ‘<throw-expression>’ is not a constant-expression
}
^
./cvd/internal/image_ref_implementation.hh: In member function ‘constexpr int CVD::ImageRef::operator[](int) const’:
./cvd/internal/image_ref_implementation.hh:204:1: error: expression ‘<throw-expression>’ is not a constant-expression
}
^
Makefile:271: recipe for target 'cvd_src/diskbuffer2.o' failed
make: *** [cvd_src/diskbuffer2.o] Error 1
I know that the the master branch of libCVD is now libCVD-2.0 which is in beta and requires C++14. The ./congifure showed that g++ supports C++14 features by default... no is this what the problem is?
I also tried to build using CMAKE:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
and this time I received another error:
Scanning dependencies of target CVD
[ 0%] Building CXX object CMakeFiles/CVD.dir/cvd_src/bayer.cxx.o
In file included from /home/csgurel/svo_install_overlay_ws/src/libcvd/cvd/image_ref.h:185:0,
from /home/csgurel/svo_install_overlay_ws/src/libcvd/cvd/image.h:17,
from /home/csgurel/svo_install_overlay_ws/src/libcvd/cvd/image_convert_fwd.h:4,
from /home/csgurel/svo_install_overlay_ws/src/libcvd/cvd/colourspace_convert.h:3,
from /home/csgurel/svo_install_overlay_ws/src/libcvd/cvd_src/bayer.cxx:3:
/home/csgurel/svo_install_overlay_ws/src/libcvd/cvd/internal/image_ref_implementation.hh: In member function ‘constexpr int& CVD::ImageRef::operator[](int)’:
/home/csgurel/svo_install_overlay_ws/src/libcvd/cvd/internal/image_ref_implementation.hh:194:1: error: expression ‘<throw-expression>’ is not a constant-expression
}
^
/home/csgurel/svo_install_overlay_ws/src/libcvd/cvd/internal/image_ref_implementation.hh: In member function ‘constexpr int CVD::ImageRef::operator[](int) const’:
/home/csgurel/svo_install_overlay_ws/src/libcvd/cvd/internal/image_ref_implementation.hh:204:1: error: expression ‘<throw-expression>’ is not a constant-expression
}
^
CMakeFiles/CVD.dir/build.make:62: recipe for target 'CMakeFiles/CVD.dir/cvd_src/bayer.cxx.o' failed
make[2]: *** [CMakeFiles/CVD.dir/cvd_src/bayer.cxx.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/CVD.dir/all' failed
make[1]: *** [CMakeFiles/CVD.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
I know it is a long question but I tried to provide as much information as possible to make it easier to troubleshoot.
This is not direct answer to the question, it's different solution and maybe it will help someone in the future
gptam, this project based on PTAM but without the dependencies to TooN, libCVD and Gvars3 instead it using openCV
I've been trying to run MARSS simulator on Ubuntu 18.04. So it threw an error saying gnuTLS library not found. When I went on installing that library it threw an error saying libnette 3.1 not found, so I go ahead and try to install nettle 3.4. This is the error I am encountering while installing nettle. Any help is appreciated.
./configure --prefix=/usr --disable-static && make
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for -R flag... using -Wl,-rpath,
Searching for libraries
checking /usr/lib... added
checking /usr/local/lib... added
checking /sw/local/lib... not found
checking /sw/lib... not found
checking /usr/gnu/lib... not found
checking /opt/gnu/lib... not found
checking /sw/gnu/lib... not found
checking /usr/freeware/lib... not found
checking /usr/pkg/lib... not found
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for ifunc support... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking if LD -Wl,--version-script works... yes
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for nm... nm
checking for objdump... objdump
checking for ar... ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking whether ln -s works... yes
checking for build system executable suffix...
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for uid_t in sys/types.h... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking size of long... 8
checking size of size_t... 8
checking openssl/evp.h usability... no
checking openssl/evp.h presence... no
checking for openssl/evp.h... no
checking valgrind/memcheck.h usability... no
checking valgrind/memcheck.h presence... no
checking for valgrind/memcheck.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlopen in -ldl... yes
checking for working alloca.h... yes
checking for alloca... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for strerror... yes
checking for secure_getenv... yes
checking for getline... yes
checking whether byte ordering is bigendian... no
checking for __attribute__... yes
checking for stdint types... stdint.h (shortcircuit)
make use of stdint.h in nettle-stdint.h (assuming C99 compatible system)
checking for fcntl file locking... yes
checking for __gmpz_powm_sec in -lgmp... no
configure: WARNING: GNU MP not found, or too old. GMP-5.0 or later is needed, see http://gmplib.org/.
Support for public key algorithms will be unavailable.
configure: Compiler uses 64-bit ABI. To change, set CC.
configure: Libraries to be installed in ${exec_prefix}/lib.
configure: Looking for assembler files in x86_64.
checking CCPIC... -fpic
checking if globals are prefixed by underscore... no
checking for ELF-style .type,%function pseudo-ops... yes
checking for ELF-style .type,#function pseudo-ops... no
checking for COFF-style .type directive... no
checking if we should use a .note.GNU-stack section... yes
checking if .align assembly directive is logarithmic... no
checking for m4... m4
checking for makeinfo... not-found
checking for library containing clock_gettime... none required
configure: creating ./config.status
config.status: creating config.make
config.status: creating config.m4
config.status: creating Makefile
config.status: creating version.h
config.status: creating tools/Makefile
config.status: creating testsuite/Makefile
config.status: creating examples/Makefile
config.status: creating nettle.pc
config.status: creating hogweed.pc
config.status: creating libnettle.map
config.status: creating libhogweed.map
config.status: creating config.h
config.status: config.h is unchanged
config.status: linking x86_64/aes-encrypt-internal.asm to aes-encrypt-internal.asm
config.status: linking x86_64/aes-decrypt-internal.asm to aes-decrypt-internal.asm
config.status: linking x86_64/camellia-crypt-internal.asm to camellia-crypt-internal.asm
config.status: linking x86_64/md5-compress.asm to md5-compress.asm
config.status: linking x86_64/memxor.asm to memxor.asm
config.status: linking x86_64/memxor3.asm to memxor3.asm
config.status: linking x86_64/poly1305-internal.asm to poly1305-internal.asm
config.status: linking x86_64/chacha-core-internal.asm to chacha-core-internal.asm
config.status: linking x86_64/salsa20-crypt.asm to salsa20-crypt.asm
config.status: linking x86_64/salsa20-core-internal.asm to salsa20-core-internal.asm
config.status: linking x86_64/serpent-encrypt.asm to serpent-encrypt.asm
config.status: linking x86_64/serpent-decrypt.asm to serpent-decrypt.asm
config.status: linking x86_64/sha1-compress.asm to sha1-compress.asm
config.status: linking x86_64/sha256-compress.asm to sha256-compress.asm
config.status: linking x86_64/sha512-compress.asm to sha512-compress.asm
config.status: linking x86_64/sha3-permute.asm to sha3-permute.asm
config.status: linking x86_64/umac-nh.asm to umac-nh.asm
config.status: linking x86_64/umac-nh-n.asm to umac-nh-n.asm
config.status: linking x86_64/machine.m4 to machine.m4
config.status: linking x86_64/gcm-hash8.asm to gcm-hash8.asm
config.status: executing dummy-dep-files commands
config.status: executing nettle-stdint.h commands
config.status: creating nettle-stdint.h : __NETTLE_STDINT_H
config.status: nettle-stdint.h is unchanged
configure: summary of build options:
Version: nettle 3.4
Host type: x86_64-unknown-linux-gnu
ABI: 64
Assembly files: x86_64
Install prefix: /usr
Library directory: ${exec_prefix}/lib
Compiler: gcc
Static libraries: no
Shared libraries: yes
Public key crypto: no
Using mini-gmp: no
Documentation: no
make all-here
make[1]: Entering directory '/home/vansh2795/nettle-3.4'
./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
echo timestamp > stamp-h
m4 ./asm.m4 machine.m4 config.m4 aes-decrypt-internal.asm >aes-decrypt-internal.s
/bin/sh: 1: m4: not found
Makefile:379: recipe for target 'aes-decrypt-internal.o' failed
make[1]: *** [aes-decrypt-internal.o] Error 127
make[1]: Leaving directory '/home/vansh2795/nettle-3.4'
Makefile:49: recipe for target 'all' failed
make: *** [all] Error 2
This used to work before. I don't know what changed, the thing is I can't run anymore. I'm cross-compiling for an aarch64 architecture with ARM cpu's, using Ubuntu 16.04 x86-64.
This is what I'm running to configure:
./configure --host=aarch64-linux-gnu --prefix=/data/data/papi/independent --exec-prefix=/data/data/papi/dependent --with-static-lib=yes --with-shared-lib=no --with-static-tools --with-arch=aarch64 --with-CPU=arm --with-ffsll --with-walltimer=cycle --with-tls=__thread --with-virtualtimer=clock_cputime_id --with-perf-events
Logs from running configure:
checking for architecture... aarch64
checking for OS... linux
checking for OS version... 4.15.0-29-generic
checking for perf_event workaround level... autodetect
checking for if MIC should be used... no
checking for aarch64-linux-gnu-xlc... no
checking for aarch64-linux-gnu-icc... no
checking for aarch64-linux-gnu-gcc... aarch64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether aarch64-linux-gnu-gcc accepts -g... yes
checking for aarch64-linux-gnu-gcc option to accept ISO C89... none needed
checking for aarch64-linux-gnu-xlf... no
checking for aarch64-linux-gnu-ifort... no
checking for aarch64-linux-gnu-gfortran... no
checking for aarch64-linux-gnu-f95... no
checking for aarch64-linux-gnu-f90... no
checking for aarch64-linux-gnu-f77... no
checking for xlf... no
checking for ifort... no
checking for gfortran... gfortran
configure: WARNING: using cross tools not prefixed with host triplet
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking for mpicc... mpicc
checking for gawk... gawk
checking how to run the C preprocessor... aarch64-linux-gnu-gcc -E
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for aarch64-linux-gnu-ranlib... aarch64-linux-gnu-ranlib
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for ANSI C header files... (cached) yes
checking for inline... inline
checking whether time.h and sys/time.h may both be included... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking c_asm.h usability... no
checking c_asm.h presence... no
checking for c_asm.h... no
checking intrinsics.h usability... no
checking intrinsics.h presence... no
checking for intrinsics.h... no
checking mach/mach_time.h usability... no
checking mach/mach_time.h presence... no
checking for mach/mach_time.h... no
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking for gethrtime... no
checking for read_real_time... no
checking for time_base_to_time... no
checking for clock_gettime... yes
checking for mach_absolute_time... no
checking for sched_getcpu... yes
checking for dlopen and dlerror symbols in base system... not found
checking for dlopen and dlerror symbols in -ldl... found
checking for native compiler for header generation... gcc
checking for debug build...
checking for -Wno-override-init... 1
checking for CPU type... arm
forcing use of pthread mutexes...
checking for ffsll... yes
checking for working gettid... no
checking for working syscall(SYS_gettid)... yes
checking for which real time clock to use... cycle
checking for high performance thread local storage... __thread
checking for which virtual timer to use... clock_cputime_id
checking for static user preset events... no
checking for static PAPI preset events... yes
checking for whether to build static library... yes
checking for whether to build shared library... no
checking for static compile of tests and utilities... yes
checking for linking with papi shared library of tests and utilities... no
checking platform... linux-pe
checking for components to build... perf_event perf_event_uncore
checking for PAPI event CSV filename to use... papi_events.csv
configure: Compiling genpapifdef with gcc because cross compiling
configure: Generating fpapi.h
configure: Generating f77papi.h
configure: Generating f90papi.h
configure: Rules.pfm4_pe will be included in the generated Makefile
configure: creating ./config.status
config.status: creating Makefile
config.status: creating papi.pc
config.status: creating components/Makefile_comp_tests.target
config.status: creating testlib/Makefile.target
config.status: creating utils/Makefile.target
config.status: creating ctests/Makefile.target
config.status: creating ftests/Makefile.target
config.status: creating validation_tests/Makefile.target
config.status: creating config.h
After running make:
(...)
mpicc -I../testlib -I../validation_tests -I.. -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -O1 first.c ../testlib/libtestlib.a ../testlib/do_loops.o ../libpapi.a -ldl -static -o mpifirst
/usr/bin/ld: ../testlib/libtestlib.a(test_utils.o): Relocations in generic ELF (EM: 183)
/usr/bin/ld: ../testlib/libtestlib.a(test_utils.o): Relocations in generic ELF (EM: 183)
/usr/bin/ld: ../testlib/libtestlib.a(test_utils.o): Relocations in generic ELF (EM: 183)
/usr/bin/ld: ../testlib/libtestlib.a(test_utils.o): Relocations in generic ELF (EM: 183)
/usr/bin/ld: ../testlib/libtestlib.a(test_utils.o): Relocations in generic ELF (EM: 183)
/usr/bin/ld: ../testlib/libtestlib.a(test_utils.o): Relocations in generic ELF (EM: 183)
../testlib/libtestlib.a: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile.recipies:230: recipe for target 'mpifirst' failed
make[2]: *** [mpifirst] Error 1
make[2]: Leaving directory '/home/lfpm1993/Desktop/papi/src/ctests'
Makefile.inc:240: recipe for target 'ctests' failed
make[1]: *** [ctests] Error 2
make[1]: Leaving directory '/home/lfpm1993/Desktop/papi/src'
Rules.pfm4_pe:42: recipe for target 'libpfm4/lib/libpfm.a' failed
make: *** [libpfm4/lib/libpfm.a] Error 2
file test_utils.o gives:
test_utils.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), not stripped
It looks to me that it is the right type for the file I'm trying to build.
Any clues on how to solve it?
Thanks,
Luís
mpicc -I../testlib ... first.c ../testlib/libtestlib.a ...
/usr/bin/ld: ../testlib/libtestlib.a(test_utils.o): Relocations in generic ELF (EM: 183)
This is invoking the wrong linker (system linker), and most likely also invoking the wrong compiler to compile first.c.
What happens when you run"
mpicc -c -I../testlib -I../validation_tests -I.. -I. -DUSE_PTHREAD_MUTEXES first.c
file first.o
I bet it says ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped, which would explain your problem: your libtestlib.a is compiled for desired architecture, but your main program is not.
I can reproduce this exact error message by trying to link x86_64 foo.o with a library of aarch64 objects.
This used to work before.
Possibly you have modified PATH before, such that mpicc found gcc for target. And how you've neglected to set the PATH appropriately.
(Makefiles that depend on PATH and other environment variables are the worst -- they work in one shell, but not in another.)
I am trying to compile iperf source code and run it on android devices.I am using an ubuntu server for compiling the code. I have downloaded the iperf source code as well as the Android NDK. I built the toolchain using make-standalone-toolchain.sh. Then I added the toolchain/bin to my path. I ran arm-linux-androideabi-gcc -v to make sure it is in my path.
Then I went to the iperf source code and configured it using the following command
./configure --host=arm-linux --prefix=$HOMER/iperf_install CC=arm-linux-androideabi-gcc CXX=arm-linux-androideabi-g++ CFLAGS=-static CXXFLAGS=-static
where $HOMER is my current directory
After this I used the command:
make install
I went to the installation folder(iperf_install) and went to bin and run iperf3 using
./iperf3
I was able to run iperf3 in my ubuntu server but not on my android device.
I got the following logs while configuring :
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-linux-androideabi-gcc accepts -g... yes
checking for arm-linux-androideabi-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of arm-linux-androideabi-gcc... gcc3
checking for arm-linux-ranlib... no
checking for ranlib... ranlib
configure: WARNING: using cross tools not prefixed with host triplet
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by arm-linux-androideabi-gcc... /local/mnt/workspace/ssuryade/android-toolchain/arm-linux-androideabi/bin/ld
checking if the linker (/local/mnt/workspace/ssuryade/android-toolchain/arm-linux-androideabi/bin/ld) is GNU ld... yes
checking for /local/mnt/workspace/ssuryade/android-toolchain/arm-linux-androideabi/bin/ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... arm-linux-androideabi-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... yes
checking whether arm-linux-androideabi-g++ accepts -g... yes
checking dependency style of arm-linux-androideabi-g++... gcc3
checking how to run the C++ preprocessor... arm-linux-androideabi-g++ -E
checking for arm-linux-g77... no
checking for arm-linux-xlf... no
checking for arm-linux-f77... no
checking for arm-linux-frt... no
checking for arm-linux-pgf77... no
checking for arm-linux-cf77... no
checking for arm-linux-fort77... no
checking for arm-linux-fl32... no
checking for arm-linux-af77... no
checking for arm-linux-xlf90... no
checking for arm-linux-f90... no
checking for arm-linux-pgf90... no
checking for arm-linux-pghpf... no
checking for arm-linux-epcf90... no
checking for arm-linux-gfortran... no
checking for arm-linux-g95... no
checking for arm-linux-xlf95... no
checking for arm-linux-f95... no
checking for arm-linux-fort... no
checking for arm-linux-ifort... no
checking for arm-linux-ifc... no
checking for arm-linux-efc... no
checking for arm-linux-pgf95... no
checking for arm-linux-lf95... no
checking for arm-linux-ftn... no
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... no
checking whether g77 accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse nm output from arm-linux-androideabi-gcc object... ok
checking for objdir... .libs
checking for arm-linux-ar... no
checking for ar... ar
checking for arm-linux-ranlib... ranlib
checking for arm-linux-strip... strip
checking if arm-linux-androideabi-gcc supports -fno-rtti -fno-exceptions... no
checking for arm-linux-androideabi-gcc option to produce PIC... -fPIC
checking if arm-linux-androideabi-gcc PIC flag -fPIC works... yes
checking if arm-linux-androideabi-gcc static flag -static works... yes
checking if arm-linux-androideabi-gcc supports -c -o file.o... yes
checking whether the arm-linux-androideabi-gcc linker (/local/mnt/workspace/ssuryade/android-toolchain/arm-linux-androideabi/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by arm-linux-androideabi-g++... /local/mnt/workspace/ssuryade/android-toolchain/arm-linux-androideabi/bin/ld
checking if the linker (/local/mnt/workspace/ssuryade/android-toolchain/arm-linux-androideabi/bin/ld) is GNU ld... yes
checking whether the arm-linux-androideabi-g++ linker (/local/mnt/workspace/ssuryade/android-toolchain/arm-linux-androideabi/bin/ld) supports shared libraries... yes
checking for arm-linux-androideabi-g++ option to produce PIC... -fPIC
checking if arm-linux-androideabi-g++ PIC flag -fPIC works... yes
checking if arm-linux-androideabi-g++ static flag -static works... yes
checking if arm-linux-androideabi-g++ supports -c -o file.o... yes
checking whether the arm-linux-androideabi-g++ linker (/local/mnt/workspace/ssuryade/android-toolchain/arm-linux-androideabi/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... no
checking if g77 static flag -static works... no
checking if g77 supports -c -o file.o... no
checking whether the g77 linker (/local/mnt/workspace/ssuryade/android-toolchain/arm-linux-androideabi/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ANSI C header files... (cached) yes
checking for library containing nanosleep... none required
checking for library containing hstrerror... none required
checking for an ANSI C-conforming const... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands
ssuryade#hyd-lnxbld13:/local/mnt/workspace/ssuryade/iperf-3.0b5$ ls
AUTHORS LICENSE Makefile.am README TODO bootstrap.sh config.log configure cross-me.txt cscope.out libtool tags
INSTALL Makefile Makefile.in RELEASE_NOTES aclocal.m4 config config.status configure.ac cross_me.txt examples src
ssuryade#hyd-lnxbld13:/local/mnt/workspace/ssuryade/iperf-3.0b5$ cat cross_me.txt
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for arm-linux-strip... no
checking for strip... strip
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for arm-linux-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for arm-linux-ranlib... no
checking for ranlib... ranlib
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... nm
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... no
checking whether ++ accepts -g... no
checking dependency style of ++... none
checking how to run the C++ preprocessor... /lib/cpp
checking for arm-linux-g77... no
checking for arm-linux-xlf... no
checking for arm-linux-f77... no
checking for arm-linux-frt... no
checking for arm-linux-pgf77... no
checking for arm-linux-cf77... no
checking for arm-linux-fort77... no
checking for arm-linux-fl32... no
checking for arm-linux-af77... no
checking for arm-linux-xlf90... no
checking for arm-linux-f90... no
checking for arm-linux-pgf90... no
checking for arm-linux-pghpf... no
checking for arm-linux-epcf90... no
checking for arm-linux-gfortran... no
checking for arm-linux-g95... no
checking for arm-linux-xlf95... no
checking for arm-linux-f95... no
checking for arm-linux-fort... no
checking for arm-linux-ifort... no
checking for arm-linux-ifc... no
checking for arm-linux-efc... no
checking for arm-linux-pgf95... no
checking for arm-linux-lf95... no
checking for arm-linux-ftn... no
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... no
checking whether g77 accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse nm output from gcc object... ok
checking for objdir... .libs
checking for arm-linux-ar... no
checking for ar... ar
checking for arm-linux-ranlib... ranlib
checking for arm-linux-strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking whether the ++ linker (/usr/bin/ld) supports shared libraries... yes
libtool.m4: error: problem compiling CXX test program
checking for ++ option to produce PIC...
checking if ++ static flag works... no
checking if ++ supports -c -o file.o... no
checking whether the ++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... unsupported
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... no
checking if g77 static flag -static works... no
checking if g77 supports -c -o file.o... no
checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for ANSI C header files... (cached) yes
checking for library containing nanosleep... none required
checking for library containing hstrerror... none required
checking for an ANSI C-conforming const... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands
I want to know why is it not using the right compiler even when I am configuring it with the right compiler. Also will using LDFLAGS make a difference? What difference will it make ? Should I give the address for the local library or should I give the the address of the lib that is included in the android toolchain?
Please help !
You can follow the Dockerfile from this GitHub repo, which contains all necessary steps for Ubuntu to compile iperf/iperf3 for Android devices using Android SDK/NDK.