Le forum de XCAS

Xcas: un logiciel libre de calcul formel
Nous sommes actuellement le Mar Avr 25, 2017 6:32 pm

Heures au format UTC




Publier un nouveau sujet Répondre au sujet  [ 10 messages ] 
Auteur Message
MessagePublié: Mer Fév 22, 2017 2:03 pm 
Hors-ligne

Inscrit le: Dim Fév 05, 2017 5:46 pm
Messages: 11
Here is the report in Debian: https://bugs.debian.org/cgi-bin/bugrepo ... bug=855078

I have added some debugging details on that report - it seems there is some inconsistency (on the same architecture) whether SMARTPTR64 is defined or not in that architecture.

You can see the exact build failure logs here: https://buildd.debian.org/status/package.php?p=giac

For example: https://buildd.debian.org/status/fetch. ... 8475&raw=0 or set raw=1 to download the plain text.

I understand that these are low-priority architectures, so there is no rush, take your time. In Debian we try to support quite a lot of architectures but we understand not all projects have the resources for this, and it is less important for end applications (that have fewer build-dependants).


Haut
 Profil  
 
MessagePublié: Ven Fév 24, 2017 6:43 am 
Hors-ligne

Inscrit le: Mar Déc 20, 2005 4:02 pm
Messages: 3793
I can not fix myself if I don't have access to one of these archs. src/first.h should indeed not undef SMARTPTR64, it should undef it for 32 bit archs, but I don't know how to check that properly.


Haut
 Profil  
 
MessagePublié: Ven Fév 24, 2017 7:06 am 
Hors-ligne

Inscrit le: Mar Déc 20, 2005 4:02 pm
Messages: 3793
Perhaps
Code:
#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) &&     !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
#define SMARTPTR64
#else // __x86_64__
#ifdef SMARTPTR64
#undef SMARTPTR64
#endif // SMARTPTR64
#ifdef _I386_
#undef _I386_
#endif // _I386_
#endif // __x86_64__

would work?


Haut
 Profil  
 
MessagePublié: Sam Mar 11, 2017 4:34 pm 
Hors-ligne

Inscrit le: Dim Fév 05, 2017 5:46 pm
Messages: 11
Unfortunately this does not work either, the segfault still occurs.

Is there a way to bypass SMARTPTR64 and just use normal pointers?

Also what is the purpose of this:

Code:
#undef _I386_


Haut
 Profil  
 
MessagePublié: Sam Mar 11, 2017 5:43 pm 
Hors-ligne

Inscrit le: Mar Déc 20, 2005 4:02 pm
Messages: 3793
What happens if you define -DDOUBLEVAL (or in config.h)? This force representing double without truncation and therefore gen are using normal pointers.
If my recollection is correct, #undef _I386_ avoids using some i386 assembly code.


Haut
 Profil  
 
MessagePublié: Mer Mar 15, 2017 9:38 am 
Hors-ligne

Inscrit le: Mar Déc 20, 2005 4:02 pm
Messages: 3793
The geogebra team had the same problem with arm64, and we made some progresses thanks to arm64 emulation http://www.ecliptik.com/Emulating-ARM64-on-Linux/. It seems the segfault happens only if you link icas/xcas with the dynamic libgiac.so, in that case ./icas '2+2' segfaults. If you link statically with libgiac.a instead, then icas works, I already checked a few regression tests (it's sometimes very slow with arm64 emulation...).
This is perhaps related to the order ld is using to load object files, it's possible that some static initializations in some object files must be done after other initializations.


Haut
 Profil  
 
MessagePublié: Jeu Mar 16, 2017 9:58 am 
Hors-ligne

Inscrit le: Mar Déc 20, 2005 4:02 pm
Messages: 3793
I confirm that I get a working icas with
Code:
./configure --enable-shared=no

I guess it's possible to use this workaround to build giac debian packages on arm64 architectures.


Haut
 Profil  
 
MessagePublié: Lun Mar 20, 2017 9:13 am 
Hors-ligne

Inscrit le: Dim Mai 20, 2007 7:09 am
Messages: 954
Localisation: Paris
Hi bernard,
there are also some debugging sessions in this sage ticket:
https://trac.sagemath.org/ticket/22280

on ppc64 in comment 25 compiled statically doesn't look better.


Haut
 Profil  
 
MessagePublié: Lun Mar 20, 2017 9:34 am 
Hors-ligne

Inscrit le: Mar Déc 20, 2005 4:02 pm
Messages: 3793
Like for arm64, I can't fix anything myself if I don't have access to a system like that, the stack trace is not really useful.
Fortunately, ppc64 is not as popular as arm64.


Haut
 Profil  
 
MessagePublié: Ven Mar 24, 2017 10:38 am 
Hors-ligne

Inscrit le: Dim Mai 20, 2007 7:09 am
Messages: 954
Localisation: Paris
I have tried with qemu on a debian stable:
with giac source 1.2.3-31
(so I have only 1core and the thread value is 1)
Code:
Linux debianppc64 3.16.0-4-powerpc64le #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) ppc64le GNU/Linux

I have just built giac with libgmp-dev and libmpfr-dev.
with the default compiler (gcc-4.9) I was able to reproduce the problem (1+1 crashes and also: e) with a similar debug session as infinity0.

But I tried again with gcc-4.8 and now it works...


Haut
 Profil  
 
Afficher les messages publiés depuis:  Trier par  
Publier un nouveau sujet Répondre au sujet  [ 10 messages ] 

Heures au format UTC


Qui est en ligne ?

Utilisateurs parcourant actuellement ce forum : Aucun utilisateur inscrit et 2 invités


Vous ne pouvez pas publier de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas insérer de pièces jointes dans ce forum

Rechercher pour:
Sauter vers:  
cron
Powered by phpBB® Forum Software © phpBB Group
Traduction réalisée par Maël Soucaze © 2009 phpBB.fr