freebsd build

Xcas devel: interface utilisateur/user interface

Modérateur : xcasadmin

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

freebsd build

Message par frederic han » jeu. sept. 05, 2013 5:23 am

Salut, j'ai eu un report d'erreur de construction du paquet par les serveurs de freebsd pour giac 1.0.0.

Je n'ai pas encore essaye de reproduire car il faut que probablement que j'upgrade.
J'aimerai savoir si passer en 1.1.0 suffit pour corriger ca ou s'il faut une option de compilation speciale. (Le code a cet endroit est un peu different mais pas beaucoup).

Fred

Code : Tout sélectionner

===>  Building for giacxcas-1.0.0
gmake  all-recursive
gmake[1]: Entering directory `/wrkdirs/usr/ports/math/giacxcas/work/giac-1.0.0'
Making all in src
gmake[2]: Entering directory `/wrkdirs/usr/ports/math/giacxcas/work/giac-1.0.0/src'
/bin/sh ../libtool --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I. -I..  -DIN_GIAC -I. -I.. -I. -I..     -I/wrkdirs/usr/ports/math/giacxcas/work/fltk-1.3.0 -I/wrkdirs/usr/ports/math/giacxcas/work/CoCoALib-0.9950/include -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -I/usr/local/include -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT input_lexer.lo -MD -MP -MF .deps/input_lexer.Tpo -c -o input_lexer.lo input_lexer.cc
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I.. -DIN_GIAC -I. -I.. -I. -I.. -I/wrkdirs/usr/ports/math/giacxcas/work/fltk-1.3.0 -I/wrkdirs/usr/ports/math/giacxcas/work/CoCoALib-0.9950/include -I/usr/local/include -O2 -pipe -fno-strict-aliasing -I/usr/local/include -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT input_lexer.lo -MD -MP -MF .deps/input_lexer.Tpo -c input_lexer.cc  -fPIC -DPIC -o .libs/input_lexer.o
In file included from input_lexer.ll:52:
./gen.h:432:54: error: expected ')'
      return (unary_function_abstract *) (((unsigned longlong ) _ptr) & 0xfffffffffffffffc);
                                                     ^
./gen.h:432:44: note: to match this '('
      return (unary_function_abstract *) (((unsigned longlong ) _ptr) & 0xfffffffffffffffc);
                                           ^
./gen.h:432:44: error: cast from pointer to smaller type 'unsigned int' loses information
      return (unary_function_abstract *) (((unsigned longlong ) _ptr) & 0xfffffffffffffffc);
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~

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

Re: freebsd build

Message par parisse » jeu. sept. 05, 2013 11:26 am

Le code actuel devrait passer sur ce point, j'ai mis ulonglong au lieu de unsigned longlong qui n'est pas compris par certains compilo C++ a cet endroit.

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

Re: freebsd build

Message par frederic han » jeu. sept. 05, 2013 4:57 pm

OK merci,

en fait je crois que la version 10 passe en llvm au lieu de gcc.

Et celui la?

Code : Tout sélectionner

libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I.. -DIN_GIAC -I. -I.. -I. -I.. -I/wrkdirs/usr/ports/math/giacxcas/work/fltk-1.3.0
+-I/wrkdirs/usr/ports/math/giacxcas/work/CoCoALib-0.9950/include -I/usr/local/include -O2 -pipe -fno-strict-aliasing -I/usr/local/include
+-fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT sym2poly.lo -MD -MP -MF .deps/sym2poly.Tpo -c sym2poly.cc -o sym2poly.o >/dev/null 2>&1
mv -f .deps/sym2poly.Tpo .deps/sym2poly.Plo
/bin/sh ../libtool --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I. -I..  -DIN_GIAC -I. -I.. -I. -I..
+-I/wrkdirs/usr/ports/math/giacxcas/work/fltk-1.3.0 -I/wrkdirs/usr/ports/math/giacxcas/work/CoCoALib-0.9950/include -I/usr/local/include  -O2 -pipe
+-fno-strict-aliasing -I/usr/local/include -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT gausspol.lo -MD -MP -MF .deps/gausspol.Tpo -c -o gausspol.lo
+gausspol.cc
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I.. -DIN_GIAC -I. -I.. -I. -I.. -I/wrkdirs/usr/ports/math/giacxcas/work/fltk-1.3.0
+-I/wrkdirs/usr/ports/math/giacxcas/work/CoCoALib-0.9950/include -I/usr/local/include -O2 -pipe -fno-strict-aliasing -I/usr/local/include
+-fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT gausspol.lo -MD -MP -MF .deps/gausspol.Tpo -c gausspol.cc  -fPIC -DPIC -o .libs/gausspol.o
In file included from gausspol.cc:2:
In file included from ./giacPCH.h:29:
In file included from ./gen.h:65:
In file included from ./poly.h:28:
./threaded.h:1792:26: error: variable length array of non-POD element type 'threadmult_t<long long, unsigned int>'
    threadmult_t<T,U> arg[deg1v+1];
                         ^
gausspol.cc:1020:26: note: in instantiation of function template specialization 'giac::threadmult<long long, unsigned int>' requested here
              if (th.dim==1 || !threadmult<longlong,unsigned>(p1d,p2d,pd,unsigned(ans/d[0]),0,size_t(c1c2)))
                                ^
In file included from gausspol.cc:2:
In file included from ./giacPCH.h:36:
In file included from ./sym2poly.h:28:
./gausspol.h:559:25: error: variable length array of non-POD element type 'convert_t<long long, unsigned int>'
      convert_t<T,U> arg[nthreads];
gausspol.cc:1025:3: note: in instantiation of function template specialization 'giac::convert_from<long long, unsigned int>' requested here
                convert_from<longlong,unsigned>(pd,d,res,false);
                ^
In file included from gausspol.cc:2:
In file included from ./giacPCH.h:29:
In file included from ./gen.h:65:
In file included from ./poly.h:28:
./threaded.h:1792:26: error: variable length array of non-POD element type 'threadmult_t<int, unsigned int>'
    threadmult_t<T,U> arg[deg1v+1];
                         ^
gausspol.cc:1054:25: note: in instantiation of function template specialization 'giac::threadmult<int, unsigned int>' requested here
                    if (th.dim==1 || !threadmult<int,unsigned>(p1,p2,padd,unsigned(ans/d[0]),prime1,pds))
                                      ^
In file included from gausspol.cc:2:
In file included from ./giacPCH.h:36:
In file included from ./sym2poly.h:28:
./gausspol.h:559:25: error: variable length array of non-POD element type 'convert_t<giac::gen, unsigned int>'
      convert_t<T,U> arg[nthreads];
                        ^
gausspol.cc:1076:3: note: in instantiation of function template specialization 'giac::convert_from<giac::gen, unsigned int>' requested here
                convert_from<gen,unsigned>(target,d,res,true);
                ^


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

Re: freebsd build

Message par parisse » ven. sept. 06, 2013 7:00 am

Je viens de tester la compilation de la version a jour de giac-1.1 avec emcc qui utilise llvm et ca passe. Maintenant le config.h n'est pas le meme, alors ce n'est pas une garantie...

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

Re: freebsd build

Message par frederic han » lun. sept. 16, 2013 7:46 pm

Bon j'ai tout de meme encore des problemes avec freebsd10.

pour une compilation avec le comilateur par defaut (clang++) j'ai eu:

Code : Tout sélectionner

/bin/sh ../libtool --tag=CXX    --mode=compile c++ -DHAVE_CONFIG_H -I. -I..   -DIN_GIAC -I. -I.. -I.  -I..      -I/usr/local/include  -I/usr/local/include -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT input_lexer.lo -MD -MP -MF .deps/input_lexer.Tpo -c -o input_lexer.lo input_lexer.cc
libtool: compile:  c++ -DHAVE_CONFIG_H -I. -I.. -DIN_GIAC -I. -I.. -I. -I.. -I/usr/local/include -I/usr/local/include -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -MT input_lexer.lo -MD -MP -MF .deps/input_lexer.Tpo -c input_lexer.cc  -fPIC -DPIC -o .libs/input_lexer.o
In file included from input_lexer.ll:52:
In file included from ./gen.h:63:
In file included from ./vecteur.h:22:
./index.h:539:11: error: no member named 'tr1' in namespace 'std'
  typedef HASH_MAP_NAMESPACE::hash_map< index_t,index_m,hash_function_object > hash_index ;  
          ^~~~~~~~~~~~~~~~~~
./index.h:39:33: note: expanded from macro 'HASH_MAP_NAMESPACE'
#define HASH_MAP_NAMESPACE std::tr1
                           ~~~~~^
./index.h:539:39: error: expected unqualified-id
  typedef HASH_MAP_NAMESPACE::hash_map< index_t,index_m,hash_function_object > hash_index ;  
                                      ^
In file included from input_lexer.ll:52:
In file included from ./gen.h:65:
In file included from ./poly.h:27:
Bon ,du coup j'ai configure le parquet pour qu'il utilise gcc tout de meme, alors ca marche sauf:

1) c'est NTL 6.0 et j'ai l'impression que giac n'est pas encore pret pour cette version de NTL, c'est bien ca?
2) Ta version de fltk 1.3.0 ne compile pas, et avec la version fournie par freebsd (1.3.2) c'est giac qui rale vers les print.

ca me donne:

Code : Tout sélectionner

Fl_x.cxx:1861:31: error: 'FORCE_POSITION' is a protected member of 'Fl_Widget'
  if (w->flags() & Fl_Widget::FORCE_POSITION) {
                              ^
../FL/Fl_Widget.H:168:9: note: declared protected here
        FORCE_POSITION  = 1<<4,   ///< don't let the window manager position the window (Fl_Window)
        ^
Je m'en suis sorti comme cela:

Code : Tout sélectionner

diff -ruN ../../giacxcas.orig/work/fltk-1.3.0/src/Fl_x.cxx fltk-1.3.0/src/Fl_x.cxx
--- ../../giacxcas.orig/work/fltk-1.3.0/src/Fl_x.cxx	2011-05-30 18:47:48.000000000 +0200
+++ fltk-1.3.0/src/Fl_x.cxx	2013-09-16 12:19:17.000000000 +0200
@@ -1645,7 +1645,8 @@
   if (!win->parent() && !Fl::grab()) {
     // center windows in case window manager does not do anything:
 #ifdef FL_CENTER_WINDOWS
-    if (!(win->flags() & Fl_Widget::FORCE_POSITION)) {
+    //if (!(win->flags() & Fl_Widget::FORCE_POSITION)) {
+    if (!(win->flags() & win->force_position())) {
       win->x(X = scr_x+(scr_w-W)/2);
       win->y(Y = scr_y+(scr_h-H)/2);
     }
@@ -1858,7 +1859,8 @@
     prop[1] = 1|2|16; // MWM_FUNC_ALL | MWM_FUNC_RESIZE | MWM_FUNC_MAXIMIZE
   }
 
-  if (w->flags() & Fl_Widget::FORCE_POSITION) {
+  //  if (w->flags() & Fl_Widget::FORCE_POSITION) {
+  if (w->flags() & w->force_position()) {
     hints->flags |= USPosition;
     hints->x = w->x();
     hints->y = w->y();
Je sais pas si tu as une meilleure idee. Est ce que tu souhaites la modifier en amont ou bien est ce que je dois faire un patch special pour freebsd.

Fred

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

Re: freebsd build

Message par parisse » mer. sept. 18, 2013 12:54 pm

Desole pour la reponse un peu tardive:-(
Quelques elements de reponse:
- pour tr1, je pense qu'il faut essayer de faire comme pour APPLE, ligne 37, rajouter un define pour bsd (ou pour clang)
#if defined UNORDERED_MAP && !defined(__APPLE__) && !defined(VISUALC)
- je n'ai pas encore essaye NTL 6 en effet
- le plus simple n'est-il pas de commenter le protected et de le remplacer par public ligne 132 de Fl_Widget.H?

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

Re: freebsd build

Message par frederic han » mer. sept. 18, 2013 1:50 pm

Le truc que j'ai teste et qui marchait aussi:
dans Fl_Widget.H

Code : Tout sélectionner

class FL_EXPORT Fl_Widget {
   friend class Fl_Group;
+  friend class Fl_X;
Fred

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

Re: freebsd build

Message par frederic han » mer. avr. 30, 2014 2:10 pm

Salut, sous freebsd avec NTL 6.0 (en statique) j'ai le message suivant:

Code : Tout sélectionner

/bin/sh ../libtool --tag=CXX    --mode=link g++47  -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc47 -fno-strict-aliasing -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc47 -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS   -L/usr/ports/math/giacxcas/work/CoCoALib-0.9950/lib -L/usr/local/lib -Wl,-rpath=/usr/local/lib/gcc47 -L/usr/local/lib/gcc47 -o icas icas.o libxcas.la -lreadline -lncurses -llapack -lblas -lgfortran -lpng -lm -lmpfr  -lgmp -lgsl -lgslcblas  -lintl -lrt -lpthread -llapack -lblas -lgfortran -lpng -lm -lmpfr  -lgmp
libtool: link: g++47 -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc47 -fno-strict-aliasing -I/usr/local/include -Wl,-rpath=/usr/local/lib/gcc47 -fno-strict-aliasing -DGIAC_GENERIC_CONSTANTS -Wl,-rpath=/usr/local/lib/gcc47 -o .libs/icas icas.o  -L/usr/ports/math/giacxcas/work/CoCoALib-0.9950/lib -L/usr/local/lib -L/usr/local/lib/gcc47 ./.libs/libxcas.a /usr/ports/math/giacxcas/work/giac-1.1.1/src/.libs/libgiac.so -lntl -lcocoa -lpari -lfltk_images /usr/local/lib/libjpeg.so -lfltk -lfltk_gl /usr/local/lib/libXext.so /usr/local/lib/libXft.so /usr/local/lib/libXrender.so /usr/local/lib/libfontconfig.so /usr/local/lib/libfreetype.so -lz -lbz2 /usr/local/lib/libexpat.so -lGL /usr/local/lib/libX11.so /usr/local/lib/libxcb.so /usr/local/lib/libXau.so /usr/local/lib/libXdmcp.so /usr/local/lib/libpthread-stubs.so -lrpcsvc -lreadline -lncurses /usr/local/lib/libgsl.so /usr/local/lib/libgslcblas.so /usr/local/lib/libintl.so -lrt -lpthread -llapack -lblas -lgfortran -lpng -lm /usr/local/lib/libmpfr.so /usr/local/lib/libgmp.so -pthread -Wl,-rpath -Wl,/usr/local/lib
/usr/ports/math/giacxcas/work/giac-1.1.1/src/.libs/libgiac.so: undefined reference to `NTL::operator<<(std::ostream&, NTL::ZZ_pX const&)'
/usr/ports/math/giacxcas/work/giac-1.1.1/src/.libs/libgiac.so: undefined reference to `NTL::operator<<(std::ostream&, NTL::GF2X const&)'
collect2: error: ld returned 1 exit status
*** Error code 1
as tu une idee?

D'autre part j'ai un probleme avec ta modif dans index.h en effet, vu que ca ne compile pas avec clang le paquet utilise gcc. Je pense qu'il vaut mieux:

Code : Tout sélectionner

--- src/index.h.orig	2013-11-28 09:39:20.000000000 +0100
+++ src/index.h	2014-04-28 20:26:00.000000000 +0200
@@ -36,7 +36,7 @@
 #endif
 ///////////////////////////////////////////
 
-#if defined UNORDERED_MAP && !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(VISUALC)
+#if defined UNORDERED_MAP && !defined(__APPLE__) && !defined(__clang__) && !defined(VISUALC)
 #include <tr1/unordered_map>
 #define HASH_MAP_NAMESPACE std::tr1
 #define hash_map unordered_map

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

Re: freebsd build

Message par parisse » mer. avr. 30, 2014 3:54 pm

je ne vois pas... ca le fait en ayant efface tous les .o?
je fais la modif dans index.h

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

Re: freebsd build

Message par frederic han » sam. mai 03, 2014 9:23 am

Bon meme sans ntl j'ai avec gcc une compilation qui marche mais un segfault a l'execution. Je ne sais pas si c'est du au fait que les libraires gcc sont installees ailleurs.

J'essaye donc aussi avec clang (qui est le compilateur par defaut)

la j'ai le pb:

Code : Tout sélectionner

In file included from gausspol.cc:2:
In file included from ./giacPCH.h:29:
In file included from ./gen.h:64:
In file included from ./poly.h:27:
./threaded.h:1884:26: error: variable length array of non-POD element type
      'threadmult_t<double, unsigned int>'
    threadmult_t<T,U> arg[deg1v+1];
                         ^
gausspol.cc:1190:24: note: in instantiation of function template specialization
      'giac::threadmult<double, unsigned int>' requested here
            if (th.dim==1 || !threadmult<double,unsigned>(p1d,p2d,pd,uns...
                              ^
In file included from gausspol.cc:2:
In file included from ./giacPCH.h:36:
In file included from ./sym2poly.h:27:
./gausspol.h:559:25: error: variable length array of non-POD element type
      'convert_t<double, unsigned int>'
      convert_t<T,U> arg[nthreads];

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

Re: freebsd build

Message par parisse » sam. mai 03, 2014 11:33 am

Pour le deuxieme, il devrait suffire de rajouter !defined(__clang__) ligne 553 de gausspol.h.
Pour le 1er, il faut faire
threadmult_t<T,U> * arg=new threadmult_t<T,U>[deg1v+1];
et faire delete [] arg; avant les 2 return false; et le return true; qui suivent.

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

Re: freebsd build

Message par frederic han » sam. mai 03, 2014 6:37 pm

Merci ca avance plus loin, maintenant j'arrive a cette erreur:

Code : Tout sélectionner

In file included from gausspol.cc:2:
In file included from ./giacPCH.h:29:
In file included from ./gen.h:64:
In file included from ./poly.h:27:
./threaded.h:429:9: error: calling a private constructor of class
      'std::__1::__wrap_iter<std::__1::pair<unsigned int, unsigned int> *>'
        return typename std::vector<T>::iterator(&v0+taille/2);
  

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

Re: freebsd build

Message par parisse » dim. mai 04, 2014 6:09 am

decidement clang est bien penible, tu peux desactiver cette opimisation ligne 313, en remplacant #ifdef VISUALC par #if defined VISUALC || defined __clang__

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

Re: freebsd build

Message par frederic han » ven. mai 09, 2014 12:36 pm

Bon avec quelques autres modifications du meme genre j'arrive a compiler sans erreurs mais j'ai un probleme avec make install:

avant make install:

src/icas et xcas ... marchent sans errreur.

apres make install
j'ai un crash avec tous ces programmes, meme le petit: cas_help gcd

Code : Tout sélectionner

Program received signal SIGABRT, Aborted.
[Switching to Thread 808806400 (LWP 100087/cas_help)]
0x00000008061c7eea in thr_kill () from /lib/libc.so.7
(gdb) bt
#0  0x00000008061c7eea in thr_kill () from /lib/libc.so.7
#1  0x0000000806288059 in abort () from /lib/libc.so.7
#2  0x0000000805d4043d in __cxa_rethrow () from /lib/libcxxrt.so.1
#3  0x0000000805b03e30 in operator new () from /usr/lib/libc++.so.1
#4  0x00000008012ebbab in giac::alpha_order () from /usr/local/lib/libgiac.so.0
#5  0x00000008010359e9 in std::__1::__insertion_sort_3<bool (*&)(giac::aide const&, giac::aide const&), giac::aide*> () from /usr/local/lib/libgiac.so.0
#6  0x0000000801034706 in std::__1::__sort<bool (*&)(giac::aide const&, giac::aide const&), giac::aide*> () from /usr/local/lib/libgiac.so.0
#7  0x0000000801033bd9 in std::__1::__sort<bool (*&)(giac::aide const&, giac::aide const&), giac::aide*> () from /usr/local/lib/libgiac.so.0
#8  0x0000000801033c5b in std::__1::__sort<bool (*&)(giac::aide const&, giac::aide const&), giac::aide*> () from /usr/local/lib/libgiac.so.0
#9  0x0000000801033c5b in std::__1::__sort<bool (*&)(giac::aide const&, giac::aide const&), giac::aide*> () from /usr/local/lib/libgiac.so.0
#10 0x0000000801033c5b in std::__1::__sort<bool (*&)(giac::aide const&, giac::aide const&), giac::aide*> () from /usr/local/lib/libgiac.so.0
#11 0x0000000801033c5b in std::__1::__sort<bool (*&)(giac::aide const&, giac::aide const&), giac::aide*> () from /usr/local/lib/libgiac.so.0
#12 0x00000008012ed4c2 in giac::readhelp () from /usr/local/lib/libgiac.so.0
#13 0x0000000000402064 in ?? ()
#14 0x0000000000401cbf in ?? ()
#15 0x0000000800622000 in ?? ()
Il doit y avoir un melange dans les dependances mais je n'ai pas trop d'idees.

Je vais peut etre devoir compiler avec gcc sans ntl (car la version de ntl des ports est statique et compilee avec clang. Si je la reinstalle avec gcc alors je n'ai plus les problemes de symboles inconnus)
Fred

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

Re: freebsd build

Message par parisse » ven. mai 09, 2014 2:58 pm

Desole, pas d'idees pour le segfault. Sinon, tu peux builder sans NTL, tu ne devrais pas observer de grosses differences de performances, en particulier si pari est installe.

Répondre