[opensuse-packaging] Conditional BuildRequire
Hello, I am trying to build a package with a conditional BuildRequire. lldb-devel is only on 13.2 / Leap / Factory x86_64 available, so I am using: %if 0%{?suse_version} >= 1315 && 0%{__isa_bits} == 64 # Used for debugger plugin (not necessary, but nice-to-have feature) BuildRequires: lldb-devel %endif But when building this I am always getting the error: Konsole output [ 79s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' /home/abuild/rpmbuild/SOURCES/mytest.spec [ 79s] error: Failed build dependencies: [ 79s] lldb-devel is needed by mytest-1.0-0.x86_64 Somebody an idea? Regards, Ferdinand -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Monday 2015-10-05 17:18, Ferdinand Thiessen wrote:
I am trying to build a package with a conditional BuildRequire. lldb-devel is only on 13.2 / Leap / Factory x86_64 available, so I am using:
%if 0%{?suse_version} >= 1315 && 0%{__isa_bits} == 64
[ 79s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' /home/abuild/rpmbuild/SOURCES/mytest.spec [ 79s] error: Failed build dependencies: [ 79s] lldb-devel is needed by mytest-1.0-0.x86_64
Somebody an idea?
__isa_bits is not defined while bs_sched evaluates the BuildRequires, but is likely defined when rpmbuild evaluates BuildRequires. Just do not use __isa_bits, that is something nobody (no other spec) does. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Am 06.10.2015 um 00:32 schrieb Jan Engelhardt:
On Monday 2015-10-05 17:18, Ferdinand Thiessen wrote:
I am trying to build a package with a conditional BuildRequire. lldb-devel is only on 13.2 / Leap / Factory x86_64 available, so I am using:
%if 0%{?suse_version} >= 1315 && 0%{__isa_bits} == 64
[ 79s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' /home/abuild/rpmbuild/SOURCES/mytest.spec [ 79s] error: Failed build dependencies: [ 79s] lldb-devel is needed by mytest-1.0-0.x86_64
Somebody an idea? __isa_bits is not defined while bs_sched evaluates the BuildRequires, but is likely defined when rpmbuild evaluates BuildRequires.
Just do not use __isa_bits, that is something nobody (no other spec) does. Ah ok, thank you! Found that __isa_bits on rpg.org. I tried %_lib == "lib64" (does not work), but with:
%if 0%{?suse_version} >= 1315 %ifarch arm x86_64 BuildRequires: lldb-devel %endif %endif It works! Regards, Ferdinand -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Am 06.10.2015 um 01:11 schrieb Ferdinand Thiessen:
Am 06.10.2015 um 00:32 schrieb Jan Engelhardt:
On Monday 2015-10-05 17:18, Ferdinand Thiessen wrote:
I am trying to build a package with a conditional BuildRequire. lldb-devel is only on 13.2 / Leap / Factory x86_64 available, so I am using:
%if 0%{?suse_version} >= 1315 && 0%{__isa_bits} == 64
[ 79s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' /home/abuild/rpmbuild/SOURCES/mytest.spec [ 79s] error: Failed build dependencies: [ 79s] lldb-devel is needed by mytest-1.0-0.x86_64
Somebody an idea? __isa_bits is not defined while bs_sched evaluates the BuildRequires, but is likely defined when rpmbuild evaluates BuildRequires.
Just do not use __isa_bits, that is something nobody (no other spec) does. Ah ok, thank you! Found that __isa_bits on rpg.org. I tried %_lib == "lib64" (does not work), but with:
%if 0%{?suse_version} >= 1315 %ifarch arm x86_64 BuildRequires: lldb-devel %endif %endif
It works!
Really? "arm" is unused, and "%arm" is not 64-bit. Did you mean aarch64? Cheers, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Yes, because if you look here:
https://build.opensuse.org/package/view_file/openSUSE:Factory/lldb/lldb.spec...
"ExclusiveArch: arm x86_64"
I took this architectutes and put them on the ifarch.
Regards,
Ferdinand
Am 6. Oktober 2015 01:20:42 MESZ, schrieb "Andreas Färber"
Am 06.10.2015 um 01:11 schrieb Ferdinand Thiessen:
Am 06.10.2015 um 00:32 schrieb Jan Engelhardt:
On Monday 2015-10-05 17:18, Ferdinand Thiessen wrote:
I am trying to build a package with a conditional BuildRequire. lldb-devel is only on 13.2 / Leap / Factory x86_64 available, so I am using:
%if 0%{?suse_version} >= 1315 && 0%{__isa_bits} == 64
[ 79s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' /home/abuild/rpmbuild/SOURCES/mytest.spec [ 79s] error: Failed build dependencies: [ 79s] lldb-devel is needed by mytest-1.0-0.x86_64
Somebody an idea? __isa_bits is not defined while bs_sched evaluates the BuildRequires, but is likely defined when rpmbuild evaluates BuildRequires.
Just do not use __isa_bits, that is something nobody (no other spec) does. Ah ok, thank you! Found that __isa_bits on rpg.org. I tried %_lib == "lib64" (does not work), but with:
%if 0%{?suse_version} >= 1315 %ifarch arm x86_64 BuildRequires: lldb-devel %endif %endif
It works!
Really? "arm" is unused, and "%arm" is not 64-bit. Did you mean aarch64?
Cheers, Andreas
-- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Am 06.10.2015 um 01:33 schrieb Ferdinand Thiessen:
Yes, because if you look here: https://build.opensuse.org/package/view_file/openSUSE:Factory/lldb/lldb.spec...
"ExclusiveArch: arm x86_64"
I took this architectutes and put them on the ifarch.
Well, like I just told you, it's wrong: arm is no-op. Question then is what was meant here - CC'ing Ismail. %arm for 32-bit, aarch64 otherwise. Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 06 Oct 01:39, Andreas Färber wrote:
Am 06.10.2015 um 01:33 schrieb Ferdinand Thiessen:
Yes, because if you look here: https://build.opensuse.org/package/view_file/openSUSE:Factory/lldb/lldb.spec...
"ExclusiveArch: arm x86_64"
I took this architectutes and put them on the ifarch.
Well, like I just told you, it's wrong: arm is no-op. Question then is what was meant here - CC'ing Ismail. %arm for 32-bit, aarch64 otherwise.
Yeah its a typo, should be %arm instead. Thanks for the heads up, I'll fix it. Regards, İsmail
06.10.2015 01:32, Jan Engelhardt пишет:
On Monday 2015-10-05 17:18, Ferdinand Thiessen wrote:
I am trying to build a package with a conditional BuildRequire. lldb-devel is only on 13.2 / Leap / Factory x86_64 available, so I am using:
%if 0%{?suse_version} >= 1315 && 0%{__isa_bits} == 64
[ 79s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' /home/abuild/rpmbuild/SOURCES/mytest.spec [ 79s] error: Failed build dependencies: [ 79s] lldb-devel is needed by mytest-1.0-0.x86_64
Somebody an idea?
__isa_bits is not defined while bs_sched evaluates the BuildRequires, but is likely defined when rpmbuild evaluates BuildRequires.
Then I expect this condition to always be false, how comes it evaluates true?
Just do not use __isa_bits, that is something nobody (no other spec) does.
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tuesday 2015-10-06 05:26, Andrei Borzenkov wrote:
%if 0%{?suse_version} >= 1315 && 0%{__isa_bits} == 64 [ 79s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define '_build_create_debug 1' /home/abuild/rpmbuild/SOURCES/mytest.spec [ 79s] error: Failed build dependencies: [ 79s] lldb-devel is needed by mytest-1.0-0.x86_64
__isa_bits is not defined while bs_sched evaluates the BuildRequires, but is likely defined when rpmbuild evaluates BuildRequires.
Then I expect this condition to always be false, how comes it evaluates true?
Because it can. bs_sched simply is a different implementation than rpm. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (5)
-
Andreas Färber
-
Andrei Borzenkov
-
Ferdinand Thiessen
-
İsmail Dönmez
-
Jan Engelhardt