[opensuse-packaging] How to check for unneeded build requirements?
Hi. Is there any way to know if a "BuildRequires" in my spec file was not used in build process? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 14/02/2016 21:25, Roman Evstifeev wrote:
Hi. Is there any way to know if a "BuildRequires" in my spec file was not used in build process?
Not as far as I know. The README or INSTALL file in the sources will normally list the build dependencies otherwise you can try commenting out the BuildRequires: and see the output of configure. Configure / cmake output normally lists everything that it searches for but sometimes you might just get a build failure due to a missing header. With waf you may need to use the -v or -vv options to get a decent output. Regards Dave P -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Mon, Feb 15, 2016 at 9:15 AM, Dave Plater <dplater.list@gmail.com> wrote:
On 14/02/2016 21:25, Roman Evstifeev wrote:
Hi. Is there any way to know if a "BuildRequires" in my spec file was not used in build process?
Not as far as I know. The README or INSTALL file in the sources will normally list the build dependencies otherwise you can try commenting out the BuildRequires: and see the output of configure. Configure / cmake output normally lists everything that it searches for but sometimes you might just get a build failure due to a missing header.
The problem is that quite often you will not get failures but some features will be silently omitted. So package will build, but with reduced functionality. In the best case this will cause some files to be missing, but if package is using wildcards or does not create additional binaries, all bets are off. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Montag, 15. Februar 2016, 09:30:53 CET wrote Andrei Borzenkov:
On Mon, Feb 15, 2016 at 9:15 AM, Dave Plater <dplater.list@gmail.com> wrote:
On 14/02/2016 21:25, Roman Evstifeev wrote:
Hi. Is there any way to know if a "BuildRequires" in my spec file was not used in build process?
Not as far as I know. The README or INSTALL file in the sources will normally list the build dependencies otherwise you can try commenting out the BuildRequires: and see the output of configure. Configure / cmake output normally lists everything that it searches for but sometimes you might just get a build failure due to a missing header.
The problem is that quite often you will not get failures but some features will be silently omitted. So package will build, but with reduced functionality. In the best case this will cause some files to be missing, but if package is using wildcards or does not create additional binaries, all bets are off.
Another way to detect this is to diff the "rpm -qp --requires $rpm" built with and without the buildrequires. At least if the build requires is a library the chances are high that you see that in the requires list. -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Monday 2016-02-15 07:30, Andrei Borzenkov wrote:
The problem is that quite often you will not get failures but some features will be silently omitted. So package will build, but with reduced functionality.
If that bothers you, you can explicitly use configure --enable-this-and-that, which moves the item from =auto to =yes, at least where that is so supported. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 02/15/2016 06:44 PM, Jan Engelhardt wrote:
On Monday 2016-02-15 07:30, Andrei Borzenkov wrote:
The problem is that quite often you will not get failures but some features will be silently omitted. So package will build, but with reduced functionality. If that bothers you, you can explicitly use configure --enable-this-and-that, which moves the item from =auto to =yes, at least where that is so supported. Sometimes that involves cooperation with upstream, fortunately I got mine to remove all auto detection.
Cheers Simon -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sun, 14 Feb 2016, Roman Evstifeev wrote:
Hi. Is there any way to know if a "BuildRequires" in my spec file was not used in build process?
Nothing off-hand but trying without and comparing the build result (first the log for anything suspicious). Richard. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (7)
-
Adrian Schröter
-
Andrei Borzenkov
-
Dave Plater
-
Jan Engelhardt
-
Richard Biener
-
Roman Evstifeev
-
Simon Lees