Linker errors when compiling rust bindings

Hi all,

I’m trying to compile the rust examples from the master branch. Most of it compiles and runs without problems, except for the resnet example. I get the following linker errors

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/kai/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.1a8zsziqej8y737o.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.1be2zc345l4kbblx.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.1ccy2qo6165alq53.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.1cr7ph2s610iumjy.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.1h27wt5wlrnnj3ge.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.1ifn14w3pjplyzij.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.1kuh4q78gvaddwpp.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.1qzpiij2l8v95rp1.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.1v2ek3p7xcwrkogk.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.1xfmtel4cqzgss0d.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.217ez7glovu0uhv6.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.23l8j065s47zvb13.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.28jilbmj3lmqw5tx.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.29vtzlysa3fitl4f.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2avejs96kdf66y98.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2cab2yqrpgukp1up.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2djpdezgi4hsjjjp.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2e2dleydtk0yydi5.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2es8nr08rl9d0jbs.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2ew92nznujyfj4cm.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2g79ywasd2vc2oy3.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2i5woqwfbiku5580.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2jeih3r533xqqjew.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2jfhvb2vobdidujl.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2k36wiuqd1a0fab9.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2ki4plmukg1rjq8g.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2mvt1u76dqtzbrqn.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2n0m1uzeuja969zt.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2ozze3jatd9n8d0b.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2qmb8yt9c35q2ds1.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2ukk910i5osaertd.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2w0a02w2ra4k2rip.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2wo7y7uxc0epbtjw.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.2ys1j1cc1xsn8ec8.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.30u5arql91h25kax.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.31d1gwyjvv8mgfwh.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.326ffzb95y30xegq.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.33i2ih1ahrdj8b7v.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.35j9mr2dqq5j75ii.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3811espqb4q49t7x.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3bk0dio65u0b08wd.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3bvmwbeey6wnxghl.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3c47naw5ajhl74l2.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3edl8wohz6wwekq6.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3j5nomkvt663vcn8.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3p26pa1fper9zop2.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3r57eqy7udet5tx9.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3x3ixgii04pbhzm2.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3xra8t44ogvh9rk9.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3ya7302kifxheqwr.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.3zo5fbettc8k87kp.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.442ur3ugcg1octcm.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.45z83cw9w2hw058r.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.470s2w4zvxjjxfyf.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.47ck8g1crra09zxs.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4b9qesoe9w67k6dc.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4b9qf8vrw8xkx7k9.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4brztu4ljo405xxx.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4c5sf2347rxshbbp.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4cqc9yccpv9pllmq.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4f7jb3gydxmttynx.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4hphwhqrfqguqyz1.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4k07d5lejul7ua1f.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4niyk19vbyvjk9f7.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4owar8rxw7fymn2f.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4quafunyvqhttdit.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4rm7s2gk4acfll3f.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4szqd15822zv839x.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4us41bn2bpahb0nq.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4xuvx981uova9s0m.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4xvreglz0yk9fjti.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.4z4sdy0dqy7shnxt.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.523vy67jxex10wjr.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.53yx03vzp5r39tw2.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.55mvlhur4pwvjcvh.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.55prkf93fpymts5s.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.5at1bojy0p9ebp80.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.5dcc6b56q045p78s.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.5fu226f878s6mweu.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.5fwg8nmr6qes6moe.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.5zableek1g9jai7.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.84xatvkmiqbup7o.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.biznkflfvbczy77.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.cwcs8gjz8ikxhn.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.hvnd4mg8nfglshi.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.ir31f5hb8epk1x6.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.reqv71m9at0p7r9.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.s3yh9tyci3we5sp.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.t2fleqvxt0pahw2.rcgu.o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7.ugzjyaftun19vge.rcgu.o" "-o" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/resnet-691a69e7d51fecd7" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps" "-L" "/home/kai/dev/tvm-vanilla/rust/frontend/examples/resnet" "-L" "/home/kai/dev/tvm-vanilla/rust/target/debug/build/backtrace-sys-4b6c3faec33029a6/out" "-L" "/home/kai/dev/tvm-vanilla/build" "-L" "/home/kai/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps" "-ltvm_frontend" "-Wl,-Bstatic" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libimage-520bb054348298ba.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libtiff-1b281606e3de126b.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libpng-06388cbfc97e0951.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libdeflate-507527200c22e0f1.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libinflate-befd39f7863c896b.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libadler32-6b7e7b87ee19b4e5.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libbitflags-add8750865ff4dcc.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libjpeg_decoder-9a1365fe042d5693.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/librayon-dd701999adefdc47.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/librayon_core-caddb623343b429e.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libnum_cpus-ce92ffe48989180b.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libcrossbeam_queue-a756a6b576a54921.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libcrossbeam_deque-766832e6ce6a0398.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libcrossbeam_epoch-c83cc1e2c707e6a3.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libscopeguard-0076951315d39184.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libmemoffset-f3244a89985f30bc.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libcrossbeam_utils-b298b5a0c28e54ce.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libarrayvec-6f9ba77963cef7b8.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libnodrop-15622afff8fd3934.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libscoped_threadpool-952a6750f75d9122.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libgif-6383a60641720eca.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libcolor_quant-0f15b342b7b79b78.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libnum_rational-d05268c26e19e34e.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libnum_iter-2d3848e82bd36136.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libnum_integer-006a2726c638a19e.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/liblzw-bbb676a83459dba8.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libcsv-2cae17f5ab0ca25b.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libryu-1aa8a5e8a14b4762.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libitoa-d864e5ce7f48b871.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libcsv_core-57a8a0b7a76c185e.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libbstr-806b7544964f8d1d.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libregex_automata-42b24b4de8b1b8b8.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libbyteorder-2e8a7f03588b2f17.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libmemchr-27e87b693d1906ad.rlib" "/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libserde-ff3bc4588a3583eb.rlib" "-Wl,--start-group" "-L" "/home/kai/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bdynamic" "-lstd-2d960816227c2f17" "-Wl,--end-group" "-Wl,-Bstatic" "/home/kai/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-916c11a818639f9e.rlib" "-Wl,-Bdynamic" "-ltvm_runtime" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: /usr/bin/ld: /home/kai/dev/tvm-vanilla/rust/target/debug/deps/libimage-520bb054348298ba.rlib(image-520bb054348298ba.image.76q0xccs-cgu.13.rcgu.o): in function `<core::str::Chars as core::iter::traits::iterator::Iterator>::next':
          /rustc/2d1a551e144335e0d60a637d12f410cf65849876/src/libcore/str/mod.rs:568: undefined reference to `core::str::next_code_point'
          /usr/bin/ld: /rustc/2d1a551e144335e0d60a637d12f410cf65849876/src/libcore/str/mod.rs:568: undefined reference to `core::option::Option<T>::map'
          /usr/bin/ld: /home/kai/dev/tvm-vanilla/rust/target/debug/deps/libtiff-1b281606e3de126b.rlib(tiff-1b281606e3de126b.tiff.1yo1rg1w-cgu.6.rcgu.o): in function `<core::str::Chars as core::iter::traits::iterator::Iterator>::next':
          /rustc/2d1a551e144335e0d60a637d12f410cf65849876/src/libcore/str/mod.rs:568: undefined reference to `core::str::next_code_point'
          /usr/bin/ld: /rustc/2d1a551e144335e0d60a637d12f410cf65849876/src/libcore/str/mod.rs:568: undefined reference to `core::option::Option<T>::map'
          /usr/bin/ld: /home/kai/dev/tvm-vanilla/rust/target/debug/deps/libpng-06388cbfc97e0951.rlib(png-06388cbfc97e0951.png.8d9to288-cgu.2.rcgu.o): in function `png::utils::expand_trns_line':
          /home/kai/.cargo/registry/src/github.com-1ecc6299db9ec823/png-0.12.0/src/utils.rs:45: undefined reference to `core::cmp::impls::<impl core::cmp::PartialEq<&B> for &A>::eq'
          /usr/bin/ld: /home/kai/dev/tvm-vanilla/rust/target/debug/deps/libpng-06388cbfc97e0951.rlib(png-06388cbfc97e0951.png.8d9to288-cgu.2.rcgu.o): in function `png::utils::expand_trns_line16':
          /home/kai/.cargo/registry/src/github.com-1ecc6299db9ec823/png-0.12.0/src/utils.rs:65: undefined reference to `core::cmp::impls::<impl core::cmp::PartialEq<&B> for &A>::eq'
          /usr/bin/ld: /home/kai/dev/tvm-vanilla/rust/target/debug/deps/libnum_rational-d05268c26e19e34e.rlib(num_rational-d05268c26e19e34e.num_rational.agc04qai-cgu.1.rcgu.o): in function `<f32 as num_traits::cast::ToPrimitive>::to_u8':
          /home/kai/.cargo/registry/src/github.com-1ecc6299db9ec823/num-traits-0.2.8/src/cast.rs:309: undefined reference to `core::mem::size_of'
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: Could not compile `resnet`.

