Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Singular-4.x.x #17254

Closed
jdemeyer opened this issue Oct 29, 2014 · 684 comments
Closed

Upgrade to Singular-4.x.x #17254

jdemeyer opened this issue Oct 29, 2014 · 684 comments

Comments

@jdemeyer
Copy link

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 dot tar dot gz

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

env SINGULAR_GIT_COMMIT=a070b84d ./sage --sh build/pkgs/singular/spkg-src
./sage --package fix-checksum singular

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

@jdemeyer
Copy link
Author

Branch: u/jdemeyer/ticket/17254

@jdemeyer
Copy link
Author

Commit: 2fcaeb5

@jdemeyer

This comment has been minimized.

@jpflori
Copy link

jpflori commented Oct 30, 2014

comment:2

Yeah, the update is non trivial, that's a reason to get #17184 (and so #16882) inbetween.

@jdemeyer
Copy link
Author

comment:3

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.

@jpflori
Copy link

jpflori commented Oct 30, 2014

comment:4

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.

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Nov 3, 2014

comment:6

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

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?

@jpflori
Copy link

jpflori commented Nov 3, 2014

comment:7

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:

@jpflori
Copy link

jpflori commented Nov 3, 2014

comment:8

(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.)

@jpflori
Copy link

jpflori commented Nov 3, 2014

comment:9

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.

@jdemeyer

This comment has been minimized.

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Jan 21, 2015

comment:11

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

@jdemeyer
Copy link
Author

Changed branch from u/jdemeyer/ticket/17254 to u/jakobkroeker/ticket/17254

@jdemeyer
Copy link
Author

New commits:

4c0bba3 singular 4.0.1 builds now, but sage does not due to changes in libsingular?

@jdemeyer
Copy link
Author

Changed commit from 2fcaeb5 to 4c0bba3

@jdemeyer
Copy link
Author

Changed commit from 4c0bba3 to 2fcaeb5

@jdemeyer
Copy link
Author

Changed branch from u/jakobkroeker/ticket/17254 to u/jdemeyer/ticket/17254

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Jan 21, 2015

comment:14

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/

@jdemeyer
Copy link
Author

comment:16

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...?

@jdemeyer
Copy link
Author

comment:17

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?

@jdemeyer
Copy link
Author

comment:18

You should never run ./autogen.sh, that is supposed to be run at packaging-time, not build-time.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 21, 2015

Changed commit from 2fcaeb5 to 80a6b05

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 21, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

79c079fUpgrade to Singular-4-0-1
4c0bba3 singular 4.0.1 builds now, but sage does not due to changes in libsingular?
80a6b05Merge commit '4c0bba3' into ticket/17254

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Jan 23, 2015

comment:20

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 ;-)

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Jan 26, 2015

comment:21

singulars spkg-install:

the '--enable-debugoutput' configure flag
for standalone factory needs now in additon '--enable-streamio --without-Singular'

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Feb 2, 2015

comment:22

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 jakobkroeker/jk_test_sage#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:

79c079fUpgrade to Singular-4-0-1
2fcaeb5Update Singular to 4.0.1
4c0bba3 singular 4.0.1 builds now, but sage does not due to changes in libsingular?
80a6b05Merge commit '4c0bba3' into ticket/17254
2ae243amessy fixes
ff2a9dcrequired changes for singular to build sage; should be fixed upstream
3b7877ehacking sage to build with Singular 4.0.1. needs more love for extension coefficient fields and a refactoring
f178dfcfixing nr2mMapZp call

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Oct 2, 2016

Changed reviewer from François Bissey, Jeroen Demeyer, Ben Hutz, Leif Leonhardy, Dima Pasechnik to François Bissey, Jeroen Demeyer, Ben Hutz, Leif Leonhardy, Dima Pasechnik, Travis Scrimshaw

@jpflori
Copy link

jpflori commented Oct 3, 2016

comment:537

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Oct 3, 2016

comment:538

Replying to @jpflori:

Replying to @kiwifb:

That would be a nice idea but I guess there may still be a need for running autoconf at some point.

Sure there is.

Actually upstream instruction on using xalloc are

README for xalloc: a debug helper and alternative to omalloc

...

}}}

These instructions are buggy :)
It is enough to cd to the xalloc dir, then autoreconf and if you want debug mode, then you delete the omalloc dir and mv xalloc omalloc.

To only use patch on top of the upstream 4.0.3p3 what you need to do is to autoreconf everything on your machine on a pristine tree and on a patched one and produce the patch.

Is it possible to change the upstream source in a way that we do not need an autoreconf for xalloc? For example, would it be sufficient to add

AC_CONFIG_SUBDIRS([xalloc])

to the configure.ac at upstream?

Whatever is required to get rid of repackaging/autoreconf, we should do that.

@vbraun
Copy link
Member

vbraun commented Oct 3, 2016

comment:539

There is already a different .p3 tarball on the mirrors, so we first have to propagate an updated tarball. And the master fileserver is currently down.

@vbraun vbraun modified the milestones: sage-7.4, sage-7.5 Oct 3, 2016
@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Oct 3, 2016

comment:540

Replying to @jpflori:

There is now a metaticket #21632 to collect the remaining issues.

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Oct 3, 2016

comment:541

I'm sorry, but since this thread is read by some Singular interface experts,
I would like to advertise the tickets #17696, #13999, #17697, #10708, #12529.

Could you have a look?

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Oct 4, 2016

comment:542

now xalloc folder should be autoconfigured upstream,
(if I did it right);
see Singular/Singular#795

@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Oct 4, 2016

comment:543

I hacked into the patchbot allowing unsafe tickets and got the following:

> Successfully unpacked
Sha1 of singular-4.0.3p3.tar.bz2 is dd68e84ef7d0e6c35994e0fce0faa8edf38a7bb1
Traceback (most recent call last):
  File "/home/jakobkroeker/.local/lib/python2.7/site-packages/sage_patchbot/patchbot.py", line 1046, in test_a_ticket
    self.check_spkg(spkg)
  File "/home/jakobkroeker/.local/lib/python2.7/site-packages/sage_patchbot/patchbot.py", line 1227, in check_spkg
    given_sha = open(path).read().splitlines()[1].split('=')[1]
IOError: [Errno 2] No such file or directory: 'build/pkgs/singular/checksums.ini'
http://www.lmona.de/files/sage/singular-4.0.3p3.tar.bz2 -- 26 seconds
Apply -- 7751 seconds
http://www.lmona.de/files/sage/singular-4.0.3p3.tar.bz2 -- 26 seconds
2016-10-04 21:51:04
7777 seconds
[2016-10-04 21:51:06] Reporting #17254 with status Spkg
fatal: Unable to read current working directory: Datei oder Verzeichnis nicht gefunden
Traceback (most recent call last):
  File "/home/jakobkroeker/.local/lib/python2.7/site-packages/sage_patchbot/patchbot.py", line 1328, in report_ticket
    tags = [describe_branch('patchbot/base', tag_only=True),
  File "/home/jakobkroeker/.local/lib/python2.7/site-packages/sage_patchbot/util.py", line 235, in describe_branch
    universal_newlines=True)
  File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['git', 'describe', '--tags', '--match', '[0-9].[0-9]*', 'patchbot/base']' returned non-zero exit status 128
[2016-10-04 21:51:06] #17254: Spkg
REPORT
{'base': '7.4.beta6',
 'deps': [17635],
 'machine': ['Ubuntu',
             '12.04',
             'x86_64',
             '3.2.0-70-generic',
             'x200t-ThinkPad-X200-Tablet'],
 'owner': 'unknown owner',
 'patchbot_version': '2.6.3',
 'plugins': [],
 'spkgs': [u'http://www.lmona.de/files/sage/singular-4.0.3p3.tar.bz2'],
 'status': 'Spkg',
 'time': '2016-10-04 21:51:06',
 'user': 'jakobkroeker'}
17254: Spkg
ok (report successfully posted)
[2016-10-04 21:51:15] Done reporting #17254
Traceback (most recent call last):
  File "/home/jakobkroeker/.local/lib/python2.7/site-packages/sage_patchbot/patchbot.py", line 1509, in main
    patchbot.test_a_ticket(ticket)
  File "/home/jakobkroeker/.local/lib/python2.7/site-packages/sage_patchbot/patchbot.py", line 1185, in test_a_ticket
    shutil.rmtree(maybe_temp_root)
  File "/usr/lib/python2.7/shutil.py", line 237, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "/usr/lib/python2.7/shutil.py", line 235, in rmtree
    names = os.listdir(path)
OSError: [Errno 2] No such file or directory: '/tmp/tmp8iZiiy-sage-git-temp-17254'


@vbraun
Copy link
Member

vbraun commented Oct 21, 2016

Changed branch from public/singular4 to f1a0dcc

@jdemeyer
Copy link
Author

comment:545

Finally! Where is the party?

@jdemeyer
Copy link
Author

Changed commit from f1a0dcc to none

@kiwifb
Copy link
Member

kiwifb commented Oct 21, 2016

comment:546

Replying to @jdemeyer:

Finally! Where is the party?

I could invite you to my place but I gather it is a bit far for everyone else :) I'll be experimenting with 4.0.3p4 and ntl-10 once I have absorbed 7.5.beta0.

@vbraun
Copy link
Member

vbraun commented Oct 21, 2016

comment:547

It would be nice if the debug mode (#21624) could be fixed as that is tested on the buildbot...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests