Make it possible to build giac without fltk again

Librairie C++ de calcul formel/ C++ symbolic computation library

Modérateur : xcasadmin

fbissey
Messages : 8
Inscription : sam. juin 24, 2017 9:56 pm

Make it possible to build giac without fltk again

Message par fbissey » dim. juin 25, 2017 10:00 pm

I am working on the gentoo ebuild for giac. This is somewhat related to the post of my debian colleagues in http://xcas.e.ujf-grenoble.fr/XCAS/view ... f=4&t=1812 but slightly more pointy.
In 1.2.3-51 it is impossible to build giac without fltk even if you pass --disable-gui to configure. The first piece of code that make it choke is

Code : Tout sélectionner

  bool has_graph3d(Fl_Widget * widget){
#ifdef HAVE_LIBFLTK
    Fl_Group * g=dynamic_cast<Fl_Group *>(widget);
in src/Xcas.cc where, as one can see, some fltk code is outside the fltk guard. There may be other occurrences. I won't update the package for Gentoo until this is fixed one way or another. The package included in sage cannot be updated either since sage doesn't ship or require fltk at this stage.

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

Re: Make it possible to build giac without fltk again

Message par parisse » lun. juin 26, 2017 12:05 pm

Should be fixed with 1.2.3-53 just released.

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

Re: Make it possible to build giac without fltk again

Message par parisse » mar. juin 27, 2017 12:03 pm

1.2.3-55 should be used, 1.2.3-53 has incompatibilites with giacpy.

fbissey
Messages : 8
Inscription : sam. juin 24, 2017 9:56 pm

Re: Make it possible to build giac without fltk again

Message par fbissey » jeu. juil. 20, 2017 8:06 am

Thanks. I have to check my forum settings since your update didn't reach me.

fbissey
Messages : 8
Inscription : sam. juin 24, 2017 9:56 pm

Re: Make it possible to build giac without fltk again

Message par fbissey » ven. juil. 21, 2017 11:11 am

I have just tried 1.2.3-57 with sage and the results are surprising

Code : Tout sélectionner

fbissey@moonloop ~ $ sage -t --long /usr/lib64/python2.7/site-packages/sage/interfaces/giac.py
too many failed tests, not using stored timings
Running doctests with ID 2017-07-21-22-04-37-6122100c.
Using --optional=optional,sage
Doctesting 1 file.
sage -t --long /usr/lib64/python2.7/site-packages/sage/interfaces/giac.py
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/giac.py", line 705, in sage.interfaces.giac.Giac._equality_symbol
Failed example:
    giac(2) == giac(2)
Expected:
    True
Got:
    False
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/giac.py", line 721, in sage.interfaces.giac.Giac._true_symbol
Failed example:
    giac(2) == giac(2)
Expected:
    True
Got:
    False
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/giac.py", line 884, in sage.interfaces.giac.GiacElement.__cmp__
Failed example:
    a == b
Expected:
    True
Got:
    False
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/giac.py", line 886, in sage.interfaces.giac.GiacElement.__cmp__
Failed example:
    a == 5
Expected:
    True
Got:
    False
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/giac.py", line 894, in sage.interfaces.giac.GiacElement.__cmp__
Failed example:
    a < c
Expected:
    False
Got:
    True
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/giac.py", line 896, in sage.interfaces.giac.GiacElement.__cmp__
Failed example:
    a < 6
Expected:
    True
Got:
    False
**********************************************************************
File "/usr/lib64/python2.7/site-packages/sage/interfaces/giac.py", line 898, in sage.interfaces.giac.GiacElement.__cmp__
Failed example:
    c <= a
Expected:
    True
Got:
    False
**********************************************************************
some subtle changes seem to break sage's interface to icas.

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

Re: Make it possible to build giac without fltk again

Message par frederic han » mar. août 01, 2017 2:15 pm

Hi Francois,

it seems that the string representation of the true symbol has recently changed from to a (LANG dependent) string

Code : Tout sélectionner

true
or

Code : Tout sélectionner

vrai


but in sage the giac pexpect interface: sage/interfaces/giac.py
uses the function _true_symbol

I have tried with (replacing 1 by true):

Code : Tout sélectionner

    def _true_symbol(self):
        """
        Returns the symbol used for truth in Giac.

        EXAMPLES::

            sage: giac._true_symbol()
            'true'

        ::

            sage: giac(2) == giac(2)
            True
        """
        return 'true'
and it looks to solve this problem. (even if my lang is french)

NB: giacpy and giacpy_sage doesn't have this problem

fbissey
Messages : 8
Inscription : sam. juin 24, 2017 9:56 pm

Re: Make it possible to build giac without fltk again

Message par fbissey » ven. août 04, 2017 8:10 am

Good catch Frederic. It may end up going the way gap did go recently.

Répondre