Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499634 - sci-mathematics/maxima-5.32.1 - improve ecls build process, fix segmentation fault when loading fasl
Summary: sci-mathematics/maxima-5.32.1 - improve ecls build process, fix segmentation ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-28 22:03 UTC by Martin von Gagern
Modified: 2014-01-29 13:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Suggested modifications. (maxima-ecls-for-sage-1.diff,2.00 KB, patch)
2014-01-28 22:03 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2014-01-28 22:03:39 UTC
Created attachment 369010 [details, diff]
Suggested modifications.

Sage uses the ecls build of maxima in an embedded fashion. With the current build system, this leads to infinite loops, as discussed in some detail at https://github.com/cschwan/sage-on-gentoo/issues/226#issuecomment-19073854 and subsequent comments. The core issue seems to be the way in which this library version of maxima is built. It seems to cause double initialization of some data structures, which in turn violates assumptions and causes broken behavior. Although sage is perhaps the most likely way to observe this problem, https://github.com/cschwan/sage-on-gentoo/issues/226#issuecomment-19081539 indicates that a simple "(require 'maxima)" on the ecl command line will reproduce the problem, which manifests as a segmentation fault.

I suggest a new approach, which works well enough on my system with various versions of sage and maxima, and which has been used by sage-on-gentoo for some time now so I consider it rather mature. The key idea is to extend the ecls-0.patch (thus creating ecls-1.patch in the process) in such a way that it duplicates the lines about c::build-program into a preceding c::build-fasl call. That will ensure that a library is built at compile time, thus making most of the build instructions currently executed at install time obsolete. What is more, it works nicely without the issues currently observed when loading the file.

In the attached diff, notice that this compares the existing ecls-0.patch with a new ecls-1.patch which would have to be created. So it might be best to copy ecls-0.patch to ecls-1.patch then apply the diff. You might also consider revbumping maxima, but the diff does not include a revision in the ebuild name.
Comment 1 Andrey Grozin gentoo-dev 2014-01-29 13:47:21 UTC
*maxima-5.32.1-r1 (29 Jan 2014)

  29 Jan 2014; Andrey Grozin <grozin@gentoo.org> +maxima-5.32.1-r1.ebuild,
  +files/ecls-1.patch:
  Fix the library version of the ecls maxima needed by sage (bug #499634),
  thanks to Martin von Gagern <Martin.vGagern@gmx.net>