Failure to build qt OCCTOverview

Hey guys, I am new to occt, and was learning the tutorial. I can not build the qt OCCTOverview sample, I have defined the custom.bat, set the environment.But i still get the error.

Attachments: 
Dmitrii Pasukhin's picture

You use the new vesion of Qt, I'm not sure that it supported.

As for a problem with script, please copy-past path from warning and check that this path is exist.

Additionally, use one type of slash "\\ /". In some cases bat files have some trouble with slashes.

Best regards, Dmitrii.

benj5378's picture

Hi Dmitrii

I am also having an issue with the Qt OCCTOverview - it seems like it doesn't work out-of-the-box. Perhaps consider having a test script?

According to the ReadMe.md, to install, I have to run the make.sh. This yields a mkdir error, due to shell variable RES_DIR not being defined. It seems like it isn't being retrieved by env.sh as should have been. echo RES_DIR inside env.sh shows that the script itself can in fact define RES_DIR.

And even after this I get errors like

WARNING: Failure to find: /qt/../OCCTOverview/code/*.cxx
WARNING: Failure to find: /qt/../OCCTOverview/code/Samples.qrc
WARNING: Failure to find: /qt/../OCCTOverview/code/*.h
WARNING: Failure to find: /qt/../OCCTOverview/code/*.cxx
WARNING: Failure to find: /qt/../OCCTOverview/code/Samples.qrc
WARNING: Failure to find: /qt/../OCCTOverview/code/*.h

I'm on Linux.

Even after that is fixed, I had to fix the include path (it pointed to /src and not /code). Consider testing you scripts before pushing. And after that again I had to change path for sample loading inside the program. And still it had lots of crashes.

Could you please look at this and make sure that following the ReadMe.md instructions actually makes one able to build the sample? Thanks.

Dmitrii Pasukhin's picture

Hello,

Thank you, we will check ReadMe.

As for a stability of build, we automatically test this samples build process on gcc11 and vc142 + (qt 5.9) more then one time per day.

Best regards, Dmitrii.

Dmitrii Pasukhin's picture

Just for clarification, do you try to build only with old build way "genproj"?

Could you test build of samples using CMake? CMakeLists.txt from main folder of repo. And enable BUILD_SAMPLES_QT parameter

Best regards, Dmitriii.

benj5378's picture

I build the test sample per instruction in the readme. This means by make.sh. I can try CMake later today perhaps

I figured out the crashes hadn't to do with the codebase, but an error on my own. The missing RES_DIR variable had to do with the terminal (apparently had to be bash) and not the script itself. For the build issues, here is a git commit that shows all the changes I had to do for making the build run: https://github.com/benj5378/OCCT/commit/d3caab1eb8be57d1655f6d6a9296bef7...

The folder variables just don't work. I ended up copying absolute paths for all of them. When running make.sh, CASROOT in custom.sh has to be set to one folder, when running run.sh, it has to be set to another folder. I believe the called custom.sh wasn't always the intended local one, but I don't really remember. Also, for some reason it all has to be run as sudo?

If you say you are running build tests every day, then it's probably because you do it with a specific folder structure?

benj5378's picture

If BUILD_SAMPLES_QT is false, no errors arise with CMake. If BUILD_SAMPLES_QT is true, "Error in configuration process, project files may be invalid"...

Also, can't even get the sample to start anymore. If I set CASROOT to OCCT-install-dir, then it tries to load samples from there. If I then set CASROOT to OCCT-source-dir (so samples will be loaded from the correct dir), run.sh can't find the env.sh script anymore.

So why did this work earlier? I believe it is due to me setting CASROOT before running make.sh that then encountered an error, but configured the project with the right folder somewhere. Then I changed CASROOT to something else, ran make.sh again, and now CASROOT would be set to the correct location for linking, while some of the already configured paths would be set previous setting. Or something along these lines...