command: ./run_example.sh
output:
Build the libraries…
python prepare_test_libs.py
Traceback (most recent call last):
File “prepare_test_libs.py”, line 22, in
prepare_test_libs(os.path.join(curr_path, “./lib”))
File “prepare_test_libs.py”, line 13, in prepare_test_libs
fadd_dylib.export_library(dylib_path)
File “/tvm/python/tvm/module.py”, line 121, in export_library
fcompile(file_name, files, **kwargs)
File “/tvm/python/tvm/contrib/cc.py”, line 33, in create_shared
_linux_shared(output, objects, options, cc)
File “/tvm/python/tvm/contrib/cc.py”, line 58, in _linux_shared
raise RuntimeError(msg)
RuntimeError: Compilation error:
/usr/bin/ld: /tmp/tmp2sr91udo/lib.o: relocation R_X86_64_32S against `.rodata.cst4’ can not be used when making a shared object; recompile with -fPIC
/tmp/tmp2sr91udo/lib.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:24: recipe for target ‘lib/test_addone_sys.o’ failed
make: *** [lib/test_addone_sys.o] Error 1
Run the example
Run the deployment with all in one packed library…
run_example.sh: 10: run_example.sh: lib/cpp_deploy_pack: not found
Run the deployment with all in normal library…
run_example.sh: 13: run_example.sh: lib/cpp_deploy_normal: not found
how to solve this problem? thanks