Caused by:
  process didn't exit successfully: `rustc --crate-name resnet frontend/examples/resnet/src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=691a69e7d51fecd7 -C extra-filename=-691a69e7d51fecd7 --out-dir /home/kai/dev/tvm-vanilla/rust/target/debug/deps -C incremental=/home/kai/dev/tvm-vanilla/rust/target/debug/incremental -L dependency=/home/kai/dev/tvm-vanilla/rust/target/debug/deps --extern csv=/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libcsv-2cae17f5ab0ca25b.rlib --extern image=/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libimage-520bb054348298ba.rlib --extern ndarray=/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libndarray-58b36276fc1f4fa7.rlib --extern tvm_frontend=/home/kai/dev/tvm-vanilla/rust/target/debug/deps/libtvm_frontend.so -L native=/home/kai/dev/tvm-vanilla/rust/frontend/examples/resnet -L native=/home/kai/dev/tvm-vanilla/rust/target/debug/build/backtrace-sys-4b6c3faec33029a6/out -L /home/kai/dev/tvm-vanilla/build` (exit code: 1)

I have never seen such errors in rust before and am not sure how to debug this. I’m using the latest nightly rustc 1.38.0-nightly (2d1a551e1 2019-08-08) on ubuntu 19.04.

I tried both the master as well as @nhynes’ new-sgx branch.

Any help would be appreciated.

Just in case somebody else runs into this: It seems like a compiler bug. Older rust toolchains seem to compile it fine.

Hi, @kaimast, I am seeing the same error. What is the version of the rust toolchain you tried that does not have this bug?
@nhynes, could you please give some insights on understanding this compiler bug?

I didn’t try to figure out what the exact version is it breaks on but if you use a nightly toolchain from June (or earlier) it should work fine.

If you use rustup you can install an older toolchain like this

rustup install nightly-2019-06-01-x86_64-unknown-linux-gnu
rustup default nightly-2019-06-01-x86_64-unknown-linux-gnu
1 Like

@kaimast, thanks a lot. The toolchain of this version works for me too. Still look forward to knowing more about the compiler bug.

It might make sense to file a bug with the rust project. I hope at some point we can build the rust bindings without having to use nightly.

After. updating the OS from 10.12 to 10.14 Catalina then I have started getting this issue, So to solve this incompatible issue I have updated my Xcode developer kit using. below command and its started working out, so please try it once, I have tried and its solved now…I can execute my cargo and its working as expected

xcode-select --install

1 Like

Great, that really me helped