Bug#974103: Build factory with --enable-streamio

Doug Torrance dtorrance at piedmont.edu
Mon Nov 9 21:48:54 GMT 2020


Package: src:singular
Version: 1:4.1.1-p2+ds-4
Severity: wishlist
Tags: patch
X-Debbugs-Cc: dtorrance at piedmont.edu

Dear Maintainer,

Currently, factory is built using the default options.  In particular,
without stream IO.  It would be nice to enable this feature for debugging
purposes.  In particular, code such as the following could be used to
display various factory objects:

    std::cout << t << std::endl;

For example, Macaulay2, one of factory's reverse-dependencies, has a
variety of debugging display routines which require this feature.

>From https://github.com/Macaulay2/M2/blob/master/M2/Macaulay2/e/x-factor.cpp:

    // debugging display routines to be called from gdb
    // needs factory to be configured without option --disable-streamio
    #if FACTORY_STREAMIO
    void showvar(Variable &t) { std::cout << t << std::endl; }
    void showcf(CanonicalForm &t) { std::cout << t << std::endl; }
    void showcfl(CFList &t) { std::cout << t << std::endl; }
    void showcffl(CFFList &t) { std::cout << t << std::endl; }
    void showmpint(gmp_ZZ p)
    {
      mpz_out_str(stdout, 10, p);
      std::cout << std::endl;
    }
    void showmpz(mpz_srcptr p)
    {
      mpz_out_str(stdout, 10, p);
      std::cout << std::endl;
    }
    #endif

I have opened a merge request on Salsa with a patch that enables this
feature:
https://salsa.debian.org/science-team/singular/-/merge_requests/1

Thanks!
Doug



More information about the debian-science-maintainers mailing list