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.
Related
I'm trying to install on windows 10 mingw-w64-v7. So I download source from sourceforge and I tried to compile them on my computer. But It doesn't work.
The command ./configure give me :
./configure
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking build system type... x86_64-pc-mingw64
checking host system type... x86_64-pc-mingw64
checking whether to build the headers... yes
checking whether to build the crt... yes
checking whether to build the optional libraries... no
checking whether to build the optional tools... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
=== configuring in mingw-w64-headers (/c/Users/Guillaume/Documents/build/mingw-w64-v7.0.0/mingw-w64-headers)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-mingw64
checking host system type... x86_64-pc-mingw64
checking for a sed that does not truncate output... /usr/bin/sed
checking whether to rebuild headers with widl... no
checking whether to build a w32api package for Cygwin... no
checking for c-runtime headers... yes
checking for optional sdk headers... ddk,directx
checking if installing idl files is enabled... no
checking default _WIN32_WINNT version... 0x502
checking default msvcrt... msvcrt (0x700)
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating crt/_mingw.h
config.status: creating config.h
=== configuring in mingw-w64-crt (/c/Users/Guillaume/Documents/build/mingw-w64-v7.0.0/mingw-w64-crt)
configure: running /bin/sh ./configure --disable-option-checking '--prefix=/usr/local' --cache-file=/dev/null --srcdir=.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking whether make supports nested variables... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-pc-mingw64
checking host system type... x86_64-pc-mingw64
checking for sysroot... /usr/local
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... (cached) gawk
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
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... none
checking dependency style of gcc... none
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++... none
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for dlltool... dlltool
checking for ar... ar
checking the archiver (ar) interface... ar
checking dependency style of gcc... none
checking for as... as
checking whether to build a w32api package for Cygwin... no
checking whether to build the Win32 libraries... yes
checking whether to build the Win64 libraries... no
checking whether to build the WinARM32 libraries... no
checking whether to build the WinARM64 libraries... no
checking whether to use genlib... no
checking whether to enable globbing... no
checking whether to enable private exports... no
checking whether to enable delay import libs... no
checking what to provide as libmsvcrt.a... msvcrt-os
checking whether to enable experimental features... no
checking whether the compiler supports -municode... no
checking whether the linker provides __CTOR_LIST__... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/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 _mingw_mac.h usability... no
checking _mingw_mac.h presence... no
checking for _mingw_mac.h... no
configure: error: Please check if the mingw-w64 header set and the build/host option are set properly.
configure: error: ./configure failed for mingw-w64-crt
I am not really experiment with windows. I need to compile my C++17 code on windows. What can I do to resolve my problem ?
A recent version of MinGW-w64 7.0.0 with the latest GCC 10 for Windows can be found at http://winlibs.com/
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 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
I want to build MinGW-w64 where:
A: I want to compile MinGW itself on Linux (64-bit).
B: I want the MinGW tools (compiler, etc) to run on Linux (64-bit).
C: I want the MinGW tools (compiler, etc) to produce code that runs on Windows 64-bit (Win7 & Win8).
I'm having trouble at the configure stage. I've googled around a bit but I can't find out what options I need to pass to configure.
I have downloaded the source for MinGW-w64 SVN from (https://svn.code.sf.net/p/mingw-w64/code/trunk/).
(AFAICT this is the current official repo).
The source has a text help (mingw-w64-doc/howto-build/mingw-w64-howto-build.txt). However, this is primarily intended for those wanting to run MinGW tools on Windows.
The example options (for a non-multilib w64 target) are: --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-multilib
But I think I want the host option to refer to linux (right?). I've tried --host=x86_64-linux-gnuand --host=x86_64-pc-linux-gnu but no luck.
I get the error:
configure: error: Please check if the mingw-w64 header set and the build/host option are set properly.
configure: error: ../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-crt/configure failed for mingw-w64-crt
The full log is
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/make/tool/MinGW/svn/mingw-w64-v6615-2014-05-07/build-aux/missing: Unknown `--is-lightweight' option
Try `/make/tool/MinGW/svn/mingw-w64-v6615-2014-05-07/build-aux/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for x86_64-linux-gnu-strip... no
checking for strip... strip
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 build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether to build the headers... yes
checking whether to build the crt... yes
checking whether to build the optional libraries... no
checking whether to build the optional tools... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
=== configuring in mingw-w64-headers (/make/tool/MinGW/build/v6615-2014-05-07/mingw-w64-headers)
configure: running /bin/bash ../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-headers/configure --disable-option-checking '--prefix=/make/tool/MinGW/use/v6615/x86_64-w64-mingw32' '--target=x86_64-w64-mingw32' '--host=x86_64-linux-gnu' '--disable-multilib' '--with-sysroot=/make/tool/MinGW/use/v6615/x86_64-w64-mingw32' 'host_alias=x86_64-linux-gnu' 'target_alias=x86_64-w64-mingw32' --cache-file=/dev/null --srcdir=../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-headers
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/make/tool/MinGW/svn/mingw-w64-v6615-2014-05-07/mingw-w64-headers/build-aux/missing: Unknown `--is-lightweight' option
Try `/make/tool/MinGW/svn/mingw-w64-v6615-2014-05-07/mingw-w64-headers/build-aux/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for x86_64-linux-gnu-strip... no
checking for strip... strip
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... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking whether to rebuild headers with widl... no
checking whether to build a w32api package for Cygwin... no
checking for c-runtime headers... yes
checking for optional sdk headers... ddk,directx
checking if installing idl files is enabled... no
checking whether to enable the secure API... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating crt/_mingw.h
config.status: creating config.h
config.status: config.h is unchanged
=== configuring in mingw-w64-crt (/make/tool/MinGW/build/v6615-2014-05-07/mingw-w64-crt)
configure: running /bin/bash ../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-crt/configure --disable-option-checking '--prefix=/make/tool/MinGW/use/v6615/x86_64-w64-mingw32' '--target=x86_64-w64-mingw32' '--host=x86_64-linux-gnu' '--disable-multilib' '--with-sysroot=/make/tool/MinGW/use/v6615/x86_64-w64-mingw32' 'host_alias=x86_64-linux-gnu' 'target_alias=x86_64-w64-mingw32' --cache-file=/dev/null --srcdir=../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-crt
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-linux-gnu-strip... no
checking for strip... strip
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... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for sysroot... /make/tool/MinGW/use/v6615/x86_64-w64-mingw32
checking for a sed that does not truncate output... /bin/sed
checking for gawk... (cached) gawk
checking for x86_64-linux-gnu-gcc... x86_64-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 x86_64-linux-gnu-gcc accepts -g... yes
checking for x86_64-linux-gnu-gcc option to accept ISO C89... none needed
checking whether x86_64-linux-gnu-gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of x86_64-linux-gnu-gcc... gcc3
checking for x86_64-linux-gnu-g++... x86_64-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether x86_64-linux-gnu-g++ accepts -g... yes
checking dependency style of x86_64-linux-gnu-g++... gcc3
checking how to run the C preprocessor... x86_64-linux-gnu-gcc -E
checking for x86_64-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for x86_64-linux-gnu-dlltool... no
checking for dlltool... no
checking for x86_64-linux-gnu-ar... no
checking for x86_64-linux-gnu-lib... no
checking for x86_64-linux-gnu-link... no
checking for ar... ar
checking the archiver (ar) interface... ar
checking dependency style of x86_64-linux-gnu-gcc... gcc3
checking for x86_64-linux-gnu-as... no
checking for as... as
checking whether to build a w32api package for Cygwin... no
checking whether to build the Win32 libraries... no
checking whether to build the Win64 libraries... yes
checking whether to build the WinCE libraries... no
checking whether to enable globbing... no
checking whether to enable private exports... no
checking whether to enable delay import libs... no
checking whether to enable experimental features... no
checking whether the compiler supports -municode... no
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 _mingw_mac.h usability... no
checking _mingw_mac.h presence... no
checking for _mingw_mac.h... no
configure: error: Please check if the mingw-w64 header set and the build/host option are set properly.
configure: error: ../../../svn/mingw-w64-v6615-2014-05-07/mingw-w64-crt/configure failed for mingw-w64-crt
NOTE: I can successfully compile native GCC & Clang from source.
Purpose:
My ultimate goal is to use the latest Clang to produce C++14 code for Windows 7/8 64-bit (including D3D11 & OpenGL).
I want to build trunk MinGW because the latest Clang produces assembly code that the default MinGW cannot assemble (mainly "junk at end of line" errors).
As of 2014-05-07 (today), only Clang offers full C++14 support, and I am making use of features only available in Clang (eg: variable templates).
Yet, Clang relies on GCC / MinGW for assembling and linking.
Info:
OS: Linux Mint 16 64-bit (XFCE).
Thanks for all assistance.
Old question, but an answer might be helpful to those coming from google.
The host and build flags are a bit misleading. The info from the help page at mingw-w64-crt/configure --help shows:
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
So we want to leave --build alone, and specify the windows system we wish to cross-compile for with --host.
So, the way to build for 64bit windows, and include both 32bit and 64bit libraries and std::experimental features is with:
./configure --enable-lib32 --enable-lib64 --enable-experimental --host=x86_64-w64-mingw32
It's very similar if you want to build for 32bit windows, but of course you can't enable 64bit mode:
./configure --enable-lib32 --enable-experimental --host=i686-w64-mingw32
https://github.com/Zeranoe/mingw-w64-build
I think your answer is here:
./mingw-w64-build x86_64 for 64bit;
or
./mingw-w64-build x86_64 i686 for 32bit.
I met the same error while configuring. After reading the shell in mingw-w64-build this file, I think you will have to execute:
./configure in folder ../x86_64-w64-v8.0.0/mingw-w64-headers,
then
./configure in folder ../x86_64-w64-v8.0.0/mingw-w64-crt,
and finally
./configure in folder ../x86_64-w64-v8.0.0/mingw-w64-libraries/winpthreads.
I did not verify the whole process manually, because this shell file just did the job.
Maybe you could try this - its the latest version of mingw and you dont have to compile it by yourself:
https://github.com/Zeranoe/mingw-w64-build
it supports almost all distros...
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.