cmake build issue with symlinks and dependencies

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

cmake build issue with symlinks and dependencies

Ben Sferrazza
I'm trying to build libvnc, and I have run into this when building other source code as well. For some reason cmake errors out when checking the dependency of a symlinked file, after executing 'cmake --build .'. I'm not sure I'm even describing that properly. It's best understood by looking at the below. This is the relevant section of the build.make file. CMakeFiles/vncclient.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/bsferrazza/lfs/sources/libvncserver/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) "Linking C shared library"
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/vncclient.dir/link.txt --verbose=$(VERBOSE)
$(CMAKE_COMMAND) -E cmake_symlink_library
@$(CMAKE_COMMAND) -E touch_nocreate
@$(CMAKE_COMMAND) -E touch_nocreate

And here's the terminal output.

[  1%] Linking C shared library
/home/tools/bin/cmake -E cmake_link_script CMakeFiles/vncclient.dir/link.txt --verbose=1
/home/tools/bin/cc -fPIC   -shared -Wl,-soname, -o CMakeFiles/vncclient.dir/libvncclient/cursor.c.o CMakeFiles/vncclient.dir/libvncclient/listen.c.o CMakeFiles/vncclient.dir/libvncclient/rfbproto.c.o CMakeFiles/vncclient.dir/libvncclient/sockets.c.o CMakeFiles/vncclient.dir/libvncclient/vncviewer.c.o CMakeFiles/vncclient.dir/common/minilzo.c.o CMakeFiles/vncclient.dir/common/turbojpeg.c.o CMakeFiles/vncclient.dir/libvncclient/tls_gnutls.c.o CMakeFiles/vncclient.dir/libvncclient/sasl.c.o -lpthread /home/tools/lib/ /home/tools/lib/ /home/tools/lib/ /home/tools/lib/ /home/tools/lib/ /home/tools/lib/ /home/tools/lib/ 
/home/tools/bin/cmake -E cmake_symlink_library
make[2]: *** [CMakeFiles/vncclient.dir/build.make:317:] Error 1
make[2]: *** Deleting file ''
make[2]: Leaving directory '/nfs/home/bsferrazza/lfs/sources/libvncserver/build'
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/vncclient.dir/all] Error 2
make[1]: Leaving directory '/nfs/home/bsferrazza/lfs/sources/libvncserver/build'
make: *** [Makefile:141: all] Error 2

You can see it run the ' cmake -E cmake_symlink_library' command and yet it errors out on Oddly, if I then run that same command in the shell, and re-run 'cmake --build .' it continues just fine. So why was that command not properly executed within the cmake file?



Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: