Re: [Mageia-dev] problem with %_smp_mflags in Cauldron
Le 06/01/13 13:19,philippe makowski nous adresse ces quelques mots : Hi, I have a build fail in Cauldron (http://pkgsubmit.mageia.org/autobuild/cauldron/x86_64/core/log/python-cairo-1.10.0-3.mga3.src.rpm/build.0.20130104032637.log) because %python3_waf is resolved as /usr/bin/waf-3.3 build -l12 -j12 and I don't understand why we have in /etc/rpm/macros.d/waf-python3.macros : %python3_waf %__python3_waf build %_smp_mflags and %__python3_waf%{_bindir}/waf-%{python3_version} so why getting /usr/bin/waf-3.3 build -l12 -j12 instead of /usr/bin/waf-3.3 build -j12 from where come this -l that is not supported by waf (waf-3.3: error: no such option: -l) I believe the answer is in how the autobuild is done: http://fasmz.org/~pterjan/blog/?date=20130103#p01 The parameters are not exactly the same as the ones on the build system. Cheers, -- Malo
Re: [Mageia-dev] problem with %_smp_mflags in Cauldron
Pierre-Malo Deniélou a écrit : Le 06/01/13 13:19,philippe makowski nous adresse ces quelques mots : Hi, I have a build fail in Cauldron (http://pkgsubmit.mageia.org/autobuild/cauldron/x86_64/core/log/python-cairo-1.10.0-3.mga3.src.rpm/build.0.20130104032637.log) because %python3_waf is resolved as /usr/bin/waf-3.3 build -l12 -j12 and I don't understand why we have in /etc/rpm/macros.d/waf-python3.macros : %python3_waf %__python3_waf build %_smp_mflags and %__python3_waf %{_bindir}/waf-%{python3_version} so why getting /usr/bin/waf-3.3 build -l12 -j12 instead of /usr/bin/waf-3.3 build -j12 from where come this -l that is not supported by waf (waf-3.3: error: no such option: -l) I believe the answer is in how the autobuild is done: http://fasmz.org/~pterjan/blog/?date=20130103#p01 The parameters are not exactly the same as the ones on the build system. Cheers, There was the same problem for lv2 with the autobuild system... lv2 uses waf too ! It could correctly build on the Build System but failed with autobuild, for the same reason A workaround consists to modify the spec file : replace ./waf %{?_smp_mflags} with simply ./waf build but it will take more time to build:( A contrario : Ardour3 that uses waf can be built without any problem with the autobuild system : the spec file contains symply ; ./waf build Nevertheless, the autobuild system is now different from the BuildSystem, and I don't know if it's useful to modify your spec file, to be compliant with the autobuild, not knowing for now if the same modification will be applied inside the BS. NB some programs ask to use their own bundled version of waf... which means that modifying Mageia waf-rpm and the waf-python3.macros will not solve the problem of the smp_flags for them. Regards Philippe
Re: [Mageia-dev] problem with %_smp_mflags in Cauldron
Hi, 2013/1/6 Pascal Terjan pter...@gmail.com: So far only waf should be a problem. Maybe we could add a macro with only the number of cpus and use -j%n_cpus with waf instead of using the make flags given that it is not compatible with other make options? (In smp_mflags the second m is for make) That' s fine for me
Re: [Mageia-dev] problem with %_smp_mflags in Cauldron
On Sun, Jan 6, 2013 at 3:13 PM, philippe makowski makowski.mag...@gmail.com wrote: Hi, 2013/1/6 Pascal Terjan pter...@gmail.com: So far only waf should be a problem. Maybe we could add a macro with only the number of cpus and use -j%n_cpus with waf instead of using the make flags given that it is not compatible with other make options? (In smp_mflags the second m is for make) That' s fine for me Anyone against such patch? I would change _smp_mflags to %([ %_build_ncpus -gt 1 ] echo -j%_build_ncpus -l%_build_ncpus) later [pterjan@chopin trunk]$ svn diff Index: build.macros.in === --- build.macros.in (revision 7023) +++ build.macros.in (working copy) @@ -207,9 +207,10 @@ %{nil} -%_smp_mflags %([ -z $RPM_BUILD_NCPUS ] \\\ -RPM_BUILD_NCPUS=`/usr/bin/getconf _NPROCESSORS_ONLN`; \\\ - [ $RPM_BUILD_NCPUS -gt 1 ] echo -j$RPM_BUILD_NCPUS) +# Define _build_ncpus which can be reused with non-make build systems +# Needs to be sent upstream +%_build_ncpus %([ -n $RPM_BUILD_NCPUS ] echo $RPM_BUILD_NCPUS || /usr/bin/getconf _NPROCESSORS_ONLN) +%_smp_mflags %([ %_build_ncpus -gt 1 ] echo -j%_build_ncpus) %_make_bin make %make %{_make_bin} %_smp_mflags
Re: [Mageia-dev] problem with %_smp_mflags in Cauldron
On Sun, 6 Jan 2013, Pascal Terjan wrote: Anyone against such patch? I would change _smp_mflags to %([ %_build_ncpus -gt 1 ] echo -j%_build_ncpus -l%_build_ncpus) later [pterjan@chopin trunk]$ svn diff Index: build.macros.in === --- build.macros.in (revision 7023) +++ build.macros.in (working copy) @@ -207,9 +207,10 @@ %{nil} -%_smp_mflags %([ -z $RPM_BUILD_NCPUS ] \\\ -RPM_BUILD_NCPUS=`/usr/bin/getconf _NPROCESSORS_ONLN`; \\\ - [ $RPM_BUILD_NCPUS -gt 1 ] echo -j$RPM_BUILD_NCPUS) +# Define _build_ncpus which can be reused with non-make build systems +# Needs to be sent upstream +%_build_ncpus %([ -n $RPM_BUILD_NCPUS ] echo $RPM_BUILD_NCPUS || /usr/bin/getconf _NPROCESSORS_ONLN) +%_smp_mflags %([ %_build_ncpus -gt 1 ] echo -j%_build_ncpus) %_make_bin make %make %{_make_bin} %_smp_mflags Fine. I might call it _build_njobs but of course the name is not the important part. Christiaan