I am trying to build an rpm using the rpmbuild tool. I have source code which build binaries around 30 GB. This software for which I am making the rpm has dozens of executables. When I copy only the binaries of a single executable (Eg. init) my rpm builds successfully. But when I dump the entire build to the rpm, rpmbuild does everything but gives a seg fault in the end.

Here is my spec file:

# This is a sample spec file for wget

%define _topdir     /root/mywget
%define name            source 
%define release     1
%define version     1.12
%define _builddir     /root/mywget/BUILD/glenlivet
%define _buildrootdir /root/mywget/BUILDROOT
%define _buildroot /root/mywget/BUILDROOT
%define _sourcedir    /root/mywget/SOURCES

BuildRoot:  %{_buildroot}
Summary:        GNU source
License:        GPL
Name:           %{name}
Version:        %{version}
Release:        %{release}
Source:         %{name}-%{version}.tar.gz
Prefix:         /usr
Group:          Development/Tools

The GNU sample program downloads files from the Internet using the command-line.

%setup -q -n glenlivet

cd %{_builddir}
make all

rm -rf %{_buildrootdir}
mkdir -p %{_buildrootdir}/bin
cp -p -r %{_builddir}/build/obj-x64/* %{_buildrootdir}/bin/


If I only copy some of the binaries (let say one utility and its dependent binaries) it works fine. But when I try to copy the entire build, I get a seg fault. I get the seg fault after rpmbuild has executed these sections:


rpmbuild also processes my source file.

Processing files: source-1.12-1
Finding Provides: 
Finding Requires:
Finding Supplements:
Checking for unpackaged file(s):/ usr/lib/rpm/check-files /root/mywget/BUILDROOT
Checking for unpackaged file(s):/ usr/lib/rpm/check-files /root/mywget/BUILDROOT
Segmentation fault

Any clue what wrong is going on or where does rpmbuild fails? Thanks in advance


RPM versions up to 4.4.x have a 2GB package size cap because it requires 64-bit integer type support in headers. Starting with 4.6, this package size cap is removed. There is still a 4GB limit on individual files within packages due to cpio format limitations.

Reference Link

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.