[CMake] cpack 32bit rpm on a 64bit system

Yngve Inntjore Levinsen yngve.levinsen at gmail.com
Wed Feb 16 04:57:31 EST 2011


Dear Eric,

First, thank you for a very quick reply!

The log you requested is attached. The rpmbuild.out file is empty, and the rpmbuild.err has one line which states:
error: No compatible architectures found for build

I am using cmake/cpack version 2.6-patch 4. I have rpmbuild version 4.4.2.3.

Why I am doing it? I suppose it is a rather weird request, but I want to build a 32bit binary on my 64bit server and distribute the program to many people that still use a 32bit machine. In order to have maximum compability, it has been decided that we should provide a statically linked 32bit executable. It is not necessary to provide this in an rpm of course, but it would be nice if it was possible. 

Thank you for your help!

Cheers,
Yngve


On Tuesday 15 February 2011 08:10:23 PM Eric Noulard wrote:
> 2011/2/15 Yngve Inntjore Levinsen <yngve.levinsen at gmail.com>:
> > Dear CMakers,
> >
> > I am trying to package a 32bit binary on a 64bit system. It breaks with the (useless?) verbose output which follows below. What I could find of useful information was in _CPack_Packages/Linux/RPM/rpmbuild.err, which stated
> > error: No compatible architectures found for build
> 
> Which version of CMake/CPack ?
> 
> > I tried to set CPACK_RPM_PACKAGE_ARCHITECTURE and CPACK_PACKAGE_ARCHITECTURE to i686, but that didn't do much. I found that e.g. the TGZ generator works just fine, so I suppose it is something with the RPM generator, but I am not clever enough to figure out what...
> >
> > Can anyone help?
> 
> Could you send me the log obtained with:
> 
> cpack -V -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
> 
> and send me the advertised "rpmbuild.err,  rpmbuild.out,
> <yourpackageName>.spec" files?
> 
> Some more questions:
> 
> What is your linux distribution ?
> How did you build the 32bits binaries  with CMake (? add -m32 using CFLAGS?) ?
> 
> RPM packaging of 32bits apps on 64bits may not be portable at all,
> why are you trying to do that ?
> 
> 
-------------- next part --------------
> cpack -V -D CPACK_RPM_PACKAGE_DEBUG=1 -G RPM
CPack: Enable Verbse
CPack Verbose: Read CPack config file: 
CPack Verbose: Read CPack configuration file: /path/to/build/CPackConfig.cmake
CPack Verbose: Specified generator: RPM
CPack Verbose: Use generator: cmCPackRPMGenerator
CPack Verbose: For project: madX
CPack: Create package using RPM
CPack Verbose: Read description file: /usr/share/cmake/Templates/CPack.GenericDescription.txt
CPack Verbose: Remove toplevel directory: /path/to/build/_CPack_Packages/Linux/RPM
CPack: Install projects
CPack: - Run preinstall target for: madX
CPack: - Install project: madX
CPack Verbose: Install configuration: "Release"
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/bin/madx_dev
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/lib/libmadx.a
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/c6t.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/madxdict.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/madxl.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/matchptcknobs.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/tpsa.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/madxd.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/madx.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/madxreg.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/rplot.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/c_wrappers.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/c_wrappers_prototypes.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/c_prototypes.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/fortran_prototypes.h
CPack Verbose: Installing: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux/usr/include/madX/fortran_wrappers.h
CPack: Compress package
CPack Verbose: Compress files to: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux.rpm
CPackRPM:Debug: using user-specified build arch = i686
CPackRPM:Debug: User defined Requires:
 libgcc >= 4.1.0, libxau >= 1.0.5
CPackRPM:Debug: CPACK_TOPLEVEL_DIRECTORY          = /path/to/build/_CPack_Packages/Linux/RPM
CPackRPM:Debug: CPACK_TOPLEVEL_TAG                = Linux
CPackRPM:Debug: CPACK_TEMPORARY_DIRECTORY         = /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux
CPackRPM:Debug: CPACK_OUTPUT_FILE_NAME            = madX-4.01.45-Linux.rpm
CPackRPM:Debug: CPACK_OUTPUT_FILE_PATH            = /path/to/build/madX-4.01.45-Linux.rpm
CPackRPM:Debug: CPACK_PACKAGE_FILE_NAME           = madX-4.01.45-Linux
CPackRPM:Debug: CPACK_RPM_BINARY_SPECFILE         = /path/to/build/_CPack_Packages/Linux/RPM/SPECS/madx.spec
CPackRPM:Debug: CPACK_PACKAGE_INSTALL_DIRECTORY   = madX 4.01.45
CPackRPM:Debug: CPACK_TEMPORARY_PACKAGE_FILE_NAME = /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux.rpm
CPackRPM:Debug: You may consult rpmbuild logs in: 
CPackRPM:Debug:    - /path/to/build/_CPack_Packages/Linux/RPM/rpmbuild.err
CPackRPM:Debug:    - /path/to/build/_CPack_Packages/Linux/RPM/rpmbuild.out
CPack: Finalize package
CPack Verbose: Copy final package: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux.rpm to /path/to/build/madX-4.01.45-Linux.rpm
CPack Error: Problem copying the package: /path/to/build/_CPack_Packages/Linux/RPM/madX-4.01.45-Linux.rpm to /path/to/build/madX-4.01.45-Linux.rpm
CPack Error: Error when generating package: madX


More information about the CMake mailing list