开发者

perl.exe remap error under cygwin

My Cygwin environment (Windows 7 O/S) has developed a strange problem. A couple of days ago I was running a perl script fine, but today I'm getting

0 [main] perl 5056 C:\cygwin\bin\perl.exe:开发者_如何学Python *** fatal error - unable to remap \\?\C:\cygwin\lib\perl
5\5.10\i686-cygwin\auto\Socket\Socket.dll to same address as parent: 0x8F0000 != 0x960000
Stack trace:
Frame     Function  Args
0088B508  6102749B  (0088B508, 00000000, 00000000, 00000000)
0088B7F8  6102749B  (61177B80, 00008000, 00000000, 61179977)
0088C828  61004AFB  (611A136C, 6123E0FC, 008F0000, 00960000)
End of stack trace

I tried running rebase, as advised here but the problem persists. Any answers appreciated, as I have a demo tomorrow for which this script is needed. Wasn't expecting a problem like this!


This is a semi-informed answer, as I have had similar difficulty and eventually flailed around until the problem went away.

rebaseall with no arguments will rebase all of the dll files that were installed from cygwin packages. However you will often have many other dlls from other programs you have built and installed, including from installed Perl modules with XS code, and you will need to tell rebaseall about these modules somehow.

There may be an easier way to do this, and I hope I haven't forgotten any steps, but I think I had some success doing something like this:

  1. Get a list of all the dll's in your system that run under cygwin. Maybe something like find /bin /lib /usr /home -name \*.dll > /tmp/file1
  2. exit all cygwin processes, open as ash or dash shell from a Windows command prompt, and run /bin/rebaseall -v > /tmp/file2. The -v switch sets a Verbose flag in rebase that lists all the files that get rebased with the default setting.
  3. Use /tmp/file1 and /tmp/file2 to create a new file, say /tmp/file3 with the complete list of files you will want to rebase. From what I remember it is important for the system dlls (all the files in /tmp/file2) to be listed first,
  4. Now run rebaseall -v -T /tmp/file3 (in ash, after closing all cygwin procs, etc.). Pay attention to the output. If there are error messages about rebasing some particular dll, remove that entry from /tmp/file3 and try again.

This may not solve your problem, but maybe it will get you most of the way there. If you do eventually figure it out, I hope you will come back and fill in some of the holes in this solution.


I think it is useful to point out that for most people running into this a simple "rebaseall" without any arguments seems to resolve this issue. I'll post a link to a very useful blog post from My Life, Starting up (I have no relation to that blog):

http://www.mylifestartingup.com/2009/04/fatal-error-unable-to-remap-to-same.html

The action list, (copied directly from the blog) is:

Let me tell you what you can do if you don't care what's actually happening.

1) Close out of Cygwin (and all cygwin processes).

2) Open a Windows command prompt (start -> run - > type 'cmd' or on vista : start -> type 'cmd' in the start search window)

3) Go to your cygwin bin directory. For me it is c:\cygwin\bin.

4) Type ash

5) Type '/usr/bin/rebaseall'

6) Resolve any errors (I had a warning that went unresolved and it still worked fine)

7) Reboot...and you should be good.

And if you DO care what's actually happening, read the blog entry, in addition to the answer by mob here on this same question.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