Problem with my build ofRoot on cygwin with version 4.01/05

Hello,
I tried building root 4.01/05 with gcc 3.2 on cygwin. The build seemed to go fine. However, whenever I try to run root, the spash screen pops up and I get the following error message:
cplager@pointyjr> root
6 [main] ? 2360 cygheap_fixup_in_child: Couldn’t reserve 9891528 bytes of space for cygwin’s heap (0x61780000 <0xB40000>) in child, Win32 error 487
C:\cygwin\usr\local\bin\root_401_bad\bin\root_exe.exe (2360): *** m.AllocationBase 0x0, m.BaseAddress 0x61780000, m.RegionSize 0x260000, m.State 0x10000

The spash screen doesn’t go away until I kill the process (it doesn’t seem to use much CPU).

Charles
p.s. Pyroot does seem to work for this version.

Hi Charles,
can you check whether your version of ROOT’s main Makefile contains a rebase target? “grep rebase Makefile” will find it. If there’s none please cvs update root and try again.
Axel.

Hi Axel,

cplager@pointyjr> grep rebase Makefile
POSTBIN=rebase
rebase: $(ALLLIBS) $(ALLEXECS)
@rebase -b 0x60600000 bin/.exe bin/.dll

So it seems to be there. :frowning:

Any other ideas? Is it possible that it is a gcc 3.2 problem?

Charles

Hi Charles,

It always is… (welcome to cygwin). Could you update your cygwin installation, please? Do you remember whether make showed at the end of the build “Rebasing binaries… done.”? Also, please send the output of “objdump.exe -f bin/.dll bin/.exe | grep start”.
Axel.

Hi Axel,
I’ve been a little hesitant to go to gcc 3.2 since it’s hard to go back; I’ll probably upgrade in the next couple weeks (Since I’ve got a stable version of root 3.10 that uses gcc 3.2, my hope was that I could build root 4.0.X with 3.2 so I could upgrade “gradually”). I’ve currently got cygwin base 1.5.11 (it’s not clear to me I really want to change that either :frowning: ).

As far as rebasing, I do remember seeing it rebasing binaries (although I don’t remember if it finished or not). The output you asked for is attached (I assumed you wanted it run in $ROOTSYS).

Cheers,
Charles
objdump.txt (1.35 KB)

