DrawingProcess
드프 DrawingProcess
DrawingProcess
전체 방문자
오늘
어제
«   2025/07   »
일 월 화 수 목 금 토
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
  • 분류 전체보기 (969)
    • Profile & Branding (25)
      • Career (18)
    • IT Trends (254)
      • Conference, Faire (Experien.. (31)
      • News (187)
      • Youtube (19)
      • TED (8)
      • Web Page (2)
      • IT: Etc... (6)
    • Contents (98)
      • Book (67)
      • Lecture (31)
    • Project Process (94)
      • Ideation (0)
      • Study Report (34)
      • Challenge & Award (22)
      • 1Day1Process (5)
      • Making (5)
      • KRC-FTC (Team TC(5031, 5048.. (10)
      • GCP (GlobalCitizenProject) (15)
    • Study: ComputerScience(CS) (72)
      • CS: Basic (9)
      • CS: Database(SQL) (5)
      • CS: Network (14)
      • CS: OperatingSystem (3)
      • CS: Linux (39)
      • CS: Etc... (2)
    • Study: Software(SW) (95)
      • SW: Language (29)
      • SW: Algorithms (1)
      • SW: DataStructure & DesignP.. (1)
      • SW: Opensource (15)
      • SW: Error Bug Fix (43)
      • SW: Etc... (6)
    • Study: Artificial Intellige.. (149)
      • AI: Research (1)
      • AI: 2D Vision(Det, Seg, Tra.. (35)
      • AI: 3D Vision (70)
      • AI: MultiModal (3)
      • AI: SLAM (0)
      • AI: Light Weight(LW) (3)
      • AI: Data Pipeline (7)
      • AI: Machine Learning(ML) (1)
    • Study: Robotics(Robot) (33)
      • Robot: ROS(Robot Operating .. (9)
      • Robot: Positioning (8)
      • Robot: Planning & Control (7)
    • Study: DeveloperTools(DevTo.. (83)
      • DevTool: Git (12)
      • DevTool: CMake (13)
      • DevTool: NoSQL(Elastic, Mon.. (25)
      • DevTool: Container (17)
      • DevTool: IDE (11)
      • DevTool: CloudComputing (4)
    • 인생을 살면서 (65) N
      • 나의 취미들 (7)
      • 나의 생각들 (42)
      • 여행을 떠나자~ (10)
      • 분기별 회고 (6) N

개발자 명언

“ 매주 목요일마다 당신이 항상 하던대로 신발끈을 묶으면 신발이 폭발한다고 생각해보라.
컴퓨터를 사용할 때는 이런 일이 항상 일어나는데도 아무도 불평할 생각을 안 한다. ”

- Jef Raskin

맥의 아버지 - 애플컴퓨터의 매킨토시 프로젝트를 주도

인기 글

최근 글

최근 댓글

티스토리

hELLO · Designed By 정상우.
DrawingProcess

드프 DrawingProcess

[Error fix] 'incremental compilation: could not create session directory lock file: No locks available' 오류 해결(feat. Rust Cargo profiles)
Study: Software(SW)/SW: Error Bug Fix

[Error fix] 'incremental compilation: could not create session directory lock file: No locks available' 오류 해결(feat. Rust Cargo profiles)

2023. 1. 5. 17:46
반응형

# 문제 상황

Rust를 초기에 세팅하는 과정에서 새로운 패키지(hello_rust)를 만들고 'cargo build' 를 통해 빌드하려다보니 다음과 같은 오류가 발생하였다.

# 해결 방안

방법 1: Cargo.toml 파일에 추가(권장)

[profile.dev]
incremental = false

방법 2: 방법 1로 해결하는 것이 Rust 가 권장(?)하는 세팅이다.

incremental compilation 오류의 경우 경로문제인 듯하다. 따라서 경로설정을 해주고 build를 하면 성공하게 된다.

// 현재 경로에서 빌드
$ CARGO_INCREMENTAL=0 cargo build
// /tmp 경로에서 빌드
$ CARGO_TARGET_DIR=/tmp cargo build

이 경우에 실행할 때에 있어서도 붙여주어야 한다.

// target/ 경로에서 빌드
$ CARGO_INCREMENTAL=0 cargo run
// /tmp 경로에서 빌드
$ CARGO_TARGET_DIR=/tmp cargo run

따라서 불편함을 방지하고자 ~/.bashrc 파일에 변수를 지정해주면 편하게 빌드 및 실행을 할 수 있다.

$ nano ~/.bashrc
...
expert CARGO_INCREMENTAL=0
...
$ source ~/.bashrc
$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/hello_rust`
Hello, world!

# 참고

  • [Rust Official Doc] profiles: https://doc.rust-lang.org/cargo/reference/profiles.html
  • [Rust Official Doc] profile.dev: https://doc.rust-lang.org/cargo/reference/profiles.html#dev
  • [Rust Blog] imcremental Compilation: https://blog.rust-lang.org/2016/09/08/incremental.html
  • [Github Issue] incremental compilation: could not create session directory lock file: No locks available (os error 37) #49773: https://github.com/rust-lang/rust/issues/49773
  • [Github Issue] #49773 Solution Comment: https://github.com/rust-lang/rust/issues/49773#issuecomment-752231203
반응형
저작자표시 비영리 변경금지 (새창열림)

'Study: Software(SW) > SW: Error Bug Fix' 카테고리의 다른 글

[Error fix] 'fatal: refusing to merge unrelated histories' git 오류 해결  (0) 2023.01.09
[Error fix] 'zsh: command not found: code' 오류 해결 (feat. 특정 폴더에서 VSCode 실행하기)  (0) 2023.01.06
[Error fix] '맥북 저장공간 부족' 문제 해결(feat. 맥북 캐시 메모리 삭제 하는 방법)  (0) 2023.01.02
[Error fix] 'Error: ENOENT: no such file or directory, uv_cwd' 오류 해결  (0) 2022.11.16
[Error fix] 'linux df 명령어에서 파일을 지워도 가용공간(Available)이 늘어나지 않는 경우' 문제 해결  (0) 2022.10.24
    'Study: Software(SW)/SW: Error Bug Fix' 카테고리의 다른 글
    • [Error fix] 'fatal: refusing to merge unrelated histories' git 오류 해결
    • [Error fix] 'zsh: command not found: code' 오류 해결 (feat. 특정 폴더에서 VSCode 실행하기)
    • [Error fix] '맥북 저장공간 부족' 문제 해결(feat. 맥북 캐시 메모리 삭제 하는 방법)
    • [Error fix] 'Error: ENOENT: no such file or directory, uv_cwd' 오류 해결
    DrawingProcess
    DrawingProcess
    과정을 그리자!

    티스토리툴바