rpmbuild perl-PDL-Graphics-PLplot

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

rpmbuild perl-PDL-Graphics-PLplot

Patrick Dupre-4
Hello,

This spec file provide the an error.
Can you help me to fix it?

PLplot.c: In function 'XS_PDL__Graphics__PLplot_plgfci':
PLplot.c:85895:25: warning: unused variable 'RETVAL' [-Wunused-variable]
85895 |         unsigned int    RETVAL;
      |                         ^~~~~~
/usr/lib64/perl5/vendor_perl/PDL/PP.pm: In function 'pdl_init_pltr_copy':
/usr/lib64/perl5/vendor_perl/PDL/PP.pm:3385:61: warning: array subscript '_7 + -1' is outside the bounds of an interior zero-length array 'struct pdl *[0:]' [-Wzero-length-bounds]
 3385 |                          for(i=0; i<__copy->vtable->npdls; i++)
      |                                            ~~~~~~~~~~~~~~~~~^~~
In file included from /usr/lib64/perl5/vendor_perl/PDL/PP.pm:1020:
/usr/lib64/perl5/vendor_perl/PDL/Core/pdl.h:291:8: note: while referencing 'pdls'
  291 |   pdl *pdls[np]
      |        ^~~~
/usr/lib64/perl5/vendor_perl/PDL/PP.pm:3385:38: warning: array subscript '_7 + -1' is outside the bounds of an interior zero-length array 'struct pdl *[0:]' [-Wzero-length-bounds]
 3385 |                          for(i=0; i<__copy->vtable->npdls; i++)
      |                          ~~~~~~~~~~~~^~~
In file included from /usr/lib64/perl5/vendor_perl/PDL/PP.pm:1020:
/usr/lib64/perl5/vendor_perl/PDL/Core/pdl.h:291:8: note: while referencing 'pdls'
  291 |   pdl *pdls[np]
      |        ^~~~
