
Tue, 02/27/2018 - 15:55
Forums:
In a freshly made occ-build directory
cmake ../opencascade-7.2.0/
[...]
CMake Error at CMakeLists.txt:871 (file):
file failed to open for writing (Permission denied):
/usr/local/bin/custom.sh
-- Info: (13:41:20) OCCT toolkits processed
-- Info: (13:41:20) OCCT configuration files prepared
-- Configuring incomplete, errors occurred!
I feel pretty much normal that writing a file in /usr/local/bin/ fails when a script is run as an unprivileged user because it should be written only at the make install step (with root rights). How should I fix this problem to be able to compile OCC as a normal user and have /usr/local/ as prefix ?
Wed, 03/07/2018 - 19:24
The error is triggered at the line 871:
As far as I can see, it will be called only if custom.sh already exists at install location - e.g. you have been installed OCCT (by make install or something else), is it correct?
For me, on a fresh system there is no such file, so I don't see this problem.
There will be also no problem if you will specify another INSTALL location, available to user.
Of course, modifying files at INSTALL location during configure is a bad approach and should be fixed anyway (although I have some ideas why this was done in this way).
Also, custom.sh is designed to simplify using OCCT from non-standard INSTALL location; installing this file into /usr/local/bin/ does not look nice at all...
Fill free reporting an issue on Bugtracker (and provide patches, if you can):
https://dev.opencascade.org/index.php?q=home/get_involved