-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential Problems With libiconv-2.dll Conflict #129
Comments
I don't think that Microsoft provides a |
No, there isn't one. Seems to me someone (or you) copied it to the system folder. None of the looks like railsinstaller, rubyinstaller, devkit, msysgit or I would suggest you remove that file if you can't remember how it got Sorry for top posting. Sent from mobile.
|
One last comment: windows doesn't ship with any libiconv dll in system folder. Closing this out as 3rd party issue. While you found the issue with your installation, it was not caused by either rubyinstaller or devkit but a previous condition of your system. |
I'm guessing that libiconv-2.dll must have been installed in my SysWOW64 directory by some GNU application that I previously installed. Unfortunately, I've not been able to track down which one. I understand if the system configuration that I have is such a weird configuration that you don't feel that it is worth trying to mitigate it by changing something in the devkit installation process. I'm glad that the issue exists though in case it helps anyone else down the road that somehow finds their configuration in the same state as mine. @luislavena, if you're willing to put any more attention to this issue I think it would be helpful, for anyone that finds this later, to document if there is any way to give the devkit version of libiconv-2.dll precedence over other DLL's during the gem install process. |
@aauren first and foremost, thank you for taking the time to document this issue. While this behavior isn't surprising for Windows devs familiar with Win64's clever support for unmodified Win32 apps DLL search order I do think an ultra-summary in Troubleshooting would be helpful for users who may stumble onto this system-specific 32-bit-app-running-under-WoW64 behavior. Please add a short-n-sweet summary to the above wiki page and we'll refine as needed. I'm not using Win64 yet, but curiosity is killing me...what does this snippet show on your 64bit (Win7?) OS? http://hastebin.com/forokatidu.rb |
Thanks for your response @jonforums. I'll be adding to the Troubleshooting section soon. To answer your question, yes I do run Windows 7 64-bit. And when I ran your snippet the FFI gem didn't seem to detect the 64-bit address space. As such the output I got was:
|
Thanks, I suspected as much since all the players (ruby, ffi ext, devkit) are 32bit. When you remove Anxiously awaiting your Troubleshooting mods... 😸 |
After I removed the if statement the output was as follows:
Also, I finished writing the troubleshooting section you'll have to let me know what you think. |
Thank you, I will make a couple tweaks to the Troubleshooting entry for brevity and clarity. |
I'll start off by saying that I'm not sure how widespread this issue is, it may just be me, but I would guess from the solution that it has the potential to affect a lot of other people trying to install the DevKit so I decided to post an issue here.
The Problem
In some cases it seems that the gem install process favors a Windows System version of the libiconv-2.dll file instead of the version that comes with the DevKit install. This causes native gems not to build thus voiding the purpose of the DevKit.
The (Temporary) Solution
Move the delivered version of libiconv-2.dll (C:\Windows\SysWOW64\libiconv-2.dll) out of the way during native gem installs.
Background and Troubleshooting
I followed the instructions (https://github.com/oneclick/rubyinstaller/wiki/Development-Kit) and installed the DevKit, but when it came time to test the DevKit by installing the rdiscount gem I would repeatedly get the following error:
After looking around online I came to the conclusion that most people encounter this error when they either:
Since none of these were my problem, I kept trying other things. Eventually I tried running the gem install command in command prompt instead of PowerShell which resulted in a Windows popup directly before the aforementioned error:
This caused me to start searching around for other versions of libiconv-2.dll (a DDL file that is delivered in both C:\DevKit\mingw\bin and in C:\DevKit\mingw\libexec\gcc\mingw32\4.5.2 by the DevKit installer) on my system which I eventually found in C:\Windows\SysWOW64.
After renaming the libiconv-2.dll file in C:\Windows\SysWOW64 the gem install of rdiscount worked perfectly. However, renaming this dll permanently isn't a viable solution long-term since I'm sure that the Windows system needs that DLL for other things.
So I'm guessing that this worked because in an ideal situation the DevKit's version of libiconv-2.dll should override the version that Windows provides during a native gem install? I tried moving DevKit's version to the very front of my system path, but this didn't seem to work for me.
The text was updated successfully, but these errors were encountered: