AcademySoftwareFoundation / AcademySoftwareFoundation/OpenRV

[Bug]: `unset [name]; export [name]=value; source rvcmds.sh` has no effect

Open Beginner friendly
#1,322 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
764
Forks
246
Avg merge
6d 12h
Merged PRs (30d)
13

Description

### What happened?

`rvcmds.sh` does not behave as expected.

```
# source /rv_git/OpenRV/rvcmds.sh
RV_VFX_PLATFORM already set to CY2024.
Using Qt 6.5 installation already set at /opt/Qt/6.5.3/gcc_64
Please ensure you have installed any required dependencies from doc/build_system/config_[os]

CMake parameters:
RV_BUILD_PARALLELISM is 8
RV_HOME is /rv_git/OpenRV
RV_BUILD_DIR is /rv_git/OpenRV/_build
RV_INST_DIR is /rv_git/OpenRV/_install
CMAKE_GENERATOR is Ninja
QT_HOME is /opt/Qt/6.5.3/gcc_64

To override any of them do unset [name]; export [name]=value; source /rv_git/OpenRV/rvcmds.sh

Use 'rvrelease' (default) or 'rvdebug' to switch between build configurations.
Call 'rvbootstrap' if its your first time building or after calling rvclean.
After 'rvbootstrap', use 'rvbuild' or 'rvmk' for incremental builds.

If build fails, use 'rverrsummary' to see error summary or 'rverrors' to view full log.
```

Ok, `To override any of them do unset [name]; export [name]=value; source /rv_git/OpenRV/rvcmds.sh`:

```
# unset RV_BUILD_DIR; export RV_BUILD_DIR=/rv_build; source /rv_git/OpenRV/rvcmds.sh
RV_VFX_PLATFORM already set to CY2024.
Using Qt 6.5 installation already set at /opt/Qt/6.5.3/gcc_64
Please ensure you have installed any required dependencies from doc/build_system/config_[os]

CMake parameters:
RV_BUILD_PARALLELISM is 8
RV_HOME is /rv_git/OpenRV
RV_BUILD_DIR is /rv_git/OpenRV/_build
RV_INST_DIR is /rv_git/OpenRV/_install
CMAKE_GENERATOR is Ninja
QT_HOME is /opt/Qt/6.5.3/gcc_64

To override any of them do unset [name]; export [name]=value; source /rv_git/OpenRV/rvcmds.sh

Use 'rvrelease' (default) or 'rvdebug' to switch between build configurations.
Call 'rvbootstrap' if its your first time building or after calling rvclean.
After 'rvbootstrap', use 'rvbuild' or 'rvmk' for incremental builds.

If build fails, use 'rverrsummary' to see error summary or 'rverrors' to view full log.
```

Had no effect.

```
# mkdir -p /rv_build
# unset RV_BUILD_DIR; export RV_BUILD_DIR=/rv_build; source /rv_git/OpenRV/rvcmds.sh
RV_VFX_PLATFORM already set to CY2024.
Using Qt 6.5 installation already set at /opt/Qt/6.5.3/gcc_64
Please ensure you have installed any required dependencies from doc/build_system/config_[os]

CMake parameters:
RV_BUILD_PARALLELISM is 8
RV_HOME is /rv_git/OpenRV
RV_BUILD_DIR is /rv_git/OpenRV/_build
RV_INST_DIR is /rv_git/OpenRV/_install
CMAKE_GENERATOR is Ninja
QT_HOME is /opt/Qt/6.5.3/gcc_64

To override any of them do unset [name]; export [name]=value; source /rv_git/OpenRV/rvcmds.sh

Use 'rvrelease' (default) or 'rvdebug' to switch between build configurations.
Call 'rvbootstrap' if its your first time building or after calling rvclean.
After 'rvbootstrap', use 'rvbuild' or 'rvmk' for incremental builds.

If build fails, use 'rverrsummary' to see error summary or 'rverrors' to view full log.
```

Also, no effect with existing `/rv_build` directory.

### List all the operating systems versions where this is happening

Rocky 9.8

### On what computer hardware is this happening?

x86_64

### Relevant console log output

```shell

```

### Environment variables

_No response_

### Extra information

_No response_

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Start by reading rvcmds.sh, focusing on how RV_BUILD_DIR and the other environment variables are initialized when the script is sourced. Reproduce the Rocky 9.8 example with an unset and exported RV_BUILD_DIR, including an existing /rv_build directory. Done means the displayed CMake parameters and subsequent build commands use the caller-provided value.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, shell
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.