rustyscreeps / screeps-starter-rust

Starter Rust AI for Screeps, the JavaScript-based MMO game
MIT License
121 stars 47 forks source link

Compilation error linking with 'cc' failed #26

Closed Jeroendevr closed 3 years ago

Jeroendevr commented 3 years ago

With a fresh install of Rust and a clone of the screeps-starter-rust, I cannot seem to compile the project. Searching for alle the errors given below did not provide a satifying answer. Could some one tell me if this is rustyscreeps related or not?

in screeps-rust/ on master
› cargo build
   Compiling screeps-starter-rust v0.0.0 (/Users/hayer/screeps/screeps-rust)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "-L" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.11p3iva0t1jbdmad.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.14tqmbpe6s9tup61.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.186q4cut9pbmbax8.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1ade1mrwou885bx5.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1brs6iltbkppfxlx.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1coy3h36bv2hjgo1.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1gabjhupgsg67da2.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1k80l2wat0542k04.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1mw19grm9wkb6v6t.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1rvagav4e1tbjc2u.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1u0gncyr18okqen2.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1u18q0tw7gtr3xry.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1u5ssroov473x1xm.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1vgmifpkhivzp02m.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1w5ejv16x0jpujca.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1yiaje2x942k465d.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.1zm1o8yppnfx8beg.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.20sufix3zwjq6xe.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2an3p7qqk7b8t59z.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2d0hfha5p4laoepj.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2iaildtkg4jgdwz0.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2je0nxzues7r84gz.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2myv03vwyvjffcuz.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2ng8wcq40sxzr52n.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2p5ogc0fqc0jcb7c.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2phc87qa0tb44n61.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2sv3ydxisjrfkq57.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2tq2bveqvhe1y8h1.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2wrcty71vz1ic9p0.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2y25d3hafkgbcd3g.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.2y9wqca809lfngcb.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.332e62toz2uf3veq.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.34fqud0y3am62dwc.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.35g5si9yh2xg2wv2.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.36ed1jcusvtz8tom.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3ayqqrl8skavs73z.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3i6wzg98wz8jh5q1.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3l1boeowutctvfwj.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3m62kyaxgykarr47.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3n1oxa3hff787quv.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3qgkw8v3qal2grhn.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3qxx5r5md6cl3wzb.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3si6kpzb4gj4dktj.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3vb41g2ob9plmgci.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3wi4ts5owyi4g5hj.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.3z19zf7b1jfwatm1.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.40adjr26l8bnuu3g.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.40oz6p06qg4c1k26.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.40zz0684rfrsn7n7.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.440wrr475sejivy1.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.481eny9x59n2ittz.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.4b75lcv8qj2lj498.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.4cmir49egkz2x50e.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.4e0xjld8elh6zpkd.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.4gut8fs3hl4fvxlg.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.4imzvpuiqyn60xgz.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.4m0z0akd2sx8q6bl.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.4r7ceg43yycyowkf.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.4rqokd0hsed86crd.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.4uq4tu2lp0eddb3.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.4ww6a0yz0hihjr0s.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.55t21dn7mc7wl0es.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.584pexro43t9qw34.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.5b6x468wou86f80r.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.5by9isu4dwmx7mnt.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.5c2anf7jo0r6g38n.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.5dvox0svw2f2x2sx.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.5gceyqz0mfac8g1g.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.73xj3qpdfrxuh7b.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.90o7aokptgkwvps.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.b2t9s271pl6ft1z.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.d1kfcsmodntvgur.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.gyeflo6tfove95y.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.ivtoge9vqk6ery2.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.jo97wekwkdqbwp.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.mjfhhqvcfcju4tt.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.wnjyadvzxz9nxn2.rcgu.o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.xdhr6adnah6zkwd.rcgu.o" "-o" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust" "/Users/hayer/screeps/screeps-rust/target/debug/deps/screeps_starter_rust.26cc4ci6e9a2b29y.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/hayer/screeps/screeps-rust/target/debug/deps" "-L" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libfern-a0d1e477d7da05c3.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libscreeps-a900120d6c0586c5.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libarrayvec-6d51809c1c1def69.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libnodrop-e80717935356bbff.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libnum_traits-eeff9e611c72b7a6.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libenum_iterator-b53b51890cbada61.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libparse_display-cf6b3e0fee0c7efe.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libregex-bfdb1ef6f736a1e2.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libregex_syntax-c42f4f17a3e8e34b.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libaho_corasick-b5f81808402a7aca.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libmemchr-c90eab3b23250595.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/liblazy_static-a553e3df3e33cbf6.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libstdweb-08240ea014d10ff8.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libdiscard-f8cfe6d453ef3b18.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libstdweb_internal_runtime-0683e7bd287481ab.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libserde_json-7c0114806309cc3d.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libryu-ed81dc0a17a095f7.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libitoa-39794a2157276f56.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libserde-c263797f4925c5c3.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/liblog-a14db8c5c0a1bf56.rlib" "/Users/hayer/screeps/screeps-rust/target/debug/deps/libcfg_if-57900d42b3f524f3.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/libstd-464108ccfc343487.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-b837df7decd035e0.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/libobject-4acdb7486e4bb68a.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-9da0336335f0cdae.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/libgimli-0f5303c7f62a7953.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-724b6cdcb55d42e1.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-8491d66a7ccb2981.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-10cf1625badc0b4a.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/libunwind-ac9168a39eb967e4.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-ede8135f00f2da42.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/liblibc-f5569de1c547002d.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/liballoc-61f66fb4472b4a11.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-da32868f8bcc0cd6.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/libcore-9e9a840bdb5d7adb.rlib" "/usr/local/Cellar/rust/1.51.0/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-fb529a3d4a8285ff.rlib" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: Undefined symbols for architecture x86_64:
            "_emscripten_asm_const_int", referenced from:
                _$LT$screeps_starter_rust..logging..JsLog$u20$as$u20$log..Log$GT$::log::snippet::__cargo_web_snippet_199d5eb25dfe761687bcd487578eb7e636bd9650::h2848914c06477dae in screeps_starter_rust.2y9wqca809lfngcb.rcgu.o
                _$LT$screeps_starter_rust..logging..JsNotify$u20$as$u20$log..Log$GT$::log::snippet::__cargo_web_snippet_f850f16221f3b798317e8eb101b7f82ca3948a08::h32ec7055669ae36a in screeps_starter_rust.2y9wqca809lfngcb.rcgu.o
                screeps_starter_rust::main::snippet::__cargo_web_snippet_7fb3858a72fd1ed4a1ec05fda1c86328341d2209::h186b5cec71321b24 in screeps_starter_rust.4e0xjld8elh6zpkd.rcgu.o
                screeps::game::spawns::values::snippet::__cargo_web_snippet_cbb71603d41135125be2ba07c517bea433d6b1c6::h2ccae572437e4366 in libscreeps-a900120d6c0586c5.rlib(screeps-a900120d6c0586c5.screeps.a3mgjqb2-cgu.13.rcgu.o)
                screeps::memory::MemoryReference::bool::snippet::__cargo_web_snippet_33307258eb68bacf04296ea3e0a511428cae9061::hb92873047c631256 in libscreeps-a900120d6c0586c5.rlib(screeps-a900120d6c0586c5.screeps.a3mgjqb2-cgu.13.rcgu.o)
                screeps::memory::MemoryReference::dict::snippet::__cargo_web_snippet_6c2317ad659ee88341afa4853bf7eca22150cc52::h58ff32f15f9e1c39 in libscreeps-a900120d6c0586c5.rlib(screeps-a900120d6c0586c5.screeps.a3mgjqb2-cgu.13.rcgu.o)
                screeps::memory::MemoryReference::keys::snippet::__cargo_web_snippet_68abaca379ae7bcd742821109e1db18c3f58ea0c::h84bb32fdc0535b1c in libscreeps-a900120d6c0586c5.rlib(screeps-a900120d6c0586c5.screeps.a3mgjqb2-cgu.13.rcgu.o)
                ...
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error

error: could not compile `screeps-starter-rust`

To learn more, run the command again with --verbose.
Azaril commented 3 years ago

You'll want to use 'cargo screeps build' or one of the 'screeps' commands. Try 'cargo screeps --help' to get available options.

Just doing a 'cargo build' will build for the x86/x64 target which isn't supported.

Jeroendevr commented 3 years ago

@Azaril thank you for providing the solution and an explanation, It's been a while since I was working with rust.