cc1: some warnings being treated as errors
make: *** [Makefile:345: PLplot.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.FwlY8K (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.FwlY8K (%build)

-------------------------------------------------------

Name:           perl-PDL-Graphics-PLplot
Version:        0.74
Release:        1%{?dist}
Summary:        PDL::Graphics::PLplot Perl module
License:        CHECK(Distributable)
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/PDL-Graphics-PLplot/
Source0:        <a href="http://www.cpan.org/modules/by-module/PDL/PDL-Graphics-PLplot-%">http://www.cpan.org/modules/by-module/PDL/PDL-Graphics-PLplot-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(PDL)
Requires:       perl(PDL)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
The interface consists of two levels.  A low level interface which maps
closely to the PLplot C interface, and a high level, object-oriented
interface which is easier to use.

%prep
%setup -q -n PDL-Graphics-PLplot-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} $RPM_BUILD_ROOT/*

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc Changes META.json plplot.pd README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/PDL*
%{_mandir}/man3/*

%changelog
* Sat Jun 19 2021 Patrick Dupre <[hidden email]> 0.74-1
- Specfile autogenerated by cpanspec 1.78.


===========================================================================
 Patrick DUPRÉ                                 | | email: [hidden email]
 Laboratoire interdisciplinaire Carnot de Bourgogne
 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
 Tel: +33 (0)380395988                    | | Room# D114A
===========================================================================
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Reply | Threaded
Open this post in threaded view
|

Re: rpmbuild perl-PDL-Graphics-PLplot

Jerry James
On Sat, Jun 19, 2021 at 9:00 AM Patrick Dupre <[hidden email]> 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.
--
Jerry James
http://www.jamezone.org/
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
Reply | Threaded
Open this post in threaded view
|

Re: rpmbuild perl-PDL-Graphics-PLplot

Patrick Dupre-4
Here is the new error

rpmbuild -bb  perl-PDL-Graphics-PLplot.spec
warning: Macro expanded in comment on line 9: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

setting SOURCE_DATE_EPOCH=1624060800
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.N0YTFx
+ umask 022
+ cd /home/pdupre/rpmbuild/BUILD
+ cd /home/pdupre/rpmbuild/BUILD
+ rm -rf PDL-Graphics-PLplot-0.74
+ /usr/bin/gzip -dc /home/pdupre/rpmbuild/SOURCES/PDL-Graphics-PLplot-0.74.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd PDL-Graphics-PLplot-0.74
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.tGOSuc
+ umask 022
+ cd /home/pdupre/rpmbuild/BUILD
+ cd PDL-Graphics-PLplot-0.74
+ /usr/bin/perl Makefile.PL INSTALLDIRS=vendor 'OPTIMIZE=-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection'
PDL is installed
Bad value support required!  (Turn on WITH_BADVAL in perldl.conf)
      Not building PDL::Graphics::PLplot


Bad value support required!  (Turn on WITH_BADVAL in perldl.conf)      Not building PDL::Graphics::PLplot
Checking if your kit is complete...
Looks good
+ /usr/bin/make -O -j4 V=1 VERBOSE=1
make: Nothing to be done for 'all'.
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.PqxSJM
+ umask 022
+ cd /home/pdupre/rpmbuild/BUILD
+ '[' /home/pdupre/rpmbuild/BUILDROOT/perl-PDL-Graphics-PLplot-0.74-1.fc34.x86_64 '!=' / ']'
+ rm -rf /home/pdupre/rpmbuild/BUILDROOT/perl-PDL-Graphics-PLplot-0.74-1.fc34.x86_64
++ dirname /home/pdupre/rpmbuild/BUILDROOT/perl-PDL-Graphics-PLplot-0.74-1.fc34.x86_64
+ mkdir -p /home/pdupre/rpmbuild/BUILDROOT
+ mkdir /home/pdupre/rpmbuild/BUILDROOT/perl-PDL-Graphics-PLplot-0.74-1.fc34.x86_64
+ cd PDL-Graphics-PLplot-0.74
+ make pure_install PERL_INSTALL_ROOT=/home/pdupre/rpmbuild/BUILDROOT/perl-PDL-Graphics-PLplot-0.74-1.fc34.x86_64
make: *** No rule to make target 'pure_install'.  Stop.
error: Bad exit status from /var/tmp/rpm-tmp.PqxSJM (%install)


RPM build errors:
    Macro expanded in comment on line 9: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

    Bad exit status from /var/tmp/rpm-tmp.PqxSJM (%install)

------------------------------------------------------------------------
and the spec file

Name:           perl-PDL-Graphics-PLplot
Version:        0.74
Release:        1%{?dist}
Summary:        PDL::Graphics::PLplot Perl module
License:        CHECK(Distributable)
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/PDL-Graphics-PLplot/
Source0:        <a href="http://www.cpan.org/modules/by-module/PDL/PDL-Graphics-PLplot-%">http://www.cpan.org/modules/by-module/PDL/PDL-Graphics-PLplot-%{version}.tar.gz
##BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(PDL)
#Requires:       perl(PDL)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
The interface consists of two levels.  A low level interface which maps
closely to the PLplot C interface, and a high level, object-oriented
interface which is easier to use.

%prep
%setup -q -n PDL-Graphics-PLplot-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
#make %{?_smp_mflags}
%make_build

%install
#rm -rf $RPM_BUILD_ROOT

make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} $RPM_BUILD_ROOT/*

%check
make test

#%clean
#rm -rf $RPM_BUILD_ROOT

%files
#%defattr(-,root,root,-)
%doc Changes META.json plplot.pd README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/PDL*
%{_mandir}/man3/*

%changelog
* Sat Jun 19 2021 Patrick Dupre <[hidden email]> 0.74-1
- Specfile autogenerated by cpanspec 1.78.




> Subject: Re: rpmbuild perl-PDL-Graphics-PLplot
>
> On Sat, Jun 19, 2021 at 9:00 AM Patrick Dupre <[hidden email]> 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.
> --
> Jerry James
> http://www.jamezone.org/
> _______________________________________________
> users mailing list -- [hidden email]
> To unsubscribe send an email to [hidden email]
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/users@...
> Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
>
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@...
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure