Segmentation fault by running giacpy tests

Répondre
sagitter
Messages : 31
Inscription : sam. mai 14, 2016 6:19 pm
Localisation : Italy

Segmentation fault by running giacpy tests

Message par sagitter » jeu. déc. 21, 2017 2:44 pm

Hi all.

I'm getting following error by running giacpy tests on i686 architectures only:

Code : Tout sélectionner

+ cd giacpy-0.6.2
+ pushd giacpy
~/build/BUILD/giacpy-0.6.2/giacpy ~/build/BUILD/giacpy-0.6.2
+ export PYTHONPATH=/builddir/build/BUILDROOT/python-giacpy-0.6.2-2.fc28.i386/usr/lib/python2.7/site-packages
+ PYTHONPATH=/builddir/build/BUILDROOT/python-giacpy-0.6.2-2.fc28.i386/usr/lib/python2.7/site-packages
+ /usr/bin/python2 -m doctest giacpy.pyx -v
Trying:
    from giacpy import giac
Expecting nothing
// Giac share root-directory:/usr/share/giac/
// Giac share root-directory:/usr/share/giac/
Added 165 synonyms
/var/tmp/rpm-tmp.DrC91h: line 33:  7600 Segmentation fault      (core dumped) /usr/bin/python2 -m doctest giacpy.pyx -v
RPM build errors:
I can't report additional informations because i'm not able to reproduce/debug correctly this error.
giacpy is built against giac-1.4.9.41 and qcas-0.5.2.

giacpy tests do not fail with giac < 1.4.9.41.

Can you reproduce it in some way please?

If you need same Fedora environment, you can rebuild my rpms:

qcas: https://kojipkgs.fedoraproject.org//pac ... 28.src.rpm
giac: https://kojipkgs.fedoraproject.org//pac ... 28.src.rpm

Thanks.
mailto: sagitter 'at' fedoraproject 'dot' org
https://fedoraproject.org/wiki/User:Sagitter

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Segmentation fault by running giacpy tests

Message par frederic han » ven. déc. 22, 2017 12:40 pm

up to now ( my base system is fedora x86_64) in:
mock -r fedora-rawhide-i386 --shell

I am already not able to run icas. (it starts but crash with any computation: Ex: 2+2)
I have also tried to rebuilt 1.4.9-33 from the srpm but it crash also.

Are you able to run some computations with icas?

Thank you for your work on qcas. I have fix some headers for libqcas and remove some unecessary files in qcas-data.
http://webusers.imj-prg.fr/~frederic.han/tests/
(feel free to change it)
I have also remove the qcas subdir in giacpy source to avoid version conflicts with the libqcas headers and change the setup.py to use libqcas.
It works on x86_64 fc27.
libqcas needs the libgiac library but doesn't need qcas. (same for the devel files)
qcas needs the libgiac library at runtime

about the test suite sometime it is not a good idea to run it from the giacpy dir because could import other giacpy files than the expected one.
in build/lib.linux-x86_64-3.6

Code : Tout sélectionner

python3 -mdoctest -v ../../giacpy/giacpy.pyx
is fine.
I will try on virtualbox for i686

sagitter
Messages : 31
Inscription : sam. mai 14, 2016 6:19 pm
Localisation : Italy

Re: Segmentation fault by running giacpy tests

Message par sagitter » sam. déc. 23, 2017 9:00 am

frederic han a écrit :up to now ( my base system is fedora x86_64) in:
mock -r fedora-rawhide-i386 --shell

I am already not able to run icas. (it starts but crash with any computation: Ex: 2+2)
I have also tried to rebuilt 1.4.9-33 from the srpm but it crash also.

Are you able to run some computations with icas?
giacpy 0.6.3pre tested on fedora rawhide via mock: segmentation fault appears by testing like reported on README.txt
On Fedora 27, tests work.

If you need giac-1.4.9.33:
Fedora rawhide: https://koji.fedoraproject.org/koji/bui ... ID=1007061
Fedora 27: https://koji.fedoraproject.org/koji/bui ... ID=1007060
Thank you for your work on qcas. I have fix some headers for libqcas and remove some unecessary files in qcas-data.
http://webusers.imj-prg.fr/~frederic.han/tests/
(feel free to change it)
I have also remove the qcas subdir in giacpy source to avoid version conflicts with the libqcas headers and change the setup.py to use libqcas.
It works on x86_64 fc27.
libqcas needs the libgiac library but doesn't need qcas. (same for the devel files)
qcas needs the libgiac library at runtime

about the test suite sometime it is not a good idea to run it from the giacpy dir because could import other giacpy files than the expected one.
in build/lib.linux-x86_64-3.6

Code : Tout sélectionner

python3 -mdoctest -v ../../giacpy/giacpy.pyx
is fine.
I will try on virtualbox for i686
Okay, qcas and giacpy modified according to the tricks like above.
mailto: sagitter 'at' fedoraproject 'dot' org
https://fedoraproject.org/wiki/User:Sagitter

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Segmentation fault by running giacpy tests

Message par frederic han » sam. déc. 23, 2017 10:01 am

I think that the problem is already with the giac built in rawhide-i386:

in fedora-27-i386: intalled under virtualbox
I can built and run successfully your giac src.rpm 1.4.9-41 and qcas and giacpy.
but if I test fedora-rawhide-i386 with mock under this host, I can launch icas but 2+2 gives a segfault.

Now under my x86_64 computer:

mock -r fedora-27-i386 can built your giac 1.4.9-41 then I install it from the mock shell and icas runs properly. I can even run all the giac test suite. Then I can built and install libqcas-devel and build and run the giacpy test suite.


while with mock -r fedora-rawhide-i386 icas 1.4.9-41 builts and althoug I can launch icas, any computation such as 2+2 gives a segfault,

So I think that giac is broken in rawhide-i386 (even if the built doesn't complain, any computation such as 2+2 gives a segfault) I think that it is not typical to 1.4.9-41.

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Segmentation fault by running giacpy tests

Message par frederic han » sam. déc. 23, 2017 3:02 pm

It seems to be related with threads and giac.
on fedora-rawhide-i386 I can built and run basic examples such as pgcd.cc, I can also run giacpy if I avoid the instructions using threads.

but in icas here is the following debugging session of:
icas then type 2:

Code : Tout sélectionner

Starting program: /usr/bin/icas 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
// Using locale /usr/share/locale/
// fr_FR.UTF-8
// /usr/share/locale/
// giac
// UTF-8
// Maximum number of parallel threads 4
Help file /usr/share/giac/doc/fr/aide_cas not found
Added 165 synonyms
Welcome to giac readline interface
(c) 2001,2017 B. Parisse & others
Homepage http://www-fourier.ujf-grenoble.fr/~parisse/giac.html
Released under the GPL license 3.0 or above
See http://www.gnu.org for license details
May contain BSD licensed software parts (lapack, atlas, tinymt)
-------------------------------------------------
Press CTRL and D simultaneously to finish session
Type ?commandname for help
0>> 2
[New Thread 0xf4d7bb40 (LWP 31401)]
[Switching to Thread 0xf4d7bb40 (LWP 31401)]

Thread 2 "icas" hit Breakpoint 1, giac::in_thread_eval (arg=0x56722610) at global.cc:3531
3531	    pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL);
(gdb) n
3532	    pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL);
(gdb) n
3534	    context * contextptr=(context *) (*v)[2]._POINTER_val;
(gdb) n
3535	    thread_param * ptr =thread_param_ptr(contextptr);
(gdb) n
3534	    context * contextptr=(context *) (*v)[2]._POINTER_val;
(gdb) n
3535	    thread_param * ptr =thread_param_ptr(contextptr);
(gdb) n
3534	    context * contextptr=(context *) (*v)[2]._POINTER_val;
(gdb) n
3535	    thread_param * ptr =thread_param_ptr(contextptr);
(gdb) n
3536	    pthread_attr_getstacksize(&ptr->attr,&ptr->stacksize);
(gdb) n
3535	    thread_param * ptr =thread_param_ptr(contextptr);
(gdb) n
3536	    pthread_attr_getstacksize(&ptr->attr,&ptr->stacksize);
(gdb) n
3537	    ptr->stackaddr=(void *) ((uintptr_t) &ptr-ptr->stacksize);
(gdb) n
3540	    times(&tmp1);
(gdb) n
3544	    gen g = (*v)[0];
(gdb) n
3545	    g = giac::protecteval(g,(*v)[1].val,contextptr);
(gdb) n
n3550	      times(&tmp2);
(gdb) n
3551	      double dt=delta_tms(tmp1,tmp2);
(gdb) n
3552	      total_time(contextptr) += dt;
(gdb) n
3551	      double dt=delta_tms(tmp1,tmp2);
(gdb) n
3552	      total_time(contextptr) += dt;
(gdb) n
3553	      (*v)[4]=dt;
(gdb) n
3558	      (*v)[5]=g;
(gdb) n
3564	    ptr->stackaddr=0;
(gdb) n
3565	    thread_eval_status(0,contextptr);
(gdb) n
3564	    ptr->stackaddr=0;
(gdb) n
3565	    thread_eval_status(0,contextptr);
(gdb) n
3566	    pthread_exit(0);
(gdb) n

Thread 2 "icas" received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
Bernard do you have any idea?

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Segmentation fault by running giacpy tests

Message par parisse » dim. déc. 24, 2017 8:41 am

Perhaps it expects a void * return value, what happens if you add return 0; at the end of in_thread_eval?

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Segmentation fault by running giacpy tests

Message par frederic han » dim. déc. 24, 2017 12:08 pm

Yes it solves the PB on rawhide i386.

Code : Tout sélectionner

--- src/global.cc.orig	2017-12-14 13:51:12.000000000 +0100
+++ src/global.cc	2017-12-24 10:28:00.931310292 +0100
@@ -3563,7 +3563,7 @@
 #endif
     ptr->stackaddr=0;
     thread_eval_status(0,contextptr);
-    pthread_exit(0);
+    return 0;//pthread_exit(0); //crash in i386 fedora rawhide (fc28)
   }
 
   // create a new thread for evaluation of g at level level in context
--- src/Tableur.cc	2017-11-20 09:17:13.000000000 +0100
+++ src/Tableur.cc	2017-12-24 10:27:04.518559078 +0100
@@ -786,7 +786,7 @@
     matrice * mptr = (matrice *) (*v)[0]._POINTER_val;
     giac::spread_eval(*mptr,contextptr);
     thread_eval_status(0,contextptr);
-    pthread_exit(0);
+    return 0;//pthread_exit(0); //crash in i386 fedora rawhide (fc28)
   }
 
   void thread_spread_eval(matrice &m,GIAC_CONTEXT){
Also I could enable all the test suite on i386 and x86_64.

@antonio: did the following change in the test suite improved things for you?
http://xcas.e.ujf-grenoble.fr/XCAS/view ... an16#p9342

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Segmentation fault by running giacpy tests

Message par parisse » dim. déc. 24, 2017 3:46 pm

I don't think one should comment pthread_exit(0);, just add return 0;

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Segmentation fault by running giacpy tests

Message par frederic han » lun. déc. 25, 2017 11:55 am

Adding return 0 after pthread_exit doesn't help (it is not reached):

why is line 3544 executed twice?

Code : Tout sélectionner

Welcome to giac readline interface
(c) 2001,2017 B. Parisse & others
Homepage http://www-fourier.ujf-grenoble.fr/~parisse/giac.html
Released under the GPL license 3.0 or above
See http://www.gnu.org for license details
May contain BSD licensed software parts (lapack, atlas, tinymt)
-------------------------------------------------
Press CTRL and D simultaneously to finish session
Type ?commandname for help
0>> 17
[New Thread 0xf4997b40 (LWP 6724)]
[Switching to Thread 0xf4997b40 (LWP 6724)]

Thread 2 "icas" hit Breakpoint 1, start_thread (arg=0xf4997b40) at pthread_create.c:463
463	      THREAD_SETMEM (pd, result, pd->start_routine (pd->arg));
(gdb) n

Thread 2 "icas" hit Breakpoint 2, giac::in_thread_eval (arg=0x8232130) at global.cc:3531
3531	    pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL);
(gdb) n
3532	    pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS,NULL);
(gdb) n
3533	    vecteur *v = (vecteur *) arg;
(gdb) n
3534	    context * contextptr=(context *) (*v)[2]._POINTER_val;
(gdb) n
3535	    thread_param * ptr =thread_param_ptr(contextptr);
(gdb) n
3536	    pthread_attr_getstacksize(&ptr->attr,&ptr->stacksize);
(gdb) n
3537	    ptr->stackaddr=(void *) ((uintptr_t) &ptr-ptr->stacksize);
(gdb) n
3540	    times(&tmp1);
(gdb) n
3544	    gen g = (*v)[0];
(gdb) p *v
$3 = {<std::imvector<giac::gen>> = {_taille = 6, {_ptr = {0x8232184, 0x82321c4}, _tab = {136520068, 
        136520132, 0, 0, 0, 0}}}, <No data fields>}
(gdb) p g
$4 = {type = 0 '\000', type_unused = 0 '\000', subtype = 0 '\000', reserved = 0, {val = 0, __ZINTptr = 0x0, 
    __REALptr = 0x0, __CPLXptr = 0x0, __IDNTptr = 0x0, __SYMBptr = 0x0, __MODptr = 0x0, __EXTptr = 0x0, 
    __FRACptr = 0x0, __POLYptr = 0x0, __VECTptr = 0x0, __SPOL1ptr = 0x0, __STRNGptr = 0x0, _FUNC_ = 0, 
    __USERptr = 0x0, __MAPptr = 0x0, __EQWptr = 0x0, __GROBptr = 0x0, __POINTERptr = 0x0}}
(gdb) n
3545	    g = giac::protecteval(g,(*v)[1].val,contextptr);
(gdb) p *v
$5 = {<std::imvector<giac::gen>> = {_taille = 6, {_ptr = {0x8232184, 0x82321c4}, _tab = {136520068, 
        136520132, 0, 0, 0, 0}}}, <No data fields>}
(gdb) p g
$6 = {type = 0 '\000', type_unused = 0 '\000', subtype = 0 '\000', reserved = 0, {val = 17, 
    __ZINTptr = 0x11, __REALptr = 0x11, __CPLXptr = 0x11, __IDNTptr = 0x11, __SYMBptr = 0x11, 
    __MODptr = 0x11, __EXTptr = 0x11, __FRACptr = 0x11, __POLYptr = 0x11, __VECTptr = 0x11, 
    __SPOL1ptr = 0x11, __STRNGptr = 0x11, _FUNC_ = 17, __USERptr = 0x11, __MAPptr = 0x11, __EQWptr = 0x11, 
    __GROBptr = 0x11, __POINTERptr = 0x11}}
(gdb) n
3550	      times(&tmp2);
(gdb) n
3551	      double dt=delta_tms(tmp1,tmp2);
(gdb) n
3552	      total_time(contextptr) += dt;
(gdb) n
3553	      (*v)[4]=dt;
(gdb) n
3558	      (*v)[5]=g;
(gdb) n
3564	    ptr->stackaddr=0;
(gdb) n
3565	    thread_eval_status(0,contextptr);
(gdb) n
3566	    pthread_exit(0); //crash in i386 fedora rawhide (fc28)
(gdb) n
0xf77c70b5	3560	    } catch (std::runtime_error & e){
(gdb) n
3544	    gen g = (*v)[0];
(gdb) n

Thread 2 "icas" received signal SIGSEGV, Segmentation fault.
0xc483c019 in ?? ()

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Segmentation fault by running giacpy tests

Message par parisse » mar. déc. 26, 2017 7:39 am

Indeed, since pthread_exit(0) does not return. But if the thread is not finished I'm afraid problems will happen later.
If you have compiled with -g -O2 (default) then optimizations will make line numbers being executed inside gdb strange. Recompile with -g only.

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Segmentation fault by running giacpy tests

Message par frederic han » mar. déc. 26, 2017 10:15 am

that was already the output with a rebuilt with -O2 removed in the Makefiles.

I am wondering about this version of glibc (2.26.9000) on i386 because it worked fine in fc27 i386.
could it be something similar to
https://bugzilla.redhat.com/show_bug.cgi?id=1516394


I have also tried with the
https://kojipkgs.fedoraproject.org//pac ... 28.src.rpm

Code : Tout sélectionner

<mock-chroot> sh-4.4# rpm -q glibc
glibc-2.26.9000-34.fc28.i686
<mock-chroot> sh-4.4# rpm -q giac
giac-1.4.9.43-1.fc28.i686
<mock-chroot> sh-4.4# gdb icas
GNU gdb (GDB) Fedora 8.0.50.20171213-35.fc28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from icas...Reading symbols from /usr/lib/debug/usr/bin/icas-1.4.9.43-1.fc28.i386.debug...done.
done.
(gdb) r
Starting program: /usr/bin/icas 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Missing separate debuginfo for /lib/sse2/libgf2x.so.1
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/77/abebab3e666aa911fcbfe609cbe9d4cf876a75.debug
// Using locale /usr/share/locale/
// fr_FR.UTF-8
// /usr/share/locale/
// giac
// UTF-8
// Maximum number of parallel threads 4
Help file /usr/share/giac/doc/fr/aide_cas not found
Added 165 synonyms
Welcome to giac readline interface
(c) 2001,2017 B. Parisse & others
Homepage http://www-fourier.ujf-grenoble.fr/~parisse/giac.html
Released under the GPL license 3.0 or above
See http://www.gnu.org for license details
May contain BSD licensed software parts (lapack, atlas, tinymt)
-------------------------------------------------
Press CTRL and D simultaneously to finish session
Type ?commandname for help
0>> 7
[New Thread 0xf4d73b40 (LWP 30)]

Thread 2 "icas" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf4d73b40 (LWP 30)]
0x56878f90 in ?? ()
Missing separate debuginfos, use: dnf debuginfo-install blas-3.8.0-3.fc28.i686 bzip2-libs-1.0.6-24.fc27.i686 expat-2.2.5-1.fc28.i686 fltk-1.3.4-3.fc27.i686 fontconfig-2.12.91-2.fc28.i686 freetype-2.8-7.fc28.i686 gmp-6.1.2-6.fc27.i686 gsl-2.4-3.fc27.i686 lapack-3.8.0-3.fc28.i686 libX11-1.6.5-5.fc28.i686 libXau-1.0.8-10.fc28.i686 libXcursor-1.1.14-10.fc27.i686 libXext-1.3.3-7.fc27.i686 libXfixes-5.0.3-4.fc27.i686 libXft-2.3.2-7.fc27.i686 libXinerama-1.1.3-9.fc27.i686 libXrender-0.9.10-4.fc27.i686 libgcc-7.2.1-4.fc28.i686 libgfortran-7.2.1-4.fc28.i686 libglvnd-1.0.0-1.fc28.i686 libglvnd-glx-1.0.0-1.fc28.i686 libjpeg-turbo-1.5.3-1.fc28.i686 libpng-1.6.34-1.fc28.i686 libquadmath-7.2.1-4.fc28.i686 libstdc++-7.2.1-4.fc28.i686 libuuid-2.31-2.fc28.i686 libxcb-1.12-5.fc27.i686 mesa-libGLU-9.0.0-13.fc27.i686 mpfi-1.5.1-12.fc27.i686 mpfr-3.1.5-5.fc27.i686 ncurses-libs-6.0-15.20171125.fc28.i686 ntl-10.5.0-1.fc28.i686 pari-2.9.3-3.fc27.i686 readline-7.0-7.fc27.i686 zlib-1.2.11-4.fc27.i686
(gdb) bt
#0  0x56878f90 in ?? ()
#1  0xf6c443c9 in start_thread (arg=0xf4d73b40) at pthread_create.c:463
#2  0xf68337a6 in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:108
(gdb) b pthread_create.c:462

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Segmentation fault by running giacpy tests

Message par frederic han » lun. janv. 01, 2018 11:53 am

I have reported this on:

https://bugzilla.redhat.com/show_bug.cgi?id=1529549

it seems to be a gcc bug giving a miscompilation of libpthread

sagitter
Messages : 31
Inscription : sam. mai 14, 2016 6:19 pm
Localisation : Italy

Re: Segmentation fault by running giacpy tests

Message par sagitter » dim. janv. 14, 2018 7:24 pm

frederic han a écrit :I have reported this on:

https://bugzilla.redhat.com/show_bug.cgi?id=1529549

it seems to be a gcc bug giving a miscompilation of libpthread
This bug on Fedora is fixed.
giacpy tests are correctly executed now: https://koji.fedoraproject.org/koji/tas ... D=24199758

Thanks.
mailto: sagitter 'at' fedoraproject 'dot' org
https://fedoraproject.org/wiki/User:Sagitter

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Segmentation fault by running giacpy tests

