On Sat, Jun 19, 2021 at 9:00 AM Patrick Dupre pdupre@gmx.com wrote:
This spec file provide the an error. Can you help me to fix it?
You didn't show the compiler flags in use, so this is just a guess, but ...
cc1: some warnings being treated as errors
... this message suggests that -Werror is included. Remove that and see what happens.
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Remove the BuildRoot line. That hasn't been needed for years.
Requires: perl(PDL)
This Requires *should* be autogenerated. Try removing it and see if the binary package includes an equivalent Requires.
make %{?_smp_mflags}
Use %make_build instead.
%install rm -rf $RPM_BUILD_ROOT
Remove the second line above. It is unnecessary and occasionally dangerous.
%clean rm -rf $RPM_BUILD_ROOT
Remove the entire %clean section. RPM already does this for you.
%defattr(-,root,root,-)
Remove the %defattr line. RPM already does this for you.