View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015837CMakeCMakepublic2015-11-08 11:582016-06-10 14:31
ReporterFriedrich 
Assigned ToKitware Robot 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake 2.8.11.2 
Target VersionFixed in Version 
Summary0015837: cmake_symlink_library fails on shared folders in Virtualbox with linux vm and linux host
DescriptionWhen 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).
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0042882)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-11-08 11:58 Friedrich New Issue
2016-06-10 14:29 Kitware Robot Note Added: 0042882
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team