La compilation de giac_unstable (0.9.9) sous Linux échoue

Xcas devel: interface utilisateur/user interface

Modérateur : xcasadmin

fdelente
Messages : 3
Inscription : jeu. août 30, 2012 1:32 pm

La compilation de giac_unstable (0.9.9) sous Linux échoue

Message par fdelente » mar. sept. 25, 2012 8:11 am

Bonjour.

J'ai cette erreur à la compilation :

Code : Tout sélectionner

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -DIN_GIAC -I. -I.. -I. -I.. -g -O2 -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT Print.lo -MD -MP -MF .deps/Print.Tpo -c Print.cc  -fPIC -DPIC -o .libs/Print.o
In file included from /usr/local/include/FL/Fl_Printer.H:42:0,
                 from Print.h:33,
                 from Print.cc:30:
/usr/local/include/FL/Fl_PostScript.H: In function ‘void xcas::Graph2d3d_widget_print(xcas::Graph2d3d*, Fl_Paged_Device*, bool)’:
/usr/local/include/FL/Fl_PostScript.H:221:34: error: ‘Fl_PostScript_Graphics_Driver* Fl_PostScript_File_Device::driver()’ is protected
Print.cc:511:26: error: within this context
In file included from /usr/local/include/FL/Fl_Printer.H:42:0,
                 from Print.h:33,
                 from Print.cc:30:
/usr/local/include/FL/Fl_PostScript.H: In function ‘void xcas::widget_ps_print(Fl_Widget*, const string&, bool, int, bool)’:
/usr/local/include/FL/Fl_PostScript.H:221:34: error: ‘Fl_PostScript_Graphics_Driver* Fl_PostScript_File_Device::driver()’ is protected
Print.cc:824:19: error: within this context
In file included from /usr/local/include/FL/Fl_Printer.H:42:0,
                 from Print.h:33,
                 from Print.cc:30:
/usr/local/include/FL/Fl_PostScript.H:221:34: error: ‘Fl_PostScript_Graphics_Driver* Fl_PostScript_File_Device::driver()’ is protected
Print.cc:825:19: error: within this context
In file included from /usr/local/include/FL/Fl_Printer.H:42:0,
                 from Print.h:33,
                 from Print.cc:30:
/usr/local/include/FL/Fl_PostScript.H:221:34: error: ‘Fl_PostScript_Graphics_Driver* Fl_PostScript_File_Device::driver()’ is protected
Print.cc:836:41: error: within this context
make[2]: *** [Print.lo] Error 1
make[2]: Leaving directory `/usr/local/testSpace/giac-0.9.9/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/testSpace/giac-0.9.9'
make: *** [all] Error 2
Merci.

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

Re: La compilation de giac_unstable (0.9.9) sous Linux échou

Message par parisse » mar. sept. 25, 2012 10:38 am

Remplacez le mot-clef protected par public en ligne 220 dans /usr/local/include/FL/Fl_PostScript.H, ca doit donner

Code : Tout sélectionner

...
class FL_EXPORT Fl_PostScript_File_Device : public Fl_Paged_Device {
#ifdef __APPLE__
  Fl_CGContextRef gc;
#endif
public:
  Fl_PostScript_Graphics_Driver *driver();
public:
  static const char *class_id;
...

fdelente
Messages : 3
Inscription : jeu. août 30, 2012 1:32 pm

Re: La compilation de giac_unstable (0.9.9) sous Linux échou

Message par fdelente » mar. sept. 25, 2012 12:04 pm

Merci, j'ai pu finir la compilation, mais en tant qu'utilsateur j'ai une segmentation fault, alors que xcas fonctionne en tant que root :

fab@slick:~$ xcas
// Using locale /usr/share/locale/
// fr_FR.UTF-8
// /usr/share/locale/
// giac
// UTF-8
GSL error handler off
XOpenIM() failed
Segmentation fault

D'autre part, l'interface est en anglais et je n'ai pas trouvé dans les menus d'options pour la mettre en français.

Encore merci !

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

Re: La compilation de giac_unstable (0.9.9) sous Linux échou

Message par parisse » mar. sept. 25, 2012 12:26 pm

Pour le segfault, il faudrait en savoir plus en compilant avec -g et en lancant gdb. Mais c'est peut-etre un pb d'install, avez-vous bien fait make install depuis giac-0.9.9 et pas seulement depuis giac-0.9.9/src?
Pour la langue en francais, il a cherche dans /usr/share/locale, verifiez que ce repertoire contient un sous-repertoire fr/LC_MESSAGES avec un fichier giac.mo dedans.

fdelente
Messages : 3
Inscription : jeu. août 30, 2012 1:32 pm

Re: La compilation de giac_unstable (0.9.9) sous Linux échou

Message par fdelente » mar. sept. 25, 2012 12:48 pm

parisse a écrit :Pour le segfault, il faudrait en savoir plus en compilant avec -g et en lancant gdb. Mais c'est peut-etre un pb d'install, avez-vous bien fait make install depuis giac-0.9.9 et pas seulement depuis giac-0.9.9/src?
Oui, j'ai bien fait make install à la racine de giac-0.9.9, pas dans src. Je vais résoudre le problème en autorisant xcas dans /etc/sudoers, ça ira comme ça :^)
parisse a écrit :Pour la langue en francais, il a cherche dans /usr/share/locale, verifiez que ce repertoire contient un sous-repertoire fr/LC_MESSAGES avec un fichier giac.mo dedans.
En effet, c'était une faute manipulation de ma part, désolé !

Merci de vos réponses !

Répondre