Message par frederic han » ven. janv. 19, 2018 11:29 am

Thank you!
so I was able to built your package python-giacpy-0.6.5-1 from the spec file.

NB: giacpy2qcas.cpp can also be deleted (it looks that something in the setup.py automatically install the .cpp files despite that they are not listed explicitly in package_data)
NB2: *.pxd files are also for the -devel package
NB3: giac-doc is not a requirement for giacpy. cython is not used by giacpy (it is only used to create the .cpp files)

for instance I a tried:

Code : Tout sélectionner

--- a/python-giacpy.spec
+++ b/python-giacpy-fh.spec
@@ -15,7 +15,6 @@ License:        GPLv2+
 URL:            http://webusers.imj-prg.fr/~frederic.han/xcas/giacpy/
 Source0:        https://files.pythonhosted.org/packages/source/g/%{module}/%{module}-%{version}.tar.gz
 BuildRequires:  giac-devel >= %{giacver}
-BuildRequires:  giac-doc   >= %{giacver}
 BuildRequires:  gmp-devel, qt5-qtsvg-devel
 
 %description
@@ -27,10 +26,7 @@ Summary:        Python2 binding for Giac
 %{?python_provide:%python_provide python2-%{module}}
 
 BuildRequires:  python2-devel
-BuildRequires:  python2-Cython
 BuildRequires:  libqcas-devel
-Requires:       python2-Cython%{?_isa}
-Requires:       giac-doc
 
 %description -n python2-%{module}
 A Cython frontend to the c++ library Giac (Computer Algebra System).
@@ -49,10 +45,7 @@ Summary:        Python3 binding for Giac
 %{?python_provide:%python_provide python3-%{module}}
 
 BuildRequires:  python3-devel
-BuildRequires:  python3-Cython
 BuildRequires:  libqcas-devel
-Requires:       python3-Cython%{?_isa}
-Requires:       giac-doc
 
 %description -n python3-%{module}
 A Cython frontend to the c++ library Giac (Computer Algebra System).
@@ -77,10 +70,12 @@ CFLAGS="%{optflags}" %{__python3} setup.py  build --enable-qcas --executable="%{
 %install
 %py2_install
 rm -f $RPM_BUILD_ROOT%{python2_sitearch}/%{module}/giacpy.cpp
+rm -f $RPM_BUILD_ROOT%{python2_sitearch}/%{module}/giacpy2qcas.cpp
 rm -f $RPM_BUILD_ROOT%{python2_sitearch}/%{module}/GPL-2
 
 %py3_install
 rm -f $RPM_BUILD_ROOT%{python3_sitearch}/%{module}/giacpy.cpp
+rm -f $RPM_BUILD_ROOT%{python3_sitearch}/%{module}/giacpy2qcas.cpp
 rm -f $RPM_BUILD_ROOT%{python3_sitearch}/%{module}/GPL-2
 
 %if 0%{?with_check}
@@ -103,12 +98,14 @@ popd
 %exclude %{python2_sitearch}/%{module}/*.h
 %exclude %{python2_sitearch}/%{module}/*.pyx
 %exclude %{python2_sitearch}/%{module}/*.pxi
+%exclude %{python2_sitearch}/%{module}/*.pxd
 %{python2_sitearch}/%{module}*.egg-info/
 
 %files -n python2-%{module}-devel
 %{python2_sitearch}/%{module}/*.h
 %{python2_sitearch}/%{module}/*.pyx
 %{python2_sitearch}/%{module}/*.pxi
+%{python2_sitearch}/%{module}/*.pxd
 
 %files -n python3-%{module}
 %doc README.txt
@@ -117,12 +114,14 @@ popd
 %exclude %{python3_sitearch}/%{module}/*.h
 %exclude %{python3_sitearch}/%{module}/*.pyx
 %exclude %{python3_sitearch}/%{module}/*.pxi
+%exclude %{python3_sitearch}/%{module}/*.pxd
 %{python3_sitearch}/%{module}*.egg-info/
 
 %files -n python3-%{module}-devel
 %{python3_sitearch}/%{module}/*.h
 %{python3_sitearch}/%{module}/*.pyx
 %{python3_sitearch}/%{module}/*.pxi
+%{python3_sitearch}/%{module}/*.pxd
 
 %changelog
 * Mon Jan 15 2018 Antonio Trande <sagitterATfedoraproject.org> - 0.6.5-1
[fred@host-43-59 fedora]$ 
[fred@host-43-59 fedora]$ cat tutu.diff 
diff --git a/python-giacpy.spec b/python-giacpy-fh.spec
index b380544..a2fced6 100644
--- a/python-giacpy.spec
+++ b/python-giacpy-fh.spec
@@ -15,7 +15,6 @@ License:        GPLv2+
 URL:            http://webusers.imj-prg.fr/~frederic.han/xcas/giacpy/
 Source0:        https://files.pythonhosted.org/packages/source/g/%{module}/%{module}-%{version}.tar.gz
 BuildRequires:  giac-devel >= %{giacver}
-BuildRequires:  giac-doc   >= %{giacver}
 BuildRequires:  gmp-devel, qt5-qtsvg-devel
 
 %description
@@ -27,10 +26,7 @@ Summary:        Python2 binding for Giac
 %{?python_provide:%python_provide python2-%{module}}
 
 BuildRequires:  python2-devel
-BuildRequires:  python2-Cython
 BuildRequires:  libqcas-devel
-Requires:       python2-Cython%{?_isa}
-Requires:       giac-doc
 
 %description -n python2-%{module}
 A Cython frontend to the c++ library Giac (Computer Algebra System).
@@ -49,10 +45,7 @@ Summary:        Python3 binding for Giac
 %{?python_provide:%python_provide python3-%{module}}
 
 BuildRequires:  python3-devel
-BuildRequires:  python3-Cython
 BuildRequires:  libqcas-devel
-Requires:       python3-Cython%{?_isa}
-Requires:       giac-doc
 
 %description -n python3-%{module}
 A Cython frontend to the c++ library Giac (Computer Algebra System).
@@ -77,10 +70,12 @@ CFLAGS="%{optflags}" %{__python3} setup.py  build --enable-qcas --executable="%{
 %install
 %py2_install
 rm -f $RPM_BUILD_ROOT%{python2_sitearch}/%{module}/giacpy.cpp
+rm -f $RPM_BUILD_ROOT%{python2_sitearch}/%{module}/giacpy2qcas.cpp
 rm -f $RPM_BUILD_ROOT%{python2_sitearch}/%{module}/GPL-2
 
 %py3_install
 rm -f $RPM_BUILD_ROOT%{python3_sitearch}/%{module}/giacpy.cpp
+rm -f $RPM_BUILD_ROOT%{python3_sitearch}/%{module}/giacpy2qcas.cpp
 rm -f $RPM_BUILD_ROOT%{python3_sitearch}/%{module}/GPL-2
 
 %if 0%{?with_check}
@@ -103,12 +98,14 @@ popd
 %exclude %{python2_sitearch}/%{module}/*.h
 %exclude %{python2_sitearch}/%{module}/*.pyx
 %exclude %{python2_sitearch}/%{module}/*.pxi
+%exclude %{python2_sitearch}/%{module}/*.pxd
 %{python2_sitearch}/%{module}*.egg-info/
 
 %files -n python2-%{module}-devel
 %{python2_sitearch}/%{module}/*.h
 %{python2_sitearch}/%{module}/*.pyx
 %{python2_sitearch}/%{module}/*.pxi
+%{python2_sitearch}/%{module}/*.pxd
 
 %files -n python3-%{module}
 %doc README.txt
@@ -117,12 +114,14 @@ popd
 %exclude %{python3_sitearch}/%{module}/*.h
 %exclude %{python3_sitearch}/%{module}/*.pyx
 %exclude %{python3_sitearch}/%{module}/*.pxi
+%exclude %{python3_sitearch}/%{module}/*.pxd
 %{python3_sitearch}/%{module}*.egg-info/
 
 %files -n python3-%{module}-devel
 %{python3_sitearch}/%{module}/*.h
 %{python3_sitearch}/%{module}/*.pyx
 %{python3_sitearch}/%{module}/*.pxi
+%{python3_sitearch}/%{module}/*.pxd
 
 %changelog
 * Mon Jan 15 2018 Antonio Trande <sagitterATfedoraproject.org> - 0.6.5-1

Répondre