Closed jpflori closed 7 years ago
Replying to @sagetrac-tmonteil:
Did you suggest the fix for libpng/lpng1x too ([/22159#comment:29 suggested on this comment])?
Nope, I did not...
Replying to @kiwifb:
Which version is your starting point? I am trying with 1.2.3-25 at the moment (because I have it handy on ppc64 right now) and while it is an improvement there are still failures, and I seem to be hanging at
chk_morley_demo
and a few others.
Hum, the one pointed in this ticket.
The latest "unstable" (which might have become stable) tarball should have equivalent fixes. See:
I guess you still have to pass -Dx86_64
into C[XX|PP]FLAGS
to make sure addresses are not cut at 32 bits.
Note that using static or shared libraries makes no difference, both work well.
Thanks to Bernard and debian folk work the latest stable version seems ok.
Pass -Dx86_64
into CPPFLAGS
.
Description changed:
---
+++
@@ -32,5 +32,6 @@
---
-One can maybe cheat and pass `-D__x86_64__ -DSMARTPTR64` in CPPFLAGS but that's dirty, see:
-* http://xcas.e.ujf-grenoble.fr/XCAS/viewtopic.php?f=19&t=1723
+Use > -45 version:
+* http://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_1.2.3-47.tar.gz
+And pass `-Dx86_64` in CPPFLAGS.
Branch pushed to git repo; I updated commit sha1. New commits:
8dc4c88 | Update to 1.2.3-47. |
Description changed:
---
+++
@@ -33,5 +33,7 @@
---
Use > -45 version:
-* http://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_1.2.3-47.tar.gz
+The upstream tarball is at http://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_1.2.3-47.tar.gz
+Repackaged tarball is at:
+* http://perso.telecom-paristech.fr/~flori/giac-1.2.3.47.tar.bz2
And pass `-Dx86_64` in CPPFLAGS.
If you want to add arm64
support, please do so.
But I think this is ready to go now.
Feel free to send this to the bots!
Changed upstream from Reported upstream. No feedback yet. to Fixed upstream, in a later stable release.
I am sorry I haven't had time to test this fully yet. I will try to give it another go over the weekend.
make[3]: Entering directory '/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/check'
*** stack smashing detected ***: /dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/icas terminated
======= Backtrace: =========
/shared/work_no_backup/ppc64-prefix/lib64/libc.so.6(+0xa3ba8)[0x400016e3ba8]
/shared/work_no_backup/ppc64-prefix/lib64/libc.so.6(__fortify_fail-0x89548)[0x40001782480]
/shared/work_no_backup/ppc64-prefix/lib64/libc.so.6(__stack_chk_fail-0x89598)[0x40001782418]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(_ZN4giac5substERKNS_3genERKNS_15dbgprint_vectorIS0_EES6_bPKNS_7contextE-0x836be0)[0x400007770d8]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(+0x6dbcc0)[0x4000074bcc0]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(+0x1ca518)[0x4000023a518]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(+0x6e0834)[0x40000750834]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(_ZN4giac5limitERKNS_3genERKNS_14identificateurES2_iPKNS_7contextE-0x85b8e8)[0x40000751590]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(_ZN4giac11quotedlimitERKNS_3genERKNS_14identificateurES2_iPKNS_7contextE-0x85b498)[0x400007519f8]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(_ZN4giac6_limitERKNS_3genEPKNS_7contextE-0x85ab14)[0x40000752394]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(_ZNK4giac19unary_function_evalclERKNS_3genEPKNS_7contextE-0x3aa814)[0x40000c165b4]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(_ZNK4giac18unary_function_ptrclERKNS_3genEPKNS_7contextE-0x3b940c)[0x40000c07c5c]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(_ZNK4giac8symbolic4evalEiPKNS_7contextE-0xa07dd8)[0x4000059f9b8]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(_ZNK4giac3gen7in_evalEiRS0_PKNS_7contextE-0x2c80d0)[0x40000cfdc30]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(_ZNK4giac3gen4evalEiPKNS_7contextE-0x2c70d8)[0x40000cfec58]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(_ZN4giac11protectevalERKNS_3genEiPKNS_7contextE-0x54a214)[0x40000a6fe34]
/dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0(+0x81b894)[0x4000088b894]
/shared/work_no_backup/ppc64-prefix/lib64/libpthread.so.0(+0xbb10)[0x40002c1bb10]
/shared/work_no_backup/ppc64-prefix/lib64/libc.so.6(clone-0x9e5b8)[0x4000176b268]
======= Memory map: ========
10000000-10020000 r-xp 00000000 00:10 13112212 /dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/icas
10020000-10030000 r--p 00010000 00:10 13112212 /dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/icas
10030000-10040000 rw-p 00020000 00:10 13112212 /dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/icas
10040000-100d0000 rw-p 00000000 00:00 0 [heap]
40000000000-40000030000 r-xp 00000000 00:16 41936355 /shared/work_no_backup/ppc64-prefix/lib64/ld-2.23.so
40000030000-40000040000 r--p 00020000 00:16 41936355 /shared/work_no_backup/ppc64-prefix/lib64/ld-2.23.so
40000040000-40000050000 rw-p 00030000 00:16 41936355 /shared/work_no_backup/ppc64-prefix/lib64/ld-2.23.so
40000050000-40000070000 r-xp 00000000 00:00 0 [vdso]
40000070000-40000f60000 r-xp 00000000 00:10 13111890 /dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0.0.0
40000f60000-40000f70000 ---p 00ef0000 00:10 13111890 /dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0.0.0
40000f70000-40000fd0000 r--p 00ef0000 00:10 13111890 /dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0.0.0
40000fd0000-40000ff0000 rw-p 00f50000 00:10 13111890 /dev/shm/portage/sci-mathematics/giac-1.2.3.47/work/giac-1.2.3/src/.libs/libgiac.so.0.0.0
40000ff0000-40001020000 rw-p 00000000 00:00 0
40001020000-40001080000 r-xp 00000000 00:16 14674565 /shared/work_no_backup/ppc64-prefix/usr/lib64/libreadline.so.7.0
40001080000-40001090000 r--p 00050000 00:16 14674565 /shared/work_no_backup/ppc64-prefix/usr/lib64/libreadline.so.7.0
40001090000-400010a0000 rw-p 00060000 00:16 14674565 /shared/work_no_backup/ppc64-prefix/usr/lib64/libreadline.so.7.0
400010a0000-40001340000 r-xp 00000000 00:16 16553231 /shared/work_no_backup/ppc64-prefix/usr/lib64/libgsl.so.19.3.0
40001340000-40001370000 r--p 00290000 00:16 16553231 /shared/work_no_backup/ppc64-prefix/usr/lib64/libgsl.so.19.3.0
40001370000-40001390000 rw-p 002c0000 00:16 16553231 /shared/work_no_backup/ppc64-prefix/usr/lib64/libgsl.so.19.3.0
40001390000-400013a0000 rw-p 00000000 00:00 0
400013b0000-400015c0000 r-xp 00000000 00:16 15211125 /shared/work_no_backup/ppc64-prefix/usr/lib64/gcc/powerpc64-unknown-linux-gnu/5.4.0/libstdc++.so.6.0.21
400015c0000-400015f0000 r--p 00200000 00:16 15211125 /shared/work_no_backup/ppc64-prefix/usr/lib64/gcc/powerpc64-unknown-linux-gnu/5.4.0/libstdc++.so.6.0.21
400015f0000-40001600000 rw-p 00230000 00:16 15211125 /shared/work_no_backup/ppc64-prefix/usr/lib64/gcc/powerpc64-unknown-linux-gnu/5.4.0/libstdc++.so.6.0.21
40001600000-40001620000 r-xp 00000000 00:16 15211117 /shared/work_no_backup/ppc64-prefix/usr/lib64/gcc/powerpc64-unknown-linux-gnu/5.4.0/libgcc_s.so.1
40001620000-40001630000 r--p 00010000 00:16 15211117 /shared/work_no_backup/ppc64-prefix/usr/lib64/gcc/powerpc64-unknown-linux-gnu/5.4.0/libgcc_s.so.1
40001630000-40001640000 rw-p 00020000 00:16 15211117 /shared/work_no_backup/ppc64-prefix/usr/lib64/gcc/powerpc64-unknown-linux-gnu/5.4.0/libgcc_s.so.1FAIL: chk_limit
PASS: chk_partfrac
FAIL: chk_fhan15
PASS: chk_fhan13
PASS: chk_factor
PASS: chk_geo
FAIL: chk_fhan0
PASS: chk_fhan21
PASS: chk_integrate
FAIL: chk_fhan2
FAIL: chk_cas
PASS: chk_xavier
FAIL: chk_fhan1
PASS: chk_normalize
FAIL: chk_morley_demo
FAIL: chk_fhan18
FAIL: chk_fhan12
FAIL: chk_fhan7
FAIL: chk_fhan20
FAIL: chk_fhan16
FAIL: chk_fhan9
FAIL: chk_fhan17
FAIL: chk_fhan8
FAIL: chk_fhan5
FAIL: chk_fhan3
FAIL: chk_fhan4
FAIL: chk_fhan6
FAIL: chk_fhan19
FAIL: chk_fhan14
FAIL: chk_fhan11
============================================================================
Testsuite summary for giac 1.2.3
============================================================================
# TOTAL: 30
# PASS: 8
# SKIP: 0
# XFAIL: 0
# FAIL: 22
# XPASS: 0
# ERROR: 0
I am starting to think my g++ is at fault :(
@ Jean-Pierre, what version of gcc did you test this with?
An old one:
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/ppc64-redhat-linux/4.8.3/lto-wrapper
Target: ppc64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-ppc64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-ppc64-redhat-linux/cloog-install --enable-secureplt --with-long-double-128 --build=ppc64-redhat-linux
Thread model: posix
gcc version 4.8.3 20140911 (Red Hat 4.8.3-7) (GCC)
I did not run giac testsuite though.
Replying to @jpflori:
An old one:
gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/ppc64-redhat-linux/4.8.3/lto-wrapper Target: ppc64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-ppc64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.3-20140911/obj-ppc64-redhat-linux/cloog-install --enable-secureplt --with-long-double-128 --build=ppc64-redhat-linux Thread model: posix gcc version 4.8.3 20140911 (Red Hat 4.8.3-7) (GCC)
I did not run giac testsuite though.
Ah, I never had trouble building it. Just running/testing it. It will be some work to get things to build with gcc 4.8.x, will have to find all the C++ dependencies before building.
Most tests seem to pass on my machine except for some numerical noise and some very long or looping tests I killed.
Replying to @jpflori:
Replying to @sagetrac-tmonteil:
Did you suggest the fix for libpng/lpng1x too ([/22159#comment:29 suggested on this comment])?
Nope, I did not...
Could you please give me some hints on how to achieve this (which file to modify, and how) ?
(sorry for not being able to help on the review, i do not have any ppc machine, my intel 32bit VM is trying it right now, just in case)
Just patch the Makefile
to use -lpng16
rather than -lpng
.
Currently giac
configure png with
CONFIG_PNG="yes"
AC_ARG_ENABLE(png,
[AS_HELP_STRING([--enable-png], [Enable PNG library])],
[ if test "x$enableval" = "xno"; then CONFIG_PNG="no"; fi], [])
if test "x$CONFIG_PNG" = "xyes"; then
AC_CHECK_HEADERS(png.h, AC_CHECK_LIB(png,main))
fi
in configure.in
. An option is to use AC_CHECK_LIBS(main,[png16,png14,png12,png])
instead of AC_CHECK_LIB
. For Jean-Pierre suggestion you have to do the replacement after configure is run. Because AC_CHECK_LIB
is used -lpng
is added to LIBS
by configure.
Replying to @sagetrac-tmonteil:
(sorry for not being able to help on the review, i do not have any ppc machine, my intel 32bit VM is trying it right now, just in case)
For what it worth, giac-1.2.3.47 from this ticket compiles and pass self-tests on both my 64bit laptop and 32bit VM (both running Debian GNU/Linux jessie).
Ragarding building giac with png support, thanks Jean-Pierre and François for your hints, i opened #23262.
Unfortunately, I still have no luck on ppc64 with gcc-5.4.0. It is better than before in that some tests are now succeeding. But things seems to get stuck in a C++ allocator for a number of them.
Is giac
itself functional?
That is: is it only failing its testsuite or is it completely broken as well?
Fair question. "1+1" works, the fact that some tests work means that it is working up to a point. I haven't tried to run the sage testsuite with it. Any tests I should run?
Maybe sage -t src/sage/interfaces/giac.py
and rings
and symbolic
would tell you if it looks functional or not.
On my side, giac
also fails a lot of its own testsuite, inlcuding bunch of numerical noise, but also more worrying stuff i did not investigate, but running tests as above seems to indicate it is good enough for sage.
OK, I did run those tests and the few failures I have are unrelated to giac
(I'll have to investigate some of them more deeply but they are definitely not giac
). I guess we can go ahead with this.
Reviewer: Thierry Monteil, Jean-Pierre Flori, François Bissey
Changed branch from public/giac to 8dc4c88
Changed commit from 8dc4c88
to none
Do you guys know why the -Dx86_64
is needed on ppc64? That is still a bug that should be fixed upstream. In theory upstream should now be detecting 64-bit in a cross-platform way so I'm confused why it fails on ppc64.
(sorry, I have no idea why my comment there deleted the commit field)
(I can't seem to fix it either, even by Modifying the ticket with that commit)
All tests pass for me for 1.2.3-51 on arm64 on Debian without further changes or extra flags, btw.
I'll have to try 1.2.3-51 on ppc64 without extra flags then. 1.2.3-47 builds but a lot of tests fail for me. We may want to consider a further upgrade.
The removal of the commit when you comment further is a "feature" of track. It is annoying but not harmfull.
Well, you probably don't have that problem but I allow compilation without gui, and sage itself doesn't depend on fltk
bool has_graph3d(Fl_Widget * widget){
#ifdef HAVE_LIBFLTK
Fl_Group * g=dynamic_cast<Fl_Group *>(widget);
Oooops! in src/Xcas.cc (line 3360) there goes your compilation failure if you don't have fltk.
I have found that annoying too, in Debian I am forced to ship the non-GUI icas program (which is what Sage actually wants) together with the GUI xcas program, and it even links against X libraries. I've filed a bug about it upstream, hopefully they can fix it.
Well, I pilled up some more in http://xcas.e.ujf-grenoble.fr/XCAS/viewtopic.php?f=4&t=1814 because your request, I felt, was much broader than mine (but yes something should be done about all that X stuff).
Unfortunately giac fails to compile for me on a arm64 (aarch64) 4.9 Linux kernel:
http://xcas.e.ujf-grenoble.fr/XCAS/viewtopic.php?p=8941#p8941
It succeeded on a 3.16 Linux kernel though, as I reported above. Could someone reproduce this and if so re-open this ticket or open another one?
A potential solution to this has been suggested on the Debian bug tracker: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855078#29
I'll try to test it next week, in the meantime feel free to jump in ahead.
Executing
1+1
with giac-1.2.2.103 on ppc64le POWER8:Upgrading to giac-1.2.3.25 (#22101) does not fix this problem.
Use > -45 version: The upstream tarball is at http://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/giac_1.2.3-47.tar.gz Repackaged tarball is at:
-Dx86_64
in CPPFLAGS.Depends on #22101
Upstream: Fixed upstream, in a later stable release.
CC: @rwst @frederichan-IMJPRG @vbraun
Component: packages: standard
Author: Jean-Pierre Flori
Branch:
8dc4c88
Reviewer: Thierry Monteil, Jean-Pierre Flori, François Bissey
Issue created by migration from https://trac.sagemath.org/ticket/22280