You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/03/31 00:23:09 UTC
[GitHub] [tvm] apivovarov commented on pull request #7153: [RUNTIME] Add libbacktrace for backtraces with line numbers
apivovarov commented on pull request #7153:
URL: https://github.com/apache/tvm/pull/7153#issuecomment-810663046
@tkonolige Looks like libbacktrace build does not look at `CMAKE_CXX_COMPILER` and `CMAKE_C_COMPILER` flags.
Regardless of their values it builds libbacktrace for host platform (x86_64)
```
$ cmake .. \
-DCMAKE_C_COMPILER=mips-linux-uclibc-gnu-gcc \
-DCMAKE_CXX_COMPILER=mips-linux-uclibc-gnu-g++ \
-DCMAKE_C_FLAGS="-march=mips32r2 -DDMLC_LOG_STACK_TRACE=0" \
-DCMAKE_CXX_FLAGS="-march=mips32r2 -D_GLIBCXX_USE_C99 -DDMLC_LOG_STACK_TRACE=0"
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /home/alex/workspace/mips-gcc540-glibc222-64bit-r3.3.0/bin/mips-linux-uclibc-gnu-gcc
-- Check for working C compiler: /home/alex/workspace/mips-gcc540-glibc222-64bit-r3.3.0/bin/mips-linux-uclibc-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/alex/workspace/mips-gcc540-glibc222-64bit-r3.3.0/bin/mips-linux-uclibc-gnu-g++
-- Check for working CXX compiler: /home/alex/workspace/mips-gcc540-glibc222-64bit-r3.3.0/bin/mips-linux-uclibc-gnu-g++ -- works
...
[ 7%] Performing configure step for 'project_libbacktrace'
cd /home/alex/workspace/tvm/build-wyze/libbacktrace && /home/alex/workspace/tvm/cmake/libs/../../3rdparty/libbacktrace/configure --prefix=/home/alex/workspace/tvm/build-wyze/libbacktrace --with-pic
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
...
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I/home/alex/workspace/tvm/cmake/libs/../../3rdparty/libbacktrace -funwind-tables -frandom-seed=atomic.lo -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -g -O2 -c -o atomic.lo /home/alex/workspace/tvm/cmake/libs/../../3rdparty/libbacktrace/atomic.c
...
[ 69%] Building CXX object CMakeFiles/tvm_runtime_objs.dir/src/runtime/graph/graph_runtime.cc.o
/home/alex/workspace/mips-gcc540-glibc222-64bit-r3.3.0/bin/mips-linux-uclibc-gnu-g++ -DDMLC_USE_FOPEN64=0 -DDMLC_USE_LOGGING_LIBRARY="<tvm/runtime/logging.h>" -DNDEBUG -DNDEBUG=1 -DTVM_INDEX_DEFAULT_I64=1 -DTVM_THREADPOOL_USE_OPENMP=0 -DTVM_USE_LIBBACKTRACE=1 -DUSE_FALLBACK_STL_MAP=0 -DTVM_GRAPH_RUNTIME_DEBUG -I/home/alex/workspace/tvm/include -isystem /home/alex/workspace/tvm/3rdparty/dlpack/include -isystem /home/alex/workspace/tvm/3rdparty/dmlc-core/include -isystem /home/alex/workspace/tvm/3rdparty/rang/include -isystem /home/alex/workspace/tvm/3rdparty/compiler-rt -isystem /home/alex/workspace/tvm/3rdparty/picojson -I/home/alex/workspace/tvm/build-wyze/libbacktrace/include -I/home/alex/workspace/tvm/3rdparty/libcrc/include -std=c++14 -O2 -Wall -fPIC -march=mips32r2 -D_GLIBCXX_USE_C99 -DDMLC_LOG_STACK_TRACE=0 -o CMakeFiles/tvm_runtime_objs.dir/src/runtime/graph/graph_runtime.cc.o -c /home/alex/workspace/tvm/src/runtime/graph/graph_runtime.cc
...
/home/alex/workspace/mips-gcc540-glibc222-64bit-r3.3.0/bin/../lib/gcc/mips-linux-gnu/5.4.0/../../../../mips-linux-gnu/bin/ld: libbacktrace/lib/libbacktrace.a(fileline.o): Relocations in generic ELF (EM: 62)
libbacktrace/lib/libbacktrace.a: error adding symbols: File in wrong format
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org