jump to navigation

Cygwin and Rails – unable to remap to same address as parent; died waiting for dll loading, errno 11 July 6, 2011

Posted by ficial in code fixes, cygwin, ruby on rails, techy.
Tags: , , , , ,

I recently switched to Windows 7 Enterprise and on the new system when I tried to do any rails work in cygwin this problem I’d been having intermittently on the old system:
unable to remap FILE to same address as parent
ruby XXXX fork: child YYYY - died waiting for dll loading, errno 11
was a LOT more prevalent, to the point where it was hard to get work done.

I had done some research on this for my old system, and found quite a bit of discussion about this problem and how to solve it (e.g. http://www.garethhunt.com/2008/02/11/cygwin-died-waiting-for-dll-loading/, http://stackoverflow.com/questions/4988091/unable-to-start-solr-server-ruby-on-rails). Sadly, that approach (quit all cygwin shells, run c:\cygwin\bin\ash.exe, $ /bin/rebaseall) did not work for me then, and still wasn’t working on the new system. On my old machine I just ignored the problem since it wasn’t a blocker, but on my new system it’s really in the way, so I dove into it a bit more. I eventually came across this really helpful message by Illia Bobyr: http://cygwin.com/ml/cygwin/2011-04/msg00075.html.

In brief, the problem is that rebaseall doesn’t necessarily know all the .dll’s and .so’s it has to fix. The solution is to compose your own list and run rebaseall against that list using the -T option. For me, the process that finally worked was:

  1. in a cygwin shell: find /bin /lib /usr -iname '*.so' > /tmp/to_rebase.lst
  2. in a cygwin shell: find /bin /lib /usr -iname '*.dll' >> /tmp/to_rebase.lst
  3. quit all cygwin shells and stop all cygwin processes
  4. run as Administrator C:\cygwin\bin\ash.exe
  5. /bin/rebaseall -T /tmp/to_rebase.lst
  6. exit ash
  7. restart machine

And now, finally, I can code in peace….

Until the next problem appears.



1. Joshua Szmajda - July 7, 2011

You might want to consider setting up Ubuntu in VirtualBox. It’s all free software, will avoid further headaches like this, and is probably much more similar to your deployment environment. VirtualBox even lets you set up a sort of file sharing between the host and virtual target so you can use whichever editor in windows or ubuntu you prefer.

2. ficial - December 12, 2011

Sometimes the rebaseall process fails with a message like:

FixImage (/bin/cyglsa64.dll) failed with last error = 13

In that case, edit /tmp/to_rebase.lst to remove the offending line.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: