2013/4/17 jupiter <jupiter....@gmail.com>: > Hi, > > I have a wired situation, I have a binary file (ELF 64-bit LSB > executable, x86-64, version 1 (SYSV), dynamically linked (uses shared > libs), for GNU/Linux 2.6.18, stripped) in bin directory, I then I run > "cpack -G RPM" to generate an RPM package. After install the RPM > package in another machine, the size of the binary file (82576 KB) is > different from original binary file (106228 KB).
Could you check the size of the executable which gets into the RPM it should be located in: <builddir>/_CPack_Packages/<packageName>/RPM/<packageFileName>/.... When CPackRPM runs you get a message like: CPackRPM: Will use GENERATED spec file: /blah/blah/.../RPM/SPECS/yourpackage.spec then the directory to look into should be: /blah/blah/.../RPM/<packageFileName>/ You can also extract the content of the generated RPM using rpm2cpio (or alien) rpm2cpio <yourpackage>.rpm | cpio -idmv alien -t <yourpackage>.rpm tar zxvf <yourpackage>.tgz then verify the size of the concerned file. > Some functions in > that packaged binary file did not run correctly. Could anyone help to > explain me why the size of binary file changes? I bet you compare with a file produced by "make install/strip"? a) The executable your are looking at may not be the same as the one put into the RPM. b) rpmbuild (which get called by CPackRPM) can post-process the library/executable depending on the distribution you are running on. So first do the comparison with the package executable. Then more questions: 1) On which kind of hosts do you create the RPM? (Fedora Y, OpenSuSE W, Debian Z, etc...) What is the version of RPM on this one: rpm --version 2) On which king of target do you intsall it? What is the version of RPM on the target: rpm --version In each case could check the dependency found in the RPM: rpm -qp --requires yourPackage.rpm > And how to fix it? Depending on the discrepancy between the host and the target this may not be fixable. > > Thank you. > > Kind regards. > > j > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake -- Erk Le gouvernement représentatif n'est pas la démocratie -- http://www.le-message.org -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake