강의

멘토링

커뮤니티

Inflearn Community Q&A

okdori's profile image
okdori

asked

Introduction to and use of Rust, an elegant, high-performance programming language

Implementing Lambda Functions in Rust (Updated 10/23)

build 오류

Resolved

Written on

·

394

·

Edited

0

cargo add ... 이후 build는 정상적으로 되는데, 

 

cargo lambda build --release --arm64 에서 

 

많은 라인의 error와 함께 컴파일하지 못하네요... 

 

구글링해봐도 잘 모르겠어요 

 

error 마지막 몇라인을 첨부합니다...... 

 

error[E0425]: cannot find function drop in this scope

--> /.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.19.0/src/race.rs:401:21

|

401 | drop(unsafe { Box::from_raw(ptr) });

| ^^^^ not found in this scope

error[E0425]: cannot find function, tuple struct or tuple variant Ok in this scope

--> /.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.19.0/src/race.rs:405:13

|

405 | Ok(unsafe { &*ptr })

| ^^ not found in this scope

Some errors have detailed explanations: E0405, E0408, E0412, E0425, E0432, E0463, E0531.

error: could not compile once_cell (lib) due to 241 previous errors

rustwebassembly

Answer 1

0

hatemogi님의 프로필 이미지
hatemogi
Instructor

음, 뭔지 해결하기 어려울 것 같은 불안함이 듭니다만, 혹시 해결될지 모르니, --release arm64 옵션을 빼고 한 번 진행해보시겠어요? 결과가 같을지 모르겠고, 혹시 여전히 안되신다면, 아래 커맨드로 rust설치 버전 상황을 한번 적어봐 주시겠어요?

rustup show
okdori님의 프로필 이미지
okdori
Questioner

뭔가 rust를 rustup으로 설치하지 않아서 꼬였던 거 같습니다.

rust를 삭제 후, rustup으로 설치하니 해결되었습니다.

감사합니다.

hatemogi님의 프로필 이미지
hatemogi
Instructor

해결되었다니 잘됐습니다!

okdori's profile image
okdori

asked

Ask a question