I have successfully built OCCT using Cmake, VS Code and Fedora linux 42, but when I try to run draw.sh, I get this error: “couldn't read file ‘/home/winet/Documents/OCCT/build/src/DrawResources/DrawDefault’: no such file or directory”. The problem is that I built OCCT with the “BUILD_RESOURCES” flag enabled. Supposedly, it should have copied the resources to src inside the build directory, but it didn't.
What am I doing wrong?
Discussion
4 archived replies
Posts are displayed in their archived order.
01Commenter-1
The problem is that I built OCCT with the “BUILD_RESOURCES” flag enabled. Supposedly, it should have copied the resources to src inside the build directory, but it didn't.
BUILD_RESOURCES configuration option ("Enables regeneration of OCCT resource files" in description) has nothing to do with copying any files. What it does is regeneration of special textual resource files like src/Shaders/Shaders_Declarations_glsl.pxx which are embedded directly into binaries (compiled as C++ constants) from their original files like src/Shaders/Shaders_Declarations_glsl. This flag is useful only to developers of OCCT itself, when they modify such resources.
draw.sh within the build directory should configure environment variables like $DRAWDEFAULT pointing to the source code of OCCT. And INSTALL target in CMake should copy resources to installation folder and generate draw.sh pointing variables to appropriate location.
Cannot say what goes wrong in your case - try looking into generated draw.sh to see if there is something specious. And if you still have the problem - try sharing information about exact version of OCCT you are trying to build, how it is built, and if there are other OCCT versions already installed in the system.
02Commenter-2
Dear Author,
Do you use one of the latest "master"? If yes - please try to check V7_9_0 tag, master can have some issues after reorganization. From my side, on Ubuntu using "build" result were no issues. If not - just for my information, could you please share the version or commit hash?
As temporary option, could you please use result of "INSTALL", inside install folder will be own draw.sh.
Best regards, Commenter-2.
03Commenter-3
Hello.
I'm expecting similar issues. I have build OCCT v7.9.1 via
mkdir build.debug
cd build.debug
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_MODULE_Draw:BOOL=TRUE -DINSTALL_DIR=`pwd`/install '-DCMAKE_INSTALL_RPATH=$ORIGIN/../lib' -DCMAKE_BUILD_WITH_INSTALL_RPATH:Bool=True ..
make -j`nproc` && make install
And then, when I launch draw I get the error:
./install/bin/DRAWEXE
couldn't read file "/usr/share/opencascade/resources/DrawResources/DrawDefault": no such file or directory
When I try to launch it via
./install/bin/draw.sh
Hint: use "pload ALL" command to load standard commands
./install/bin/draw.sh: line 10: DRAWEXE: command not found
I get the error above.
Could you, please, help?
04Commenter-2
Hello.
Starting DRAWEXE just as EXE is not recommended and not works from the first try.