Error building Dynamic Library


I am trying to go through the how to deploy example for our environment ( I am able to build System module but ran into issues building Dynamic library.
We are cross compiling on x86_64 for 32 bit arm. I have verified the target triple (using the --verbose with compiler). Am I missing something?

Traceback (most recent call last):
  File "", line 38, in <module>
    prepare_test_libs(os.path.join(curr_path, "./lib"))
  File "", line 29, in prepare_test_libs
  File "/home/tvm/python/tvm/", line 144, in export_library
    fcompile(file_name, files, **kwargs)
  File "/home/tvm/python/tvm/contrib/", line 49, in create_shared
    _linux_shared(output, objects, options, cc)
  File "/home/tvm/python/tvm/contrib/", line 106, in _linux_shared
    raise RuntimeError(msg)
RuntimeError: Compilation error:
/usr/bin/ld: /tmp/tmps1cxjn7i/lib.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: /tmp/tmps1cxjn7i/lib.o: Relocations in generic ELF (EM: 40)
/tmp/tmps1cxjn7i/lib.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status


What did you change the target to in the deploy script?


For Dynamic

fadd_dylib =, [A, B], "llvm -target=arm-linux-gnueabihf", name="addone")

and System module

fadd_syslib =, [A, B], "llvm --system-lib -target=arm-linux-gnueabihf", name="addonesys")