#13731: Fix libsingular memory management
------------------------------------------------------------------+---------
       Reporter:  nbruin                                          |         
Owner:  rlm     
           Type:  defect                                          |        
Status:  new     
       Priority:  major                                           |     
Milestone:  sage-5.6
      Component:  memleak                                         |    
Resolution:          
       Keywords:                                                  |   Work 
issues:          
Report Upstream:  Reported upstream. Developers acknowledge bug.  |     
Reviewers:          
        Authors:                                                  |     Merged 
in:          
   Dependencies:                                                  |      
Stopgaps:          
------------------------------------------------------------------+---------

Comment (by SimonKing):

 Sorry, my knowledge of automake is too limited. So far, I did not succeed
 to create a package that replaces omalloc by xalloc.

 What I did (see also the thread in libsingular):

  * replace omalloc/ by the contents of xalloc/ in Singular Spielwiese
  * run `aclocal` in omalloc
  * run `autoconf` in omalloc
  * run `automake --install-missing` in omalloc
  * run `automake` again in omalloc
  * add the line `install-nolns: install` to the resulting `Makefile.in`
  * turn all this into a conditional patch, that is applied if `export
 SINGULAR_XALLOC=yes` was done.

 When I try to install the spkg, it fails with
 {{{
 make install-nolns in omalloc
 make[1]: Entering directory
 `/home/simon/SAGE/debug/sage-5.5.rc0/spkg/build/singular-3-1-5.p2/src/omalloc'
 /bin/sh ./libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"xalloc\"
 -DPACKAGE_TARNAME=\"xalloc\" -DPACKAGE_VERSION=\"3.1.2.sw\"
 -DPACKAGE_STRING=\"xalloc\ 3.1.2.sw\" -DPACKAGE_BUGREPORT=\"\"
 -DPACKAGE_URL=\"\" -DPACKAGE=\"xalloc\" -DVERSION=\"3.1.2.sw\"
 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
 -DLT_OBJDIR=\".libs/\" -I.  -I. -DHAVE_CONFIG_H -DNDEBUG -DOM_NDEBUG
 -I/home/simon/SAGE/debug/sage-5.5.rc0/local/include
 -I/home/simon/SAGE/debug/sage-5.5.rc0/local/include  -O3  -O2 -g  -fPIC
 -MT libomalloc_la-dummy.lo -MD -MP -MF .deps/libomalloc_la-dummy.Tpo -c -o
 libomalloc_la-dummy.lo `test -f 'dummy.c' || echo './'`dummy.c
 mv -f .deps/libomalloc_la-dummy.Tpo .deps/libomalloc_la-dummy.Plo
 mv: Aufruf von stat für „.deps/libomalloc_la-dummy.Tpo“ nicht möglich:
 Datei oder Verzeichnis nicht gefunden
 make[1]: *** [libomalloc_la-dummy.lo] Fehler 1
 make[1]: Leaving directory
 `/home/simon/SAGE/debug/sage-5.5.rc0/spkg/build/singular-3-1-5.p2/src/omalloc'
 make: *** [install-nolns] Fehler 1
 Unable to build and install Singular
 Error building Singular (error in build_singular).
 }}}
 Apparently the .deps directory was automatically created by the script
 `./depcomp`, that belongs to those installed by automake --install-
 missing. Its content after the installation failed:
 {{{
 simon@linux-sqwp:~/SAGE/debug/sage-5.5.rc0> ls
 spkg/build/singular-3-1-5.p2/src/omalloc/.deps/
 libomalloc_g_la-dummy.Plo  libomalloc_la-dummy.Plo
 }}}

 And to be honest, I don't see the point of the `dummy.c` file in xalloc,
 which is:
 {{{
 #include "omalloc.h"

 int om_sing_opt_show_mem; /* dummy */
 struct omInfo_s om_Info; /* dummy */
 struct omOpts_s om_Opts; /* dummy */
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13731#comment:84>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to