JavaInstall.cmake deletes all of /usr/bin when WRAP_JAVA is enabled.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
This issue has happened twice when trying to build and install VTK-6.1.0. The offending lines in JavaInstall.cmake are:
Remove un-wanted files
execute_process(
COMMAND "{CMAKE_COMMAND}" -E remove_directory "
{CMAKE_INSTALL_PREFIX}/bin"
)
execute_process(
COMMAND "{CMAKE_COMMAND}" -E remove_directory "
{CMAKE_INSTALL_PREFIX}/lib"
)
execute_process(
COMMAND "{CMAKE_COMMAND}" -E remove_directory "
{CMAKE_INSTALL_PREFIX}/share"
)
execute_process(
COMMAND "{CMAKE_COMMAND}" -E remove_directory "
{CMAKE_INSTALL_PREFIX}/include"
)
execute_process(
COMMAND "{CMAKE_COMMAND}" -E remove_directory "
{CMAKE_INSTALL_PREFIX}/www"
)
This code seems to be quite dangerous. It caused me considerable down time twice by deleting all of /usr/bin until I located the issue. Looks as if it will take care of some other important parts of /usr too if there are executables left to do the job. In my case, rm is in /usr/bin so it stopped after taking out /usr/bin
Cheers,
Frederick