OpenShadingLanguage
OpenShadingLanguage copied to clipboard
Race condition when building testshade_llvm_compiled_rs
In a parallel build, testshade_llvm_compiled_rs.bc
and testshade_llvm_compiled_rs.bc.cpp
are generated two to three times.
The next command can use the truncated result, which is being overwritten by the second or third generation.
This is an example from the build log:
[ 86%] Generating testshade_llvm_compiled_rs.bc
cd /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade && /usr/lib/llvm-15.0/bin/llvm-link -internalize /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/rs_simplerend_host.bc -o /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc
[ 86%] Generating testshade_llvm_compiled_rs.bc.cpp
cd /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/src/testshade && /usr/bin/python3.11 /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/src/build-scripts/serialize-bc.py /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc.cpp testshade_llvm_compiled_rs
[ 87%] Generating testshade_llvm_compiled_rs.bc
cd /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade && /usr/lib/llvm-15.0/bin/llvm-link -internalize /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/rs_simplerend_host.bc -o /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc
[ 90%] Generating testshade_llvm_compiled_rs.bc.cpp
cd /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/src/testshade && /usr/bin/python3.11 /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/src/build-scripts/serialize-bc.py /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc /usr/src/RPM/BUILD/openshadinglanguage-1.12.14.0/x86_64-alt-linux/src/testshade/testshade_llvm_compiled_rs.bc.cpp testshade_llvm_compiled_rs
Versions
- OSL branch/version: 1.12.8.0, 1.12.13.0, 1.12.14.0
- OS: ALT Linux
- C++ compiler: doesn't matter
- LLVM version: doesn't matter
- OIIO version: doesn't matter