[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CMake Error: Could not open file for write in copy operation ... System Error: Permission denied



Hi everybody!


First, thank you for all your advices.

Can you publish the source package?
As Martin said, mysource package  is available in Debian-Med [1]

> But configuring files directly to installation locations (like your "/usr/bin") is a bad idea. This requires superuser powers > at configuration time - which you usually don't have. Instead, just configure it to the build directory, use it there and > install it later using CMake's installation commands: http://www.cmake.org/Wiki/CMake:Install_Commands

> A little correction: It actually said RUNTIME_OUTPUT_DIR (which is "/usr/bin") in the original file, not > CMAKE_CURRENT_BINARY_DIR (which would be better!). The point stays the same: You are configuring files to
> /usr/bin/, which is not a good idea.

I removed lines in question and replaced them by :
configure_file("${CMAKE_CURRENT_LIST_DIR}/bin/qt.conf" "${CMAKE_CURRENT_BINARY_DIR}/qt.conf") (And CMAKE_CURRENT_BINARY_DIR isn't /usr/bin this time). And it works ! I mean the CMake configuration is done successfully.

> Btw. I think your package is also missing a build dependency to "libqt4-opengl-dev".

Yes I fixed it.

Another little question : The configuration is okay, but as soon as the build starts, I've an error (about libraries just built but not found), and to fix it, I use "pdebuild --use-pdebuild-internal". Is it a good practise ? I've never used this option before...


Finally thank you again for your help.

Best regards,

Corentin

[1] https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=debian-med/fw4spl.git


Reply to: