[Libunwind-devel] Error compiling libunwind for HOST=mips-linux TARGET=x
From:
Vamshi Krishna Ramaka
Subject:
[Libunwind-devel] Error compiling libunwind for HOST=mips-linux TARGET=x86_64-freebsd
Date:
Thu, 25 Apr 2013 04:36:55 +0530
Hi Everyone,
I am trying to build the library, so that it will run on a mips-linux system and will try to unwind for a remote x86_64-freebsd target. I am getting the following error :
make[2]: Entering directory `/u/vamshi/git-repo/libunwind/src'
depbase=`echo os-freebsd.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \ if libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-x86_64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT os-freebsd.lo -MD -MP -MF "$depbase.Tpo" -c -o os-freebsd.lo os-freebsd.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-x86_64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT os-freebsd.lo -MD -MP -MF .deps/os-freebsd.Tpo -c os-freebsd.c -fPIC -DPIC -o .libs/os-freebsd.o
os-freebsd.c: In function 'get_pid_by_tid': os-freebsd.c:63: error: 'KERN_PROC' undeclared (first use in this function) os-freebsd.c:63: error: (Each undeclared identifier is reported only once os-freebsd.c:63: error: for each function it appears in.)
os-freebsd.c:64: error: 'KERN_PROC_ALL' undeclared (first use in this function) os-freebsd.c:80: error: dereferencing pointer to incomplete type os-freebsd.c:81: error: increment of pointer to unknown structure
os-freebsd.c:81: error: arithmetic on pointer to an incomplete type os-freebsd.c:82: error: dereferencing pointer to incomplete type os-freebsd.c:83: error: dereferencing pointer to incomplete type os-freebsd.c: In function '_Ux86_64_get_elf_image':
os-freebsd.c:102: error: 'KERN_PROC' undeclared (first use in this function) os-freebsd.c:103: error: 'KERN_PROC_VMMAP' undeclared (first use in this function) os-freebsd.c:128: error: dereferencing pointer to incomplete type
os-freebsd.c:130: error: dereferencing pointer to incomplete type os-freebsd.c:130: error: dereferencing pointer to incomplete type os-freebsd.c:132: error: dereferencing pointer to incomplete type os-freebsd.c:132: error: 'KVME_TYPE_VNODE' undeclared (first use in this function)
os-freebsd.c:134: error: dereferencing pointer to incomplete type os-freebsd.c:135: error: dereferencing pointer to incomplete type os-freebsd.c:138: error: dereferencing pointer to incomplete type os-freebsd.c:140: error: dereferencing pointer to incomplete type
make[2]: *** [os-freebsd.lo] Error 1 make[2]: Leaving directory `/u/vamshi/git-repo/libunwind/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/u/vamshi/git-repo/libunwind/src' make: *** [all-recursive] Error 1
Any and all help in resolving this is appreciated. This is the latest code from GIT.
Please refer to the bottom of the mail for a more comprehensive log (I have removed "doc" subdir from Makefile.in and doc/* from configure.ac)
[bldlnb124 389] libunwind > ./configure --host=mips-linux --target=x86_64-freebsd configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used.
checking build system type... x86_64-unknown-linux-gnu checking host system type... mips-unknown-linux-gnu checking target system type... x86_64-pc-freebsd checking for a BSD-compatible install... /usr/software/bin/ginstall -c
checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for mips-linux-strip... no checking for strip... strip checking whether to enable maintainer-specific portions of Makefiles... no
checking for mips-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 mips-linux-g++... no checking for mips-linux-c++... no checking for mips-linux-gpp... no checking for mips-linux-aCC... no
checking for mips-linux-CC... no checking for mips-linux-cxx... no checking for mips-linux-cc++... no checking for mips-linux-cl.exe... no checking for mips-linux-FCC... no checking for mips-linux-KCC... no
checking for mips-linux-RCC... no checking for mips-linux-xlC_r... no checking for mips-linux-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 for a BSD-compatible install... /usr/software/bin/ginstall -c checking whether make sets $(MAKE)... (cached) yes ./configure: line 4310: LT_INIT: command not found
checking whether gcc and cc understand -c and -o together... yes checking for __uc_get_grs in -luca... no checking for library containing dlopen... -ldl checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/software/bin/grep
checking for egrep... /usr/software/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 atomic_ops.h usability... no checking atomic_ops.h presence... no
checking for atomic_ops.h... no checking for ANSI C header files... (cached) yes checking asm/ptrace_offsets.h usability... no checking asm/ptrace_offsets.h presence... no checking for asm/ptrace_offsets.h... no
checking endian.h usability... yes checking endian.h presence... yes checking for endian.h... yes checking sys/endian.h usability... no checking sys/endian.h presence... no checking for sys/endian.h... no
checking execinfo.h usability... yes checking execinfo.h presence... yes checking for execinfo.h... yes checking ia64intrin.h usability... no checking ia64intrin.h presence... no checking for ia64intrin.h... no
checking sys/uc_access.h usability... no checking sys/uc_access.h presence... no checking for sys/uc_access.h... no checking for unistd.h... (cached) yes checking signal.h usability... yes checking signal.h presence... yes
checking for signal.h... yes checking for sys/types.h... (cached) yes checking sys/procfs.h usability... yes checking sys/procfs.h presence... yes checking for sys/procfs.h... yes checking sys/ptrace.h usability... yes
checking sys/ptrace.h presence... yes checking for sys/ptrace.h... yes checking byteswap.h usability... yes checking byteswap.h presence... yes checking for byteswap.h... yes checking for an ANSI C-conforming const... yes
checking for inline... inline checking for size_t... yes checking for off_t... yes checking size of off_t... 8 checking for struct dl_phdr_info.dlpi_subs... yes checking for struct elf_prstatus... yes checking for struct prstatus... no
checking whether PTRACE_POKEUSER is declared... yes checking whether PTRACE_POKEDATA is declared... yes checking whether PTRACE_TRACEME is declared... yes checking whether PTRACE_CONT is declared... yes checking whether PTRACE_SINGLESTEP is declared... yes
checking whether PTRACE_SYSCALL is declared... yes checking whether PT_IO is declared... no checking whether PT_GETREGS is declared... yes checking whether PT_GETFPREGS is declared... yes checking whether PT_CONTINUE is declared... yes
checking whether PT_TRACE_ME is declared... yes checking whether PT_STEP is declared... yes checking whether PT_SYSCALL is declared... yes checking for dl_iterate_phdr... yes checking for dl_phdr_removals_counter... no
checking for dlmodinfo... no checking for getunwind... no checking for ttrace... no checking for mincore... yes checking if building with AltiVec... no checking if we should build libunwind-coredump... yes
checking for sys/ptrace.h... (cached) yes checking if we should build libunwind-ptrace... yes checking if we should build libunwind-setjmp... no checking for build architecture... x86_64 checking for host architecture... mips
checking for target architecture... x86_64 checking for target operating system... freebsd checking for ELF helper width... 64 checking whether to include DWARF support... yes checking whether to restrict build to remote support... yes
checking whether to enable debug support... checking whether to enable C++ exception support... no checking whether to load .debug_frame sections... no checking whether to block signals during mutex ops... yes
checking whether to validate memory addresses before use... yes checking whether to enable msabi support... checking whether to support LZMA-compressed symbol tables... auto checking for lzma_mf_is_supported in -llzma... no
checking for __thread... yes checking for Intel compiler... no checking for __builtin___clear_cache... no checking for __builtin_unreachable... no checking for __sync atomics... yes checking for library containing backtrace... none required
configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating tests/Makefile config.status: creating tests/check-namespace.sh config.status: creating include/libunwind-common.h
config.status: creating include/libunwind.h config.status: creating include/tdep/libunwind_i.h config.status: creating src/unwind/libunwind.pc config.status: creating src/coredump/libunwind-coredump.pc config.status: creating src/ptrace/libunwind-ptrace.pc
config.status: creating src/setjmp/libunwind-setjmp.pc config.status: creating src/libunwind-generic.pc config.status: creating include/config.h config.status: include/config.h is unchanged config.status: executing depfiles commands
checking for a sed that does not truncate output... /usr/software/bin/sed 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 whether ln -s works... yes checking how to recognise dependent libraries... pass_all checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E checking for mips-linux-g77... no checking for mips-linux-xlf... no checking for mips-linux-f77... no checking for mips-linux-frt... no checking for mips-linux-pgf77... no
checking for mips-linux-cf77... no checking for mips-linux-fort77... no checking for mips-linux-fl32... no checking for mips-linux-af77... no checking for mips-linux-xlf90... no checking for mips-linux-f90... no
checking for mips-linux-pgf90... no checking for mips-linux-pghpf... no checking for mips-linux-epcf90... no checking for mips-linux-gfortran... no checking for mips-linux-g95... no checking for mips-linux-xlf95... no
checking for mips-linux-f95... no checking for mips-linux-fort... no checking for mips-linux-ifort... no checking for mips-linux-ifc... no checking for mips-linux-efc... no checking for mips-linux-pgf95... no
checking for mips-linux-lf95... no checking for mips-linux-ftn... no checking for g77... g77 checking whether we are using the GNU Fortran 77 compiler... yes checking whether g77 accepts -g... yes 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 mips-linux-ar... no checking for ar... ar checking for mips-linux-ranlib... no checking for ranlib... ranlib
checking for mips-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 for ld used by g++... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC checking if g++ PIC flag -fPIC works... yes checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes checking whether the g++ 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
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... yes checking if g77 static flag -static works... yes checking if g77 supports -c -o file.o... yes 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 [04:31 0.08] [bldlnb124 390] libunwind > make LIBTOOL=libtool Making all in src
make[1]: Entering directory `/u/vamshi/git-repo/libunwind/src' make all-am make[2]: Entering directory `/u/vamshi/git-repo/libunwind/src' depbase=`echo os-freebsd.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`; \
if libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-x86_64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT os-freebsd.lo -MD -MP -MF "$depbase.Tpo" -c -o os-freebsd.lo os-freebsd.c; \
then mv -f "$depbase.Tpo" "$depbase.Plo"; else rm -f "$depbase.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include/tdep-x86_64 -I. -D_GNU_SOURCE -DUNW_REMOTE_ONLY -DNDEBUG -g -O2 -fexceptions -Wall -Wsign-compare -MT os-freebsd.lo -MD -MP -MF .deps/os-freebsd.Tpo -c os-freebsd.c -fPIC -DPIC -o .libs/os-freebsd.o
os-freebsd.c: In function 'get_pid_by_tid': os-freebsd.c:63: error: 'KERN_PROC' undeclared (first use in this function) os-freebsd.c:63: error: (Each undeclared identifier is reported only once os-freebsd.c:63: error: for each function it appears in.)
os-freebsd.c:64: error: 'KERN_PROC_ALL' undeclared (first use in this function) os-freebsd.c:80: error: dereferencing pointer to incomplete type os-freebsd.c:81: error: increment of pointer to unknown structure
os-freebsd.c:81: error: arithmetic on pointer to an incomplete type os-freebsd.c:82: error: dereferencing pointer to incomplete type os-freebsd.c:83: error: dereferencing pointer to incomplete type os-freebsd.c: In function '_Ux86_64_get_elf_image':
os-freebsd.c:102: error: 'KERN_PROC' undeclared (first use in this function) os-freebsd.c:103: error: 'KERN_PROC_VMMAP' undeclared (first use in this function) os-freebsd.c:128: error: dereferencing pointer to incomplete type
os-freebsd.c:130: error: dereferencing pointer to incomplete type os-freebsd.c:130: error: dereferencing pointer to incomplete type os-freebsd.c:132: error: dereferencing pointer to incomplete type os-freebsd.c:132: error: 'KVME_TYPE_VNODE' undeclared (first use in this function)
os-freebsd.c:134: error: dereferencing pointer to incomplete type os-freebsd.c:135: error: dereferencing pointer to incomplete type os-freebsd.c:138: error: dereferencing pointer to incomplete type os-freebsd.c:140: error: dereferencing pointer to incomplete type
make[2]: *** [os-freebsd.lo] Error 1 make[2]: Leaving directory `/u/vamshi/git-repo/libunwind/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/u/vamshi/git-repo/libunwind/src' make: *** [all-recursive] Error 1
[04:31 0.07] [bldlnb124 391] libunwind >