AIX rpmbuild on large package

Michael Cronenworth mike at cchtml.com
Wed Mar 2 14:24:00 UTC 2016


On 03/02/2016 01:37 AM, Panu Matilainen wrote:
>
> That is a failure inside libmagic, rpm is only the messenger here.
> It should be reproducable outside rpm with:
>
> $ file -z -e tokens <path-to-buildroot>/foo/bar/libfile.so
>
> ...assuming 'file' is linked against the same libmagic version as rpm, that is.
>
> Also what 'ls -l' says about the file might help shed some light on it. Like Jay 
> noted there's a 4G limit on individual files, but rpm should clearly report that 
> with a "File <path> too large for payload" message so I suspect this is something 
> different.

The file itself is only 95984 bytes.

user at aixbox[/home/user]> /opt/freeware/bin/file -z -e tokens /foo/bar/libfile.so
/foo/bar/libfile.so: ERROR: cannot allocate zu bytes (Invalid argument)

If I delete that file during the build, the build errors on another file the same way.

So, a bug in libmagic?

>
>>
>> Smaller packages can be built just fine. I've doubled the ulimit on
>> files open, memory, etc. but it fails on the same file on a rebuild.
>>
>> Any ideas?
>
> You should be able to get past it by doing 'chmod a-x 
> %{buildroot}/foo/bar/libfile.so' at end of %install section (and/or possibly 
> adjust %files section to make it non-executable there too). The dependencies wont 
> get recorded that way, but that can be worked around by manually adding them in 
> the spec if need be. 

It doesn't matter if the file is executable or non-executable. The error still 
occurs, albeit with "mode 100644".



More information about the Rpm-list mailing list