MantisBT - CMake
View Issue Details
0015768CMakeCMakepublic2015-10-05 10:132016-06-10 14:31
Francis ANDRE 
Kitware Robot 
normalfeaturealways
closedmoved 
CygwinCYGWIN_NT-6.1-WOW idefix 2.2.1(0
CMake 3.3.2 
 
0015768: Cygwin: create and install symbolic link for a versioned shared library
Hi

This command
install(
    TARGETS "${target_name}" EXPORT "${target_name}Targets"
    LIBRARY DESTINATION lib${LIB_SUFFIX}
    ARCHIVE DESTINATION lib${LIB_SUFFIX}
    RUNTIME DESTINATION bin
    INCLUDES DESTINATION include
    )

install the lib shared library with a symbolic link on Linux while it does not install a symbolic link on the archive on Cygwin, neither he does install a symbolic link on the runtime destination
1/ Build a shared library on Cygwin
2/ install it
3/ No symbolic link are defined for the archive library, nor for the shared library.
No tags attached.
Issue History
2015-10-05 10:13Francis ANDRENew Issue
2015-10-06 10:06Brad KingNote Added: 0039514
2015-10-07 06:21Francis ANDRENote Added: 0039525
2015-10-08 10:08Brad KingSeverityminor => feature
2015-10-08 10:08Brad KingStatusnew => backlog
2015-10-08 10:08Brad KingSummaryinstall command does not install symbolic link for a versioned shared library => Cygwin: create and install symbolic link for a versioned shared library
2015-10-10 07:11Francis ANDRENote Added: 0039561
2016-06-10 14:29Kitware RobotNote Added: 0042849
2016-06-10 14:29Kitware RobotStatusbacklog => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0039514)
Brad King   
2015-10-06 10:06   
Cygwin is built on Windows and so uses a separate import library for linking (e.g. "mylib.dll.a" for "mylib.dll"). CMake's logic on such DLL platforms installs the import library:

 https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmInstallCommand.cxx;hb=v3.3.2#l362 [^]
 https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmInstallCommand.cxx;hb=v3.3.2#l453 [^]

If Cygwin conventions have changed then CMake will need to be updated.
(0039525)
Francis ANDRE   
2015-10-07 06:21   
For a shared library name PocoZip with a SOVERSION=40, CMake/make install generates

on Linux
lrwxrwxrwx. 1 root root 16 7 oct. 12:11 /usr/local/lib/libPocoZip.so -> libPocoZip.so.40
-rwxr-xr-x. 1 root root 392424 7 oct. 12:01 /usr/local/lib/libPocoZip.so.40

on Cygwin in /usr/local/bin
-rwxr-xr-x 1 FrancisANDRE None 3990183 Oct 7 12:06 cygPocoZip-40.dll
on Cygwin in /usr/local/lib
-rw-r--r-- 1 FrancisANDRE None 526798 Oct 7 12:06 libPocoZip.dll.a


This issue asks Cmake/make install to generate an similar symbolic link on Cygwin as the one on Linux as

on Cygwin in /usr/local/bin
-rwxr-xr-x 1 FrancisANDRE None 3990183 Oct 7 12:06 cygPocoZip-40.dll
on Cygwin in /usr/local/lib
-rw-r--r-- 1 FrancisANDRE None 526798 Oct 7 12:06 libPocoZip-40.dll.a
lrwxrwxrwx 1 FrancisANDRE None 19 Oct 7 12:20 libPocoZip.dll.a -> libPocoZip-40.dll.a

This will allow to nstall multiple version of the same shared library which actually is impossible.
(0039561)
Francis ANDRE   
2015-10-10 07:11   
By the way, there should be also a symbolic link on the ddl for dlopen function call. The link should omit the SOVERSION as for the imported lib

on Cygwin in /usr/local/bin
-rwxr-xr-x 1 FrancisANDRE None 3990183 Oct 7 12:06 cygPocoZip-40.dll
lrwxrwxrwx 1 FrancisANDRE None 19 Oct 7 12:20 cygPocoZip.dll -> cygPocoZip-40.dll
(0042849)
Kitware Robot   
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.