View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009171CMakeCMakepublic2009-06-17 03:442016-06-10 14:30
ReporterKai Fischer 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0009171: cmake_symlink_library fails when cross-compiling a Linux library with WinXP
DescriptionSetting VERSION or SOVERSION property when cross-compiling an ARM Linux library with Windows XP (no cygwin, mingw or anything like that) causes CMake
to generate a "cmake -E cmake_symlink_library" command.

This command fails, because it actually tries to create the symlink on a FAT32 or NTFS filesystem, instead of just making a copy or, at least, do nothing.
TagsNo tags attached.
Attached Filespatch file icon win-soname-1.patch [^] (23,799 bytes) 2009-10-19 18:28 [Show Content]

 Relationships

  Notes
(0017497)
Brad King (manager)
2009-09-14 18:14

What do you expect to happen? Linux shared libraries use symlinks for versioning.
(0017525)
Kai Fischer (reporter)
2009-09-15 04:07

Yes I know, but since we are cross-compiling in Windows the symlink can't be created and the whole build process stops with an error. So maybe cmake should recognize that the current OS is Windows and create a copy instead of a symlink.

On the other hand, my only motiviation to use the cmake VERSION command is to set the "SONAME" property in the private header of the library (objdump -p <your_lib> | grep SONAME). Maybe this should be an additional cmake command...
(0017607)
Brad King (manager)
2009-09-18 09:48

Perhaps we can create a symlink if supported:

  http://msdn.microsoft.com/en-us/library/aa363878(VS.85).aspx [^]

and otherwise fall back to a hardlink if supported:

  http://msdn.microsoft.com/en-us/library/aa365006(VS.85).aspx [^]

and otherwise fall back to a copy.

What toolchain/environment are you using to cross-compile?
I'd like to try to duplicate your problem.
(0017665)
Kai Fischer (reporter)
2009-09-21 03:02
edited on: 2009-09-21 03:02

I think the "symlink -> hardlink -> copy" solution would be very nice!

I am using the arm-none-linux-gnueabi toolchain for Windows from CodeSourcery (my OS is WinXP). It can be downloaded from here: http://www.codesourcery.com/sgpp/lite/arm/portal/release830 [^]

(0018119)
Brad King (manager)
2009-10-19 18:30

The file "win-soname-1.patch" contains a patch that applies to current CVS HEAD. It just does the copy-based approach for now. Please try it.

FYI, this change opened up a small can-of-worms because the copies need to have RPATH information updated during installation just like the original. The changes are too intrusive to get into 2.8.0 at this stage in the release cycle.
(0018148)
Brad King (manager)
2009-10-21 13:12

Simplify 'strip' and 'ranlib' install tweak code
/cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.cxx,v <-- Source/cmInstallTargetGenerator.cxx
new revision: 1.73; previous revision: 1.72
/cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.h,v <-- Source/cmInstallTargetGenerator.h
new revision: 1.32; previous revision: 1.31

Factor out "cmake -E cmake_symlink_*" code
/cvsroot/CMake/CMake/Source/cmake.cxx,v <-- Source/cmake.cxx
new revision: 1.434; previous revision: 1.433
/cvsroot/CMake/CMake/Source/cmake.h,v <-- Source/cmake.h
new revision: 1.122; previous revision: 1.121

Compute install destination for all target files
/cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.cxx,v <-- Source/cmInstallTargetGenerator.cxx
new revision: 1.74; previous revision: 1.73

Add IS_SYMLINK test to if command
/cvsroot/CMake/CMake/Source/cmIfCommand.cxx,v <-- Source/cmIfCommand.cxx
new revision: 1.100; previous revision: 1.99
/cvsroot/CMake/CMake/Source/cmIfCommand.h,v <-- Source/cmIfCommand.h
new revision: 1.59; previous revision: 1.58

Tweak all files during target installation
/cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.cxx,v <-- Source/cmInstallTargetGenerator.cxx
new revision: 1.75; previous revision: 1.74
/cvsroot/CMake/CMake/Source/cmInstallTargetGenerator.h,v <-- Source/cmInstallTargetGenerator.h
new revision: 1.33; previous revision: 1.32

Use copies for versioned names on Windows
/cvsroot/CMake/CMake/Source/cmake.cxx,v <-- Source/cmake.cxx
new revision: 1.435; previous revision: 1.434
(0030533)
Brad King (manager)
2012-08-13 10:37

Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:

 http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
(0041570)
Kitware Robot (administrator)
2016-06-10 14:27

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
2009-06-17 03:44 Kai Fischer New Issue
2009-09-14 13:57 Bill Hoffman Status new => assigned
2009-09-14 13:57 Bill Hoffman Assigned To => Brad King
2009-09-14 18:14 Brad King Note Added: 0017497
2009-09-15 04:07 Kai Fischer Note Added: 0017525
2009-09-18 09:48 Brad King Note Added: 0017607
2009-09-21 03:02 Kai Fischer Note Added: 0017665
2009-09-21 03:02 Kai Fischer Note Edited: 0017665
2009-10-19 18:28 Brad King File Added: win-soname-1.patch
2009-10-19 18:30 Brad King Note Added: 0018119
2009-10-21 13:12 Brad King Note Added: 0018148
2012-08-13 10:37 Brad King Status assigned => backlog
2012-08-13 10:37 Brad King Note Added: 0030533
2016-06-10 14:27 Kitware Robot Note Added: 0041570
2016-06-10 14:27 Kitware Robot Status backlog => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:30 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team