Hello
I can’t get root to compile on my box. I’ve tried root 3.10/02 and 4.0 versions…
The 3.10 version says something about a division by zero, and 4.0/02 and 03 end up with something like this:
Internal Error: malloc failed for fgFontName[kTTMaxFonts]
This error message shows that you have run out of heap memory. You could probably improve the situation by recompiling Linux kernel, but I am not sure about the detail.
Thanks for the reply! well, neither recompiling, nor using another kernel (2.6.5) worked… The weird part is that I have a similar machine at home (gentoo, kernel 2.6.4, gcc 3.3.3, Athlon XP) and I had no troubles in compiling root 4… I don’t remember if I have propolice at home, though… any idea on how to find/modify the heap size?
ok, this is really weird…
If I replace fgFontName[kTTMaxFonts] with fgFontName[32] (the value of kTTMaxFonts defined previously in TTF.h) it compiles… then I get a similar complaint (malloc failed) at TMCProcessName[kMaxMCProcess] in vmc/inc/TMCProcess.h, and fixing it by hand works here, too… then for fgAuthMeth[kMAXSEC], in include/TAuthenticate.h (same solution), graf/inc/TTF.h (lots of them here, I had to replace all occurances of kTTMaxFonts and kMaxGlyphs with their numerical values), then in net/inc/TAuthenticate.h (same as above)…
I managed to compile it now… Should I report this as a bug?
Edit:
actually, there are only 3 files that need to be modified, before running make for the first time… I made myself a diff now…
well, I will, as soon as I manage to get valgrind compiled (it says something like “can’t find a register in class BREG' while reloadingasm’”, and removing -fpic from the CFLAGS doesn’t help… I hope I’ll figure it out).
ok, there seems to be something wrong with my glibc… here is what valgrind says:
exotic4 root # valgrind -v --tool=none utils/src/rootcint_tmp -f x11ttf/src/G__X11TTF.cxx -c x11ttf/inc/TGX11TTF.h x11ttf/inc/LinkDef.h
==19543== Nulgrind, a binary JIT-compiler for x86-linux.
==19543== Copyright (C) 2002-2004, and GNU GPL'd, by Nicholas Nethercote.
==19543== Using valgrind-2.1.1, a program supervision framework for x86-linux.
==19543== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward.
==19543== Valgrind library directory: /usr/lib/valgrind
==19543== Command line
==19543== utils/src/rootcint_tmp
==19543== -f
==19543== x11ttf/src/G__X11TTF.cxx
==19543== -c
==19543== x11ttf/inc/TGX11TTF.h
==19543== x11ttf/inc/LinkDef.h
==19543== Startup, with flags:
==19543== -v
==19543== --tool=none
==19543== Reading syms from /usr/src/root/utils/src/rootcint_tmp (0x0)
==19543== Reading syms from /lib/ld-2.3.3.so (0x81000000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== Reading syms from /lib/ld-2.3.3.so (0xB0000000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== Reading syms from /lib/libdl-2.3.3.so (0xB001F000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== Reading syms from /lib/libc-2.3.3.so (0xB0022000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== Reading syms from /usr/lib/valgrind/vgskin_none.so (0xB024E000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== Reading syms from /usr/lib/valgrind/stage2 (0xB8000000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== REDIRECT soname:libc.so.6(__GI___errno_location) to soname:libpthread.so.0(__errno_location)
==19543== REDIRECT soname:libc.so.6(__errno_location) to soname:libpthread.so.0(__errno_location)
==19543== REDIRECT soname:libc.so.6(__GI___h_errno_location) to soname:libpthread.so.0(__h_errno_location)
==19543== REDIRECT soname:libc.so.6(__h_errno_location) to soname:libpthread.so.0(__h_errno_location)
==19543== REDIRECT soname:libc.so.6(__GI___res_state) to soname:libpthread.so.0(__res_state)
==19543== REDIRECT soname:libc.so.6(__res_state) to soname:libpthread.so.0(__res_state)
==19543== REDIRECT soname:libc.so.6(stpcpy) to *vgpreload_memcheck.so*(stpcpy)
==19543== REDIRECT soname:libc.so.6(strnlen) to *vgpreload_memcheck.so*(strnlen)
==19543== REDIRECT soname:ld-linux.so.2(stpcpy) to *vgpreload_memcheck.so*(stpcpy)
==19543== REDIRECT soname:ld-linux.so.2(strchr) to *vgpreload_memcheck.so*(strchr)
==19543==
==19543== Reading syms from /usr/lib/valgrind/vg_inject.so (0x81015000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== Reading syms from /lib/libdl-2.3.3.so (0x81025000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== Reading syms from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libstdc++.so.5.0.5 (0x81029000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== Reading syms from /lib/libm-2.3.3.so (0x810E3000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== Reading syms from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/libgcc_s.so.1 (0x81106000)
==19543== Reading syms from /lib/libc-2.3.3.so (0x81110000)
==19543== object doesn't have a symbol table
==19543== object doesn't have any debug info
==19543== Warning: client syscall mprotect tried to modify addresses 0x0-0x171000
==19543== at 0x8100F594: (within /lib/ld-2.3.3.so)
==19543== by 0x81001C7C: (within /lib/ld-2.3.3.so)
==19543== by 0x8100D9EB: (within /lib/ld-2.3.3.so)
==19543== by 0x81000D99: (within /lib/ld-2.3.3.so)
utils/src/rootcint_tmp: error while loading shared libraries: cannot make segment writable for relocation: Cannot allocate memory
==19543==
--19543-- TT/TC: 0 tc sectors discarded.
--19543-- 1005 chainings, 0 unchainings.
--19543-- translate: new 1203 (22211 -> 121948; ratio 54:10)
--19543-- discard 0 (0 -> 0; ratio 0:10).
--19543-- dispatch: 200000 jumps (bb entries), of which 16378 (8%) were unchained.
--19543-- 61/1295 major/minor sched events. 1212 tt_fast misses.
--19543-- reg-alloc: 15 t-req-spill, 23225+40 orig+spill uis, 3282 total-reg-r.
--19543-- sanity: 42 cheap, 2 expensive checks.
--19543-- ccalls: 0 C calls, 100% saves+restores avoided (0 bytes)
--19543-- 0 args, avg 0.0 setup instrs each (0 bytes)
--19543-- 0% clear the stack (0 bytes)
--19543-- 0 retvals, 100% of reg-reg movs avoided (0 bytes)
It would help if you could reproduce this problem after rebuilding rootcint in debug mode (i.e. do gmak distclean and set the environment variable ROOTBUILD to debug). This would give us a better error from gdb.
#0 0x80146701 in ?? ()
#1 0x00000000 in ?? ()
#2 0x00000000 in ?? ()
#3 0x00000000 in ?? ()
#4 0xffffffff in ?? ()
#5 0xffffffff in ?? ()
#6 0x00000000 in ?? ()
#7 0x00000001 in ?? ()
#8 0x8054ce00 in ?? ()
#9 0x00000000 in ?? ()
#10 0x4016924e in ?? ()
#11 0x00000017 in ?? ()
#12 0x72656d61 in ?? ()
#13 0x0000003b in ?? ()