Skip to content

SIM_LOG_DIR points to "${SCRIPT_DIR:?}"/log rather then /etc/astra-sim which requires sudo priviledges. - #255

Open
marcodamico wants to merge 2 commits into
aliyun:masterfrom
marcodamico:SIM_LOG_DIR_fix
Open

SIM_LOG_DIR points to "${SCRIPT_DIR:?}"/log rather then /etc/astra-sim which requires sudo priviledges.#255
marcodamico wants to merge 2 commits into
aliyun:masterfrom
marcodamico:SIM_LOG_DIR_fix

Conversation

@marcodamico

Copy link
Copy Markdown

This solves #254

@tianhao909
tianhao909 requested a review from CopilotMarch 31, 2026 13:54

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #254 by changing SIM_LOG_DIR in Astra-Sim build scripts from a system-level path (/etc/astra-sim) to a repo-local path ("${SCRIPT_DIR:?}"/log), avoiding the need for sudo during directory creation.

Changes:

  • Update SIM_LOG_DIR in the top-level astra-sim-alibabacloud/build.sh to use a writable repo-local log/ directory.
  • Update SIM_LOG_DIR in astra-sim-alibabacloud/build/astra_ns3/build.sh to use a script-local log/ directory.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

FileDescription
astra-sim-alibabacloud/build/astra_ns3/build.shChanges SIM_LOG_DIR away from /etc/astra-sim to avoid sudo-required paths in the ns3 build script.
astra-sim-alibabacloud/build.shChanges SIM_LOG_DIR away from /etc/astra-sim so the build creates log/input/result directories in a user-writable location.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment threadastra-sim-alibabacloud/build/astra_ns3/build.sh Outdated
Comment threadastra-sim-alibabacloud/build.sh
…a-sim
- export SIM_LOG_DIR from top-level build.sh so child scripts inherit it
- ns3/build.sh inherits parent value or falls back to ../../log (same dir)
- remove undefined BUILD_DIR cd that aborted compile function early
- guard LOG_PATH and RESULT_PATH with #ifndef SIM_LOG_DIR; fall back to
/etc/astra-sim when env var not set at cmake time
- phynet/CMakeLists.txt injects -DSIM_LOG_DIR when env var is present
Closesaliyun#254
@marcodamico

Copy link
Copy Markdown
Author

Use repo-local SIM_LOG_DIR, avoid sudo-required /etc/astra-sim

  • export SIM_LOG_DIR from top-level build.sh so child scripts inherit it
  • ns3/build.sh inherits parent value or falls back to ../../log (same dir)
  • remove undefined BUILD_DIR cd that aborted compile function early
  • guard LOG_PATH and RESULT_PATH with #ifndef SIM_LOG_DIR; fall back to
    /etc/astra-sim when env var not set at cmake time
  • phynet/CMakeLists.txt injects -DSIM_LOG_DIR when env var is present

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@marcodamico