Cross-Compilation error: error adding symbols: File in wrong format
See original GitHub issueEnv.
- remote device: fireflyRK3399, ARM A72, built runtime previously
- local machine: i7-3630, built tvm previously
config.mk
- remote device
DEBUG = 1
USE_OPENCL = 1 # installed opencl previousl
USE_RPC = 1
USE_BLAS = openblas
- local machine
DEBUG = 1
USE_OPENCL = 1 # installed opencl previously
LLVM_CONFIG = llvm-config
USE_BLAS = openblas
Remote Device (ARM A72)
yuanshuai@firefly:~$ python -m tvm.exec.rpc_server --host 0.0.0.0 --port=9090
Loading runtime library /home/yuanshuai/code/tvm/lib/libtvm_runtime.so... exec only
INFO:root:RPCServer: bind to 0.0.0.0:9090
INFO:root:RPCServer: connection from ('192.168.1.110', 60482)
INFO:root:Connection from ('192.168.1.110', 60482)
[01:34:55] src/runtime/rpc/rpc_server_env.cc:23: Upload /tmp/tmp0gxCni/mylib.o... nbytes=4280
INFO:root:Create shared library based on /tmp/tmp0gxCni/mylib.o
Local Machine
yuens@Spark:~/Software/tvm/tutorials/python$ python cross_compilation_and_rpc.py [2/30]
Traceback (most recent call last):
File "cross_compilation_and_rpc.py", line 189, in <module>
f = remote.load_module('mylib.o')
File "/home/yuens/Software/tvm/python/tvm/contrib/rpc.py", line 299, in load_module
return _LoadRemoteModule(self._sess, path)
File "/home/yuens/Software/tvm/python/tvm/_ffi/function.py", line 255, in my_api_func
return flocal(*args)
File "/home/yuens/Software/tvm/python/tvm/_ffi/_ctypes/function.py", line 183, in __call__
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
File "/home/yuens/Software/tvm/python/tvm/_ffi/base.py", line 62, in check_call
raise TVMError(py_str(_LIB.TVMGetLastError()))
tvm._ffi.base.TVMError: Except caught from RPC call: TVMCall CFunc Error:
Traceback (most recent call last):
File "/home/yuanshuai/code/tvm/python/tvm/_ffi/_ctypes/function.py", line 54, in cfun
rv = local_pyfunc(*pyargs)
File "/home/yuanshuai/code/tvm/python/tvm/contrib/rpc.py", line 42, in load_module
cc.create_shared(path + '.so', path)
File "/home/yuanshuai/code/tvm/python/tvm/contrib/cc.py", line 52, in create_shared
raise RuntimeError(msg)
RuntimeError: Compilation error:
/usr/bin/ld: /tmp/tmp0gxCni/mylib.o: Relocations in generic ELF (EM: 62)
/usr/bin/ld: /tmp/tmp0gxCni/mylib.o: Relocations in generic ELF (EM: 62)
/tmp/tmp0gxCni/mylib.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
cross compile: error adding symbols: File in wrong format
I have add these two statements "SET(CMAKE_C_COMPILER "mips-linux-uclibc-gnu-gcc") SET(CMAKE_CXX_COMPILER "mips-linux-uclibc-gnu-g++") " and ...
Read more >Cross compiling fails with "error adding symbols: File in wrong ...
I am building rocket version 0.4.2 with up-to-date rust nightly on Ubuntu 16.04 (amd64). Cross compiling failes, even with the hello world example...
Read more >(SOLVED)libcudart.so: error adding symbols: File in wrong ...
I try to do the cross-compile for DPX2 following the README.md. ... (SOLVED)libcudart.so: error adding symbols: File in wrong format.
Read more >How to resolve 'Gcc: error adding symbol: file in wrong format ...
The question is far to broad and impossible to answer. If you're compiling with gcc, the error could be anything from missing libraries,...
Read more >How to Cross-Compile ArmNN on x86_64 for arm64
When building armNN: /usr/local/lib/libboost_log.a: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status CMakeFiles/armnn.dir/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
try to do gcc -v on the board to see the target triple you have
Also note that if you want to do CPU testing, it might make sense to add detailed target options, for example
-mattr=+neon
to enable neon support