Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when compiling with generate-api-description crate feature #44

Closed
sekisamu opened this issue Apr 8, 2019 · 5 comments
Closed
Labels
A-ink_lang [ink_lang] Work item C-bug Something isn't working

Comments

@sekisamu
Copy link
Contributor

sekisamu commented Apr 8, 2019

after I have added

generate-api-description = [
    "pdsl_lang/generate-api-description",
]

under [features] in Cargo.toml
and then I run:

cargo build --release --features=generate-api-description --verbose

I got an error below:

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-L" "/Users/hammer/.rustup/toolchains/nightly-2019-03-10-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/hammer/Desktop/flipper/target/release/deps/flipper.flipper.8f0qzq8t-cgu.3.rcgu.o" "-o" "/Users/hammer/Desktop/flipper/target/release/deps/libflipper.dylib" "-Wl,-exported_symbols_list,/var/folders/fv/qyvr1f6s5rl_c3d6r60f5ltm0000gq/T/rustc4osvKZ/list" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/hammer/Desktop/flipper/target/release/deps" "-L" "/Users/hammer/.rustup/toolchains/nightly-2019-03-10-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/hammer/.rustup/toolchains/nightly-2019-03-10-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-43b88c2e4123a11d.rlib" "-lc" "-lm" "-dynamiclib" "-Wl,-dylib"
  = note: Undefined symbols for architecture x86_64:
            "_ext_get_storage", referenced from:
                _$LT$pdsl_core..storage..cell..sync_cell..SyncCell$LT$T$GT$$GT$::get::h8bffa66abf59395b in flipper.flipper.8f0qzq8t-cgu.3.rcgu.o
            "_ext_scratch_size", referenced from:
                _$LT$pdsl_core..storage..cell..sync_cell..SyncCell$LT$T$GT$$GT$::get::h8bffa66abf59395b in flipper.flipper.8f0qzq8t-cgu.3.rcgu.o
            "_ext_scratch_copy", referenced from:
                _$LT$pdsl_core..storage..cell..sync_cell..SyncCell$LT$T$GT$$GT$::get::h8bffa66abf59395b in flipper.flipper.8f0qzq8t-cgu.3.rcgu.o
            "_ext_set_storage", referenced from:
                _$LT$pdsl_core..storage..cell..sync_cell..SyncCell$LT$T$GT$$u20$as$u20$pdsl_core..storage..flush..Flush$GT$::flush::h1ae42a8a1c3162d8 in flipper.flipper.8f0qzq8t-cgu.3.rcgu.o
            "_ext_input_size", referenced from:
                pdsl_core::env::api::input::h057e5735ba04f2b8 in flipper.flipper.8f0qzq8t-cgu.3.rcgu.o
            "_ext_return", referenced from:
                _$LT$pdsl_core..env..srml..srml_only..impls..SrmlEnv$LT$T$GT$$u20$as$u20$pdsl_core..env..traits..Env$GT$::return::h436b4ea078387302 in flipper.flipper.8f0qzq8t-cgu.3.rcgu.o
            "_ext_input_copy", referenced from:
                pdsl_core::env::api::input::h057e5735ba04f2b8 in flipper.flipper.8f0qzq8t-cgu.3.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 `flipper`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name flipper src/lib.rs --color always --crate-type cdylib --emit=dep-info,link -C opt-level=z -C panic=abort -C lto --cfg 'feature="default"' --cfg 'feature="generate-api-description"' --cfg 'feature="pdsl_lang"' -C metadata=0e77105c2e752b9a --out-dir /Users/hammer/Desktop/flipper/target/release/deps -L dependency=/Users/hammer/Desktop/flipper/target/release/deps --extern parity_codec=/Users/hammer/Desktop/flipper/target/release/deps/libparity_codec-c20356003e85c6d5.rlib --extern pdsl_core=/Users/hammer/Desktop/flipper/target/release/deps/libpdsl_core-3cdfb4d01cca5f5b.rlib --extern pdsl_lang=/Users/hammer/Desktop/flipper/target/release/deps/libpdsl_lang-4faf84eb9a4c8b6e.dylib --extern pdsl_model=/Users/hammer/Desktop/flipper/target/release/deps/libpdsl_model-10235a5d7017a8d8.rlib` (exit code: 1)
@sekisamu
Copy link
Contributor Author

sekisamu commented Apr 8, 2019

Anyway, I got that json file. with this error.

1 similar comment
@sekisamu
Copy link
Contributor Author

sekisamu commented Apr 8, 2019

Anyway, I got that json file. with this error.

@Robbepop Robbepop added A-ink_lang [ink_lang] Work item C-bug Something isn't working labels Apr 8, 2019
@Robbepop Robbepop changed the title can not compile while needed feature added Errors when compiling with generate-api-description crate feature Apr 8, 2019
@cmichi
Copy link
Collaborator

cmichi commented May 31, 2019

@hammeWang Do you still get this error?

We have

generate-api-description = [
    "ink_lang/generate-api-description"
]

in examples/lang/flipper/Cargo.toml now and if I compile that example with cargo build --release --features=generate-api-description --verbose it runs successfully.

@Robbepop
Copy link
Collaborator

Robbepop commented Aug 8, 2019

Feature deprecated and superseeded by #104.

Can be closed once merged.

@Robbepop
Copy link
Collaborator

Merged. Closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ink_lang [ink_lang] Work item C-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants