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.

libvncclient.so.0.9.12: 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 libvncclient.so"
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/vncclient.dir/link.txt --verbose=$(VERBOSE)
$(CMAKE_COMMAND) -E cmake_symlink_library libvncclient.so.0.9.12 libvncclient.so.1 libvncclient.so

libvncclient.so.1: libvncclient.so.0.9.12
@$(CMAKE_COMMAND) -E touch_nocreate libvncclient.so.1

libvncclient.so: libvncclient.so.0.9.12
@$(CMAKE_COMMAND) -E touch_nocreate libvncclient.so

And here's the terminal output.

[  1%] Linking C shared library libvncclient.so
/home/tools/bin/cmake -E cmake_link_script CMakeFiles/vncclient.dir/link.txt --verbose=1
/home/tools/bin/cc -fPIC   -shared -Wl,-soname,libvncclient.so.1 -o libvncclient.so.0.9.12 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/libgcrypt.so /home/tools/lib/libsasl2.so /home/tools/lib/libz.so /home/tools/lib/libjpeg.so /home/tools/lib/libgnutls.so /home/tools/lib/libssl.so /home/tools/lib/libcrypto.so 
/home/tools/bin/cmake -E cmake_symlink_library libvncclient.so.0.9.12 libvncclient.so.1 libvncclient.so
make[2]: *** [CMakeFiles/vncclient.dir/build.make:317: libvncclient.so] Error 1
make[2]: *** Deleting file 'libvncclient.so'
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 libvncclient.so.0.9.12' command and yet it errors out on libvncclient.so. 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?

Thanks,
Ben


--

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:
https://cmake.org/mailman/listinfo/cmake