libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help: build error for QNX v7.1 aarch64


From: Lianghua Yang
Subject: Help: build error for QNX v7.1 aarch64
Date: Mon, 22 Apr 2024 11:43:15 -0700

Dear passionate experts of backtrace,

Thanks so much for your great effort and smart work first :)

As QNX's own "-lbacktrace" does not support bt_get_backtrace() though bt_load_memmap was good,  i am trying to use unwind lib.
i was stuck on this make error (shortly after compiling a few objects) for 5 hours,
../include/libunwind-aarch64.h:245:93: error: 'mcontext_t' {aka 'struct __aarch64_mcontext'} has no member named 'regs'

the file line is this:
#define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.regs; //ly: unw_ctx->uc_mcontext.content;
//ly:  #define   UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->content;

The entire log of my build is pasted below fyi.

Appreciate your help!
--

Leoh Yang

Software Engineer

leoh@applied.co

(408)505-5536

Applied Intuition, Inc.


eoh@A0767:~/ws/libunwind$ source ~/qnx710/qnxsdp-env.sh
QNX_HOST=/home/leoh/qnx710/host/linux/x86_64
QNX_TARGET=/home/leoh/qnx710/target/qnx7
MAKEFLAGS=-I/home/leoh/qnx710/target/qnx7/usr/include
leoh@A0767:~/ws/libunwind$
leoh@A0767:~/ws/libunwind$
leoh@A0767:~/ws/libunwind$ ./configure --host=aarch64-unknown-nto-qnx7.1.0  --prefix=$QNX_HOST/usr/bin  CC=$QNX_HOST/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc
checking build system type... x86_64-pc-linux-gnu
checking host system type... aarch64-unknown-nto-qnx7.1.0
checking target system type... aarch64-unknown-nto-qnx7.1.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for aarch64-unknown-nto-qnx7.1.0-strip... aarch64-unknown-nto-qnx7.1.0-strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for aarch64-unknown-nto-qnx7.1.0-gcc... /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-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 /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc accepts -g... yes
checking for /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc option to accept ISO C89... none needed
checking whether /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc... gcc3
checking for aarch64-unknown-nto-qnx7.1.0-g++... aarch64-unknown-nto-qnx7.1.0-g++
checking whether we are using the GNU C++ compiler... yes
checking whether aarch64-unknown-nto-qnx7.1.0-g++ accepts -g... yes
checking dependency style of aarch64-unknown-nto-qnx7.1.0-g++... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for aarch64-unknown-nto-qnx7.1.0-ar... aarch64-unknown-nto-qnx7.1.0-ar
checking the archiver (aarch64-unknown-nto-qnx7.1.0-ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc... /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-ld
checking if the linker (/home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-nm -B
checking the name lister (/home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to aarch64-unknown-nto-qnx7.1.0 format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-ld option to reload object files... -r
checking for aarch64-unknown-nto-qnx7.1.0-objdump... aarch64-unknown-nto-qnx7.1.0-objdump
checking how to recognize dependent libraries... pass_all
checking for aarch64-unknown-nto-qnx7.1.0-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for aarch64-unknown-nto-qnx7.1.0-ar... (cached) aarch64-unknown-nto-qnx7.1.0-ar
checking for archiver @FILE support... @
checking for aarch64-unknown-nto-qnx7.1.0-strip... (cached) aarch64-unknown-nto-qnx7.1.0-strip
checking for aarch64-unknown-nto-qnx7.1.0-ranlib... aarch64-unknown-nto-qnx7.1.0-ranlib
checking command to parse /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-nm -B output from /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for aarch64-unknown-nto-qnx7.1.0-mt... no
checking for mt... mt
configure: WARNING: using cross tools not prefixed with host triplet
checking if mt is a manifest tool... no
checking how to run the C preprocessor... /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-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 for dlfcn.h... yes
checking for objdir... .libs
checking if /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc supports -fno-rtti -fno-exceptions... no
checking for /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc option to produce PIC... -fPIC -shared -DPIC
checking if /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc PIC flag -fPIC -shared -DPIC works... yes
checking if /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc static flag -static works... yes
checking if /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc supports -c -o file.o... yes
checking if /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc supports -c -o file.o... (cached) yes
checking whether the /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc linker (/home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... ldqnx.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
checking how to run the C++ preprocessor... aarch64-unknown-nto-qnx7.1.0-g++ -E
checking for ld used by aarch64-unknown-nto-qnx7.1.0-g++... /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-ld
checking if the linker (/home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-ld) is GNU ld... yes
checking whether the aarch64-unknown-nto-qnx7.1.0-g++ linker (/home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-ld) supports shared libraries... yes
checking for aarch64-unknown-nto-qnx7.1.0-g++ option to produce PIC... -fPIC -shared -DPIC
checking if aarch64-unknown-nto-qnx7.1.0-g++ PIC flag -fPIC -shared -DPIC works... yes
checking if aarch64-unknown-nto-qnx7.1.0-g++ static flag -static works... yes
checking if aarch64-unknown-nto-qnx7.1.0-g++ supports -c -o file.o... yes
checking if aarch64-unknown-nto-qnx7.1.0-g++ supports -c -o file.o... (cached) yes
checking whether the aarch64-unknown-nto-qnx7.1.0-g++ linker (/home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-ld) supports shared libraries... yes
checking dynamic linker characteristics... ldqnx.so
checking how to hardcode library paths into programs... immediate
checking dependency style of /home/leoh/qnx710/host/linux/x86_64/usr/bin/aarch64-unknown-nto-qnx7.1.0-gcc... gcc3
checking for __uc_get_grs in -luca... no
checking for library containing dlopen... none required
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 asm/ptrace.h usability... no
checking asm/ptrace.h presence... no
checking for asm/ptrace.h... no
checking asm/vsyscall.h usability... no
checking asm/vsyscall.h presence... no
checking for asm/vsyscall.h... no
checking endian.h usability... no
checking endian.h presence... no
checking for endian.h... no
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking execinfo.h usability... no
checking execinfo.h presence... no
checking for execinfo.h... no
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... no
checking sys/ptrace.h presence... no
checking for sys/ptrace.h... no
checking sys/syscall.h usability... no
checking sys/syscall.h presence... no
checking for sys/syscall.h... no
checking byteswap.h usability... no
checking byteswap.h presence... no
checking for byteswap.h... no
checking elf.h usability... no
checking elf.h presence... no
checking for elf.h... no
checking sys/elf.h usability... yes
checking sys/elf.h presence... yes
checking for sys/elf.h... yes
checking link.h usability... no
checking link.h presence... no
checking for link.h... no
checking sys/link.h usability... yes
checking sys/link.h presence... yes
checking for sys/link.h... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking size of off_t... 8
checking for struct dl_phdr_info.dlpi_subs... no
checking for struct elf_prstatus... no
checking for struct prstatus... no
checking for procfs_status... yes
checking for elf_fpregset_t... no
checking whether PTRACE_POKEUSER is declared... no
checking whether PTRACE_POKEDATA is declared... no
checking whether PTRACE_SETREGSET is declared... no
checking whether PTRACE_TRACEME is declared... no
checking whether PTRACE_CONT is declared... no
checking whether PTRACE_SINGLESTEP is declared... no
checking whether PTRACE_SYSCALL is declared... no
checking whether PT_IO is declared... no
checking whether PT_GETREGS is declared... no
checking whether PT_GETFPREGS is declared... no
checking whether PT_CONTINUE is declared... no
checking whether PT_TRACE_ME is declared... no
checking whether PT_STEP is declared... no
checking whether PT_SYSCALL is declared... no
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... no
checking for pipe2... no
checking for sigaltstack... no
checking if building with AltiVec... no
checking for Android... no
checking if we should build libunwind-coredump... yes
checking for sys/ptrace.h... (cached) no
checking if we should build libunwind-ptrace... no
checking if we should export unwind.h... yes
checking if we should build libunwind-setjmp... yes
checking for build architecture... x86_64
checking for host architecture... aarch64
checking for target architecture... aarch64
checking for target operating system... nto-qnx7.1.0
checking for ELF helper width... 64
checking whether to include DWARF support... yes
checking whether to restrict build to remote support... no
checking whether to enable debug support...
checking whether to enable C++ exception support... no
checking whether to load .debug_frame sections... yes
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... yes
checking whether to support ZLIB-compressed symbol tables... auto
checking for uncompress in -lz... yes
checking whether to support UNW_CACHE_PER_THREAD...
checking for Intel compiler... no
checking if building on Solaris then define __EXTENSIONS__ macro... yes
checking for QCC compiler... no
checking for __builtin___clear_cache... yes
checking for __builtin_unreachable... yes
checking for library containing backtrace... no
checking for latex2man... no
configure: WARNING: latex2man not found. Install latex2man. Disabling docs.
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating tests/Makefile
config.status: creating tests/check-namespace.sh
config.status: creating Makefile
config.status: creating src/Makefile
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
config.status: executing libtool commands
leoh@A0767:~/ws/libunwind$
leoh@A0767:~/ws/libunwind$ make
Making all in src
make[1]: Entering directory '/home/leoh/ws/libunwind/src'
make  all-am
make[2]: Entering directory '/home/leoh/ws/libunwind/src'
  CC       os-qnx.lo
os-qnx.c: In function 'callback':
os-qnx.c:44:16: warning: comparison of integer expressions of different signedness: 'unw_word_t' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
     if(cbi->ip >= segbase && cbi->ip < segbase + info->dlpi_phdr[i].p_memsz)
                ^~
  CC       mi/init.lo
  CC       mi/flush_cache.lo
  CC       mi/mempool.lo
  CC       mi/strerror.lo
  CC       aarch64/is_fpreg.lo
  CC       aarch64/regname.lo
  CC       mi/backtrace.lo
In file included from ../include/libunwind.h:7,
                 from mi/backtrace.c:29:
mi/backtrace.c: In function 'unw_backtrace':
../include/libunwind-aarch64.h:245:93: error: 'mcontext_t' {aka 'struct __aarch64_mcontext'} has no member named 'regs'
 #define UNW_BASE register uint64_t unw_base __asm__ ("x0") = (uint64_t) unw_ctx->uc_mcontext.regs;  // unw_ctx->uc_mcontext.content;
                                                                                             ^
../include/libunwind-aarch64.h:251:3: note: in expansion of macro 'UNW_BASE'
   UNW_BASE \
   ^~~~~~~~
../include/libunwind-common.h:127:29: note: in expansion of macro 'unw_tdep_getcontext'
 #define unw_getcontext(uc)  unw_tdep_getcontext(uc)
                             ^~~~~~~~~~~~~~~~~~~
mi/backtrace.c:72:7: note: in expansion of macro 'unw_getcontext'
       unw_getcontext (&uc);
       ^~~~~~~~~~~~~~
Makefile:4372: recipe for target 'mi/backtrace.lo' failed
make[2]: *** [mi/backtrace.lo] Error 1
make[2]: Leaving directory '/home/leoh/ws/libunwind/src'
Makefile:2467: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/leoh/ws/libunwind/src'
Makefile:619: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
leoh@A0767:~/ws/libunwind$


reply via email to

[Prev in Thread] Current Thread [Next in Thread]