The following issue has been SUBMITTED. ====================================================================== https://public.kitware.com/Bug/view.php?id=15837 ====================================================================== Reported By: Friedrich Assigned To: ====================================================================== Project: CMake Issue ID: 15837 Category: CMake Reproducibility: always Severity: block Priority: normal Status: new ====================================================================== Date Submitted: 2015-11-08 11:58 EST Last Modified: 2015-11-08 11:58 EST ====================================================================== Summary: cmake_symlink_library fails on shared folders in Virtualbox with linux vm and linux host Description: When building on a Linux-based vm in VirtualBox, on a Linux-based host, and having the build directory inside a shared folder (with the host), the build process fails at the step of linking shared libs, with error: "cmake_symlink_library: System Error: Read-only file system"
Which seems bogus, as the build otherwise creates all build artifacts without any problem in the very same directories. Looking where things fail with strace shows it is the call symlink("libxxx.so.0.17.20", "libxxx.so.1"): lstat64("/srv/mer/targets/SailfishOS-i486/usr/bin/cmake", {st_mode=S_IFREG|0755, st_size=3679756, ...}) = 0 getcwd("/home/src1/build/marble/src/lib/astro", 2048) = 38 getcwd("/home/src1/build/marble/src/lib/astro", 4097) = 38 readlink("/home/src1/build/marble/src/lib/astro/libastro.so.1", 0x77afe80b, 4096) = -1 ENOENT (No such file or directory) access("libastro.so.1", R_OK) = -1 ENOENT (No such file or directory) getcwd("/home/src1/build/marble/src/lib/astro", 4097) = 38 lstat64("libastro.so.1", 0x77b00970) = -1 ENOENT (No such file or directory) getcwd("/home/src1/build/marble/src/lib/astro", 4097) = 38 symlink("libastro.so.0.17.20", "libastro.so.1") = -1 EROFS (Read-only file system) write(2, "CMake Error: cmake_symlink_libra"..., 71CMake Error: cmake_symlink_library: System Error: Read-only file system) = 71 write(2, "\n", 1 ) = 1 As I learned from https://www.virtualbox.org/ticket/10085 it seems shared folders on VirtualBox do not support shared links out of the box (pun to be done). Half-official workaround is to use VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1 (worked for me with virtualbox 5.0.8 at least) No idea if cmake should and can support the case of no symlinks available in the filesystem used for the builddir, as in the given case. Just reporting to the experts, as the web search engine pointed to quite some hits where people wondered about the same problem, so seems to be a more common use case (e.g. setup as expected by https://sailfishos.org/develop/tutorials/building-sailfish-os-packages-manually/ , where the example code given works, because it does not include shared libs and thus not the symlinking step). ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2015-11-08 11:58 Friedrich New Issue ====================================================================== -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers