Closed jdemeyer closed 8 years ago
Branch: u/jdemeyer/ticket/17254
Description changed:
---
+++
@@ -1 +1 @@
-
+**Lots** of stuff has changed in Singular 4. The attached branch is far from working.
Yeah, the update is non trivial, that's a reason to get #17184 (and so #16882) inbetween.
Replying to @jpflori:
Yeah, the update is non trivial
I wonder if we even have a Sage developer who is familiar enough with Singular to do this (for the record: not me, I know nothing about Singular).
that's a reason to get #17184 (and so #16882) inbetween.
Of course, I'm not arguing with that.
Replying to @jdemeyer:
Replying to @jpflori:
Yeah, the update is non trivial
I wonder if we even have a Sage developer who is familiar enough with Singular to do this (for the record: not me, I know nothing about Singular).
Maybe Burcin would do... IIRC the update was proposed as a GSoC project.
Q: where to get the singular tarball for this commit? I get a failure at
Trying to download http://www.sagemath.org/packages/upstream/singular/singular-4.0.1p1.tar.bz2
2.
Update to Singular 4.0.1
Maybe Burcin would do...
Could the update to 4.0.1. be done by at least two or three persons to spread the knownledge about Singular internals?
You have to put a tarball repackaged by the spkg-src
script in the upstream
folder directly.
Once the ticket is merged, the tarball will be put on the official mirror and could be downloaded automatically but not at the moment.
I've put a repackaged tarball at:
(I'm not sure the checksums will the same as what Jeroen branch expect, run ./sage -sh sage-fix-pkg-checksums
after you have downloaded the tarball to fix this.)
And I'd be happy to work on the upgrade and learn more about Singular's internals, but please also review the "easy" #17184 (where I've already learnt some stuff) firsT.
Description changed:
---
+++
@@ -1 +1,3 @@
**Lots** of stuff has changed in Singular 4. The attached branch is far from working.
+
+Repackaged upstream tarball: [http://boxen.math.washington.edu/home/jdemeyer/spkg/singular-4.0.1p1.tar.bz2](http://boxen.math.washington.edu/home/jdemeyer/spkg/singular-4.0.1p1.tar.bz2)
Singular 4.0.1. compiles now in sage but sage does not yet - I just pushed a branch 'u/jakobkroeker/ticket/17254'. You have to correct the 'singular-4.0.1p1.tar.bz2' tarball to get it work ( the 'm4' folder is missing).
For the moment I removed some patches; we probably will have to adjust them later on. For example there is meanwhile no such thing like 'lomalloc_ndebug' so if we want to disable some debug functionality or output for omalloc we have to do that by passing appropriate flags to omalloc/configure, e,g '--enable-optimizationflags --disable-debug --without-debug' ?
Also I disabled the currently broken '--enable-debugoutput' configure flag for the standalone 'factory' and informed Oleksander Motsak about the issue.
Could someone of you take care of the sage compile errors and figure out what is going wrong and/or ask for help in the Singular forum? I can't do that easily, because within the Singular-team I'm out-of-favor because I constantly criticise their software and thus I will likely get little or no support.
Jakob
Changed branch from u/jdemeyer/ticket/17254 to u/jakobkroeker/ticket/17254
New commits:
4c0bba3 | singular 4.0.1 builds now, but sage does not due to changes in libsingular? |
Changed branch from u/jakobkroeker/ticket/17254 to u/jdemeyer/ticket/17254
first hint: for example the interface of 'naIsZero' seems changed from
BOOLEAN naIsZero(number a)
to
BOOLEAN naIsZero(number a, const coeffs cf)
Persons who might have an idea about the changes:
Oleksandr Motsak Mohamed Barakat Martin Lee Hans Schönemann
see contact details at http://www.mathematik.uni-kl.de/agag/mitglieder/
Replying to @jpflori:
I've put a repackaged tarball at:
That's an older version than the one that I put in the ticket description, any reason...?
Replying to @sagetrac-jakobkroeker:
You have to correct the 'singular-4.0.1p1.tar.bz2' tarball to get it work ( the 'm4' folder is missing).
My tarball compiled fine, so what is the problem?
You should never run ./autogen.sh
, that is supposed to be run at packaging-time, not build-time.
My tarball compiled fine, so what is the problem?
Confirm; cannot reproduce the issue. So likely I didn't use the recent tarball, or I screwed something up.
You should never run ./autogen.sh, that is supposed to be run at packaging-time, not build-time.
I'm guilty ;-)
singulars spkg-install:
the '--enable-debugoutput' configure flag for standalone factory needs now in additon '--enable-streamio --without-Singular'
After a little more tweaking and temporarily disabling the extension fields/rings, I was able to build some parts of sage with Singular 4.0.1 on a 'fc18 system' and then.. sage crashes at start! That happens because I didn't update ring creation right - I only recently discovered examples at './libpolys/tests/rings_test.h'. And some sage packages create common rings at loading time.
remaining riddles:
during build one sage file tried to link to -lsingular (I have no idea why), instead to the libSingular files (that changed!), so I worked around by manually creating links to libSingular files.
on a ScientificLinux system I get errors like "ImportError: /home/kroeker/Projects/sage-singular-4.0.1/local/lib/python2.7/site-packages/sage/rings/polynomial/plural.so: undefined symbol: wFunctionalBuch". This symbol is in libSingular*
fix ring creation. See examples at './libpolys/tests/rings_test.h'
the extension fields will need some more love. See 'algext.h' and 'transext.h'. @mantepse: could you take a look?
some mapping functions (e.g. nr2mMapZp) now require a source and dst (coefficient) parameter. Not sure if I did it right (source: currentRing, dest: _ring or vice versa?)
I didn't fix unused interface definitions in singular-cdefs.pxi. TODO
See branch u/jakobkroeker/ticket/17254 and some notes at https://github.com/jakobkroeker/jk_test_sage/issues/13
If a build get stuck before errors described above, then maybe a 'make distclean' is necessary. And of course, the Singular tarball http://boxen.math.washington.edu/home/jdemeyer/spkg/singular-4.0.1p1.tar.bz2 is required.
Any help appreciated.
New commits:
79c079f | Upgrade to Singular-4-0-1 |
2fcaeb5 | Update Singular to 4.0.1 |
4c0bba3 | singular 4.0.1 builds now, but sage does not due to changes in libsingular? |
80a6b05 | Merge commit '4c0bba3' into ticket/17254 |
2ae243a | messy fixes |
ff2a9dc | required changes for singular to build sage; should be fixed upstream |
3b7877e | hacking sage to build with Singular 4.0.1. needs more love for extension coefficient fields and a refactoring |
f178dfc | fixing nr2mMapZp call |
Changed branch from u/jdemeyer/ticket/17254 to u/jakobkroeker/ticket/17254
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
8ba17d8 | messy fixes |
Branch pushed to git repo; I updated commit sha1. New commits:
2ae243a | messy fixes |
ff2a9dc | required changes for singular to build sage; should be fixed upstream |
3b7877e | hacking sage to build with Singular 4.0.1. needs more love for extension coefficient fields and a refactoring |
f178dfc | fixing nr2mMapZp call |
8e82387 | Merge branch 'u/jakobkroeker/jakobkroeker.ticket.17254' of git://trac.sagemath.org/sage into jakobkroeker.ticket.17254 |
c2a21bd | fixed some ring creation |
Changed commit from c2a21bd
to none
Changed branch from u/jakobkroeker/ticket/17254 to trac/u/jakobkroeker/ticket.17254.squashed
New commits:
6384b9b | Upgrade to Singular 4.0.1: incomplete, messy patch(first aproach) |
Commit: 6384b9b
Changed branch from trac/u/jakobkroeker/ticket.17254.squashed to u/jakobkroeker/ticket.17254.squashed
Description changed:
---
+++
@@ -1,3 +1,3 @@
-**Lots** of stuff has changed in Singular 4. The attached branch is far from working.
+**Lots** of stuff has changed in Singular 4. But now the attached branch is almost working.
Repackaged upstream tarball: [http://boxen.math.washington.edu/home/jdemeyer/spkg/singular-4.0.1p1.tar.bz2](http://boxen.math.washington.edu/home/jdemeyer/spkg/singular-4.0.1p1.tar.bz2)
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
221c5d6 | Upgrade to Singular 4.0.1: incomplete, messy patch(first aproach) |
Branch pushed to git repo; I updated commit sha1. New commits:
1e84789 | one more renaming from libsingular to libSingular |
Branch pushed to git repo; I updated commit sha1. New commits:
3a512cd | improved error handling messages when loading Singular |
What is the status of this ticket? I see the branch is off 6.5.rc0, which is quite old already...
What is the status of this ticket? I see the branch is off 6.5.rc0, which is quite old already...
I'm busy and can't work on the ticket currently and expect to have time for the ticket at end of June, not earlier...
with the state as is, sage should build and start (using the Singular tarball from above), but extension fields and transcendental fields are not functional yet and also a cython Singular-interface cleanup has to be done.
Replying to @sagetrac-jakobkroeker:
I'm busy and can't work on the ticket currently and expect to have time for the ticket at end of June, not earlier...
with the state as is, sage should build and start (using the Singular tarball from above), but extension fields and transcendental fields are not functional yet and also a cython Singular-interface cleanup has to be done.
I'm at SD64.25 and am willing to work on this, but I'll need some hand-holding since I haven't worked on a package like this before. Do you have any suggestions for ways to test extension and transcendental fields?
I just applied this to 6.4.1 and encountered the message,
fatal error: Singular/libsingular.h: No such file or directory
while compiling
build/cythonized/sage/algebras/letterplace/free_algebra_element_letterplace.cpp
Any ideas what causes this?
I haven't looked yet at the new singular 4.0.x but the first port of call would be to check if the header is indeed installed in $SAGE_LOCAL/include
.
Replying to @kiwifb:
I haven't looked yet at the new singular 4.0.x but the first port of call would be to check if the header is indeed installed in
$SAGE_LOCAL/include
.
Shortly after, that installation of Sage fell completely apart (not sure why) so now I'm working on Sage-6.7.
On 6.7, git identifies some issues with merging in singular.pyx and ring.pyx, but they're fairly clear to fix, so I did. (Unless they weren't easy.) Things went much further this time, until I encountered this error:
****************************************************
### Singular spkg-install: choose_patches ###
### Singular spkg-install: apply_patches ###
Applying /Applications/sage-6.7/local/var/tmp/sage/build/singular-4.0.1p1.p0/patches/stricmp.patch
can't find file to patch at input line 7
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|stricmp is being deprecated in Cygwin.
|One should use strcasecmp.
|See https://cygwin.com/ml/cygwin/2014-10/msg00359.html
|diff -druN src/latest/Singular/run.c src/latest/Singular/run.c
|--- latest/Singular/run.c 2014-11-19 14:06:05.000000000 +0100
|+++ latest/Singular/run.c 2015-01-16 09:32:45.771298300 +0100
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
Error applying '/Applications/sage-6.7/local/var/tmp/sage/build/singular-4.0.1p1.p0/patches/stricmp.patch'
Error building Singular (error in apply_patches).
Here's what the file in question suggests:
stricmp is being deprecated in Cygwin.
One should use strcasecmp.
See https://cygwin.com/ml/cygwin/2014-10/msg00359.html
diff -druN src/latest/Singular/run.c src/latest/Singular/run.c
--- latest/Singular/run.c 2014-11-19 14:06:05.000000000 +0100
+++ latest/Singular/run.c 2015-01-16 09:32:45.771298300 +0100
@@ -45,6 +45,7 @@
#include <sys/stat.h>
#include <sys/cygwin.h>
#include <sys/unistd.h>
+ #define stricmp strcasecmp
//WinMainCRTStartup() { mainCRTStartup(); }
#else
#include <direct.h>
Indeed, I do not find run.c
in local/var/tmp/sage/build/singular-4.0.1p1.p0/src/latest/Singular/
, which I am guessing is where this is supposed to be; instead, I find only run.h.
In my local distribution of Singular, I find a run.c
. If I copy it over & try to make, I get the same complaint, & it looks as if the file is actually deleted. Suggestions?
Lots of stuff has changed in Singular 4. This is a big update.
Build system completely changed, and a lot of internal stuff.
Original upstream tarball at
www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/4-0-3/
:singular-4.0.3p3
dottar
dotgz
Modified tarball made with spkg-src at:
This corresponds to commit a070b84d whose message tells 4.0.3p3 and on which this branch was based:
You can also make your own tarball based on this commit or another one with
This script is loosely based on the
make_tar.sh
script from upstream.Depends on #17635
CC: @jpflori @burcin @sagetrac-jakobkroeker @kiwifb @malb @mkoeppe @vbraun @nthiery @bhutz @miguelmarco @sagetrac-gjorgenson
Component: packages: standard
Author: Jakob Kroeker, Jean-Pierre Flori, Jeroen Demeyer, John Perry, François Bissey, Leif Leonhardy, Dima Pasechnik
Branch:
f1a0dcc
Reviewer: François Bissey, Jeroen Demeyer, Ben Hutz, Leif Leonhardy, Dima Pasechnik, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/17254