Hi Charles,
okay, don’t upgrade gcc - this is a different problem. Please close all cygwin applications, open a regular, non-X, bash shell, and run \ls $ROOTSYS/bin/*.exe $ROOTSYS/bin/*.dll | rebaseall - Let me know whether that cures things.

Note: running this by hand is not meant to be a permanent fix - it’s telling me where things go wrong with the Makefile’s rebase target.
Axel.

cplager@pointyjr> \ls $ROOTSYS/bin/.exe $ROOTSYS/bin/.dll | rebaseall -
ReBaseImage (/usr/bin/cygcrypt-0.dll) failed with last error = 6
cplager@pointyjr>

(This returned almost immediately)

I tried running root and again got:

cplager@pointyjr> root
3 [main] ? 2608 cygheap_fixup_in_child: Couldn’t reserve 9891528 bytes of space for cygwin’s heap (0x61780000 <0xB40000>) in child, Win32 error 487
C:\cygwin\usr\local\bin\root_401_bad\bin\root_exe.exe (2608): *** m.AllocationBase 0x0, m.BaseAddress 0x61780000, m.RegionSize 0x260000, m.State 0x10000

p.s. I didn’t have rebaseall installed before (although rebase was) - this shouldn’t have caused any problems, could it?

Hi,

[quote=“cplager”]cplager@pointyjr> \ls $ROOTSYS/bin/.exe $ROOTSYS/bin/.dll | rebaseall -
ReBaseImage (/usr/bin/cygcrypt-0.dll) failed with last error = 6[/quote]This means rebaseall failed because you still have a cygwin process running. Zould be sshd or something. Make sure all cygwin processes are gone except for the single bash you use to run rebaseall.

[quote=“cplager”]p.s. I didn’t have rebaseall installed before (although rebase was) - this shouldn’t have caused any problems, could it?[/quote]No.

Axel.

Hi Axel,
I restarted my computer and ran the command again. This time it took ~ 5 minutes and resturned without error.

When running root, I still get this output:
cplager@pointyjr> root
6 [main] ? 3500 cygheap_fixup_in_child: Couldn’t reserve 9891528 bytes of space for cygwin’s heap (0x61780000 <0xB40000>) in child, Win32 error 487
C:\cygwin\usr\local\bin\root_401_bad\bin\root_exe.exe (3500): *** m.AllocationBase 0x0, m.BaseAddress 0x61780000, m.RegionSize 0x260000, m.State 0x10000

I reran objdump.exe in case it would be useful (it looks slightly different than it did before).

Charles

p.s. I’m a little confused about the rebase command you sent. I (naively) thought that since you were piping an ls command into rebaseall that it was only going to rebase the root files. Apparently, that’s not true.
objdump2.txt (1.29 KB)

Hi Charles,

[quote=“cplager”]I restarted my computer and ran the command again. This time it took ~ 5 minutes and resturned without error. [/quote]Good.

[quote=“cplager”]When running root, I still get this output:
cplager@pointyjr> root
6 [main] ? 3500 cygheap_fixup_in_child: Couldn’t reserve 9891528 bytes of space for cygwin’s heap (0x61780000 <0xB40000>) in child, Win32 error 487
C:\cygwin\usr\local\bin\root_401_bad\bin\root_exe.exe (3500): *** m.AllocationBase 0x0, m.BaseAddress 0x61780000, m.RegionSize 0x260000, m.State 0x10000

p.s. I’m a little confused about the rebase command you sent. I (naively) thought that since you were piping an ls command into rebaseall that it was only going to rebase the root files. Apparently, that’s not true.[/quote]
Let me first explain what happens: dlls need to be loaded into different, non-overlapping memory regions. The cygheap_fixup is a problem with dlls clashing in memory. As noone knows what dlls are in memory, rebaseall just rebases all dlls (with additional dlls specified via pipe). The rebase target I added to the Makefile rebases the ROOT dlls into a region which is currently (as far as I know) unused by any cygwin or windows application. So it’s a hack, but it works.

Now, you’re using cygwin 1.5.11. And for that there were reports of a failing rebaseall [cygwin.com]. So I’d definitely suggest updating cygwin to 1.5.12-1 - it’s easy and might resolve it. At least I have not seen rebase problems with 1.5.12-1. Let me know whether the update did it.
Axel.

Hello,

So I upgraded to 1.5.12:

cplager@pointyjr> uname -a
CYGWIN_NT-5.1 pointyjr 1.5.12(0.116/4/2) 2004-11-10 08:34 i686 unknown unknown Cygwin

I rebased everything with no errors.

I still get the same errors:

cplager@pointyjr> root
7 [main] ? 3184 cygheap_fixup_in_child: Couldn’t reserve 9891540 bytes of space for cygwin’s heap (0x61790000 <0xB40000>) in child, Win32 error 487
C:\cygwin\usr\local\bin\root_401_bad\bin\root_exe.exe (3184): *** m.AllocationBase 0x0, m.BaseAddress 0x61790000, m.RegionSize 0x250000, m.State 0x10000

Do you think that building from scratch again could help?

 Charles

Hi Charles,
my brain’s memory is not what it used to be, if I remember correctly.

The proper syntax for the rebaseall command is \ls $ROOTSYS/bin/*.exe $ROOTSYS/lib/*.dll | rebaseall -T - Note that I forgot the “-T” in front of the “-”. I checked; your base addresses were indeed unchanged, due to the wrong rebaseall call. So, please try again, and let me know whether that worked. And yes, I am sorry about wasting your time; let’s hope this will fix it.
Axel.

I tried your new rebase command and it seems to have finally worked. :smiley:

I’m pretty sure I’ve wasted more of your time than the other way around. Thanks for all of your help.
Charles

p.s. Was it that I compiled with cygwin 1.5.11 that your rebase didn’t work? In case it helps, I attached the output of the grep objdump after the rebase.

Charles
objdump3.txt (1.29 KB)

Hi Charles,

Thanks. The reason it failed was not the cygwin version but the fact that you have more dlls on your computer than I do (funny, but that’s what it boils down to). This is what I suspected, and it’s nicely proven by your objdump output. I’ll fix the rebase target.
Axel.