Bug 1076793 - InsightToolkit bundles multiple system libraries
InsightToolkit bundles multiple system libraries
Status: ASSIGNED
Product: Fedora
Classification: Fedora
Component: InsightToolkit (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Igor Gnatenko
Fedora Extras Quality Assurance
:
Depends On: 1196766
Blocks: DuplicSysLibsTracker
  Show dependency treegraph
 
Reported: 2014-03-15 04:28 EDT by Ville Skyttä
Modified: 2016-08-30 05:34 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ville Skyttä 2014-03-15 04:28:37 EDT
https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries
https://fedoraproject.org/wiki/Packaging:Treatment_Of_Bundled_Libraries

InsightToolkit seems to bundle multiple system libraries, see Modules/ThirdParty in InsightToolkit-debuginfo and Modules/ThirdParty/GDCM/src/gdcm/PACKAGER in its sources.

More specifically, at least these libs exist as separate system ones: expat, gdcm, nifticlib, openjpeg
Comment 1 Mario Ceresa 2014-03-15 06:06:14 EDT
Hi Ville,
thanks for reporting. We really tried to unbundle as much libraries as we could at review time. Please see https://bugzilla.redhat.com/show_bug.cgi?id=539387

The package does bundle copies of system libraries in the directory Modules/ThirdParty but it doesn't use them durign build stage if systemd-wide copies are available (see -DITK_USE_SYSTEM_SOMETHING switches in the spec-file)

We used this approach because upstream ships a very carefully crafted cmake build systems which needed to be patched if we removed the original libraries. I will check again if this is the case with the last version.

I'm reviewing the installed files from the binary package and it seems to me that at least gdcm is correctly linked not bundled.
 
I'll run a more extensive analysis for expat, nifticlib and openjpeg.

Thanks and best regards,

Mario
Comment 2 Ville Skyttä 2014-03-15 06:57:02 EDT
(In reply to Mario Ceresa from comment #1)
> The package does bundle copies of system libraries in the directory
> Modules/ThirdParty but it doesn't use them durign build stage if
> systemd-wide copies are available (see -DITK_USE_SYSTEM_SOMETHING switches
> in the spec-file)

That's not quite enough, the 3rd party sources should be removed in %prep to ensure they don't get accidentally used. See links in the initial comment, specifically https://fedoraproject.org/wiki/Packaging:Treatment_Of_Bundled_Libraries#Packages_with_Bundled_Libraries

> I'll run a more extensive analysis for expat, nifticlib and openjpeg.

Presence of their sources in -debuginfo is a strong indicator that the bundled copies are being used.

$ rpm -qlp http://kojipkgs.fedoraproject.org//packages/InsightToolkit/4.5.1/1.fc21/x86_64/InsightToolkit-debuginfo-4.5.1-1.fc21.x86_64.rpm | grep 'ThirdParty/\(Expat\|NIFTI\|OpenJPEG\)'
Comment 3 Orion Poplawski 2015-02-25 12:12:12 EST
With current 4.7.0, the actual source files I see in the debuginfo package is:

/usr/src/debug/InsightToolkit-4.7.0/x86_64-redhat-linux-gnu/Modules/ThirdParty/NrrdIO/src/NrrdIO/NrrdIO.h

and a bunch in 

/usr/src/debug/InsightToolkit-4.7.0/x86_64-redhat-linux-gnu/Modules/ThirdParty/KWSys/src/itksys/

which appears to be itk modified code or wrapper.

Would be nice to package nrrd separately, but I'm a bit less worried about it as it is just a header file.
Comment 4 Ville Skyttä 2015-02-25 15:18:30 EST
I believe you may be looking only at files in /usr/src/debug/InsightToolkit-4.7.0/x86_64-redhat-linux-gnu/Modules/ThirdParty, there's a lot more in /usr/src/debug/InsightToolkit-4.7.0/Modules/ThirdParty: DICOMParser, DoubleConversion, GDCM, GIFTI, KWSys, MetaIO, NIFTI, Netlib, NrrdIO, OpenJPEG, VNLInstantiation

rpm -qlp https://kojipkgs.fedoraproject.org//packages/InsightToolkit/4.7.0/3.fc22/x86_64/InsightToolkit-debuginfo-4.7.0-3.fc22.x86_64.rpm | grep ThirdParty
Comment 5 Orion Poplawski 2015-02-26 13:44:59 EST
Ah, you are correct.

Started looking at unbundling DoubleConversion, looks like we need to build it with cmake.
Comment 6 Orion Poplawski 2015-02-26 14:08:11 EST
Using system nifti requires upstream support: https://issues.itk.org/jira/browse/ITK-3349
Comment 7 Orion Poplawski 2015-02-26 17:07:37 EST
OpenJPEG - https://issues.itk.org/jira/browse/ITK-3350
Comment 8 Orion Poplawski 2015-02-26 17:17:28 EST
Not yet in Fedora: DICOMParser, GIFTI, KWSys, MetaIO, NrrdIO, Netlib(slatec), VNLInstantiation

Alternative cleanup:

# remove source files of external dependencies that itk gets linked against
# DICOMParser, GIFTI, KWSys, MetaIO, NrrdIO, Netlib, VNLInstantiation are not
# yet in Fedora
# DoubleConversion still seems to need the source present
# NIFTI needs support - https://issues.itk.org/jira/browse/ITK-3349
# OpenJPEG - https://issues.itk.org/jira/browse/ITK-3350
find Modules/ThirdParty/* \( -name DICOMParser -o -name DoubleConversion -o -name GIFTI -o -name KWSys -o -name MetaIO -o -name NIFTI -o -name NrrdIO -o -name Netlib -o -name OpenJPEG -o name VNLInstantiation \) -prune -o -regextype posix-extended -type f \
    -regex ".*\.(h|hxx|hpp|c|cc|cpp|cxx|txx)$" -not -iname "itk*" -print0 | xargs -0 rm -fr

has the advantage of removing any new items that might appear and explicitly listing what is still bundled.
Comment 9 Jaroslav Reznik 2015-03-03 11:59:42 EST
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
Comment 10 Dominik 'Rathann' Mierzejewski 2015-08-06 17:23:16 EDT
Another one is kwsys (http://public.kitware.com/gitweb?p=KWSys.git) bundled in Modules/ThirdParty/KWSys. It's declared a copylib by upstream (kitware.com, same as InsightToolkit), but it should be a proper shared library, as it's much too large (though partial bundling is possible) and it seems to be bundled by all projects from kitware.

This came up during the discussion of FPC ticket #555 (https://fedorahosted.org/fpc/ticket/555).
Comment 11 Dominik 'Rathann' Mierzejewski 2015-08-06 17:44:32 EDT
MetaIO can be unbundled, according to: http://www.itk.org/Wiki/MetaIO/Documentation .
Comment 12 Jan Kurik 2016-02-24 08:14:35 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 13 Fedora Admin XMLRPC Client 2016-08-30 05:29:29 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 14 Fedora Admin XMLRPC Client 2016-08-30 05:34:54 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Note You need to log in before you can comment on or make changes to this bug.