-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Do not hard-code DOS paths in libintl-8.dll #776
Conversation
The `libintl-8.dll` file from mingw-w64-x86_64-gettext 0.19.5.1-1 has the path `D:/develop/msys64/mingw64/share/locale` hard-coded. As a consequence, programs that link to libintl-8.dll may try to open said directory. In many setups, `D:\` actually refers to a CD/DVD drive which means that the user may see this nasty error message: There is no disk in the drive. Please insert a disk into drive D: Let's not do that, but instead hard-code the *POSIX* path into that `.dll` file, i.e. `/mingw64/share/locale`. This fixes git-for-windows/git#329 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
I obviously did not really have time to look into this more closely, i.e. whether the updated hard-coded However, be that as it may, with this patch, the original issue (that semi-random programs ask for a CD or DVD to be inserted) should be fixed by this patch. |
Won't this just result in not finding locale when it looks in C:\mingw64\share\locale\locale.alias? Usually we have to implement relocation support for this kind of thing, basing it off the result of calling GetModuleFileName. Though I admit, not finding it in one place is only as bad as not finding it in another. (edit: Yeah, ok changing drives is worse .. so I will merge this as the lesser wrong). An example of adding relocation support is Alexpux@a711734 |
The MinGW.org folks were struggling with this same issue for a long time, as shown in this thread on SourceForge: #2108 No Disk error when running g++ from cmd/tcc while a card reader with empty slots is connected.. The following command can be run to check for absolute Windows path strings in a DLL:
|
Do not hard-code DOS paths in libintl-8.dll
Ah crap, you forgot to bump pkgrel (and I forgot to check that :-)), I'll sort it out later unless you get to it first. |
Oh right, sorry! |
As I remember this patch https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-gettext/00-relocatex-libintl-0.18.3.1.patch do relocation support for libintl. |
@DavidEGrayson that's exactly what we did in the ticket I linked...
@Alexpux thanks! From the name, I had suspected already, but I was busy elsewhere so I could not look closer. |
.. actually I need to do more testing on this. |
I double-clicked on /mingw32/bin/gcc.exe today using Windows Explorer, and it gave the following error: "There is no disk in the drive. Please insert a disk into drive D:." All my packages are up-to-date. Should I make a new Github issue? This issue makes cmake-gui practically unusable, because when you click "Configure", it invokes the compiler many times, and you will see this error message pop up every time it does so. I had a general idea to help prevent these types of problems from happening that I wrote about here: Alexpux/MSYS2-pacman#16 |
The
libintl-8.dll
file from mingw-w64-x86_64-gettext 0.19.5.1-1 hasthe path
D:/develop/msys64/mingw64/share/locale
hard-coded. As aconsequence, programs that link to libintl-8.dll may try to open said
directory. In many setups,
D:\
actually refers to a CD/DVD drive whichmeans that the user may see this nasty error message:
Let's not do that, but instead hard-code the POSIX path into that
.dll
file, i.e./mingw64/share/locale
.This fixes git-for-windows/git#329
Signed-off-by: Johannes Schindelin johannes.schindelin@gmx.de