From: SourceForge.net <no...@so...> - 2006-05-25 11:56:42
|
Bugs item #1493668, was opened at 2006-05-23 17:36 Message generated for change (Settings changed) made by alevesely You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1493668&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: website Group: Unreproducible >Status: Open Resolution: Works For Me Priority: 5 Submitted By: Ale Vesely (alevesely) Assigned to: Earnie Boyd (earnie) Summary: Install directory for MinGW must be C:\mingw, or linkd Initial Comment: Hi, please amend that page in http://www.mingw.org/MinGWiki/index.php/Install%20MinGW where it says "2. Create a directory to install all the stuff into..." In facts the directory MUST be the root directory, or gcc won't work. I everytime got fooled by the fstab feature of msys. It is important that new users understand that the fstab mounts are only seen by the shell: native programs, including gcc, know nothing about it. Since Windows 2000 one can soft link a directory, a JUNCTION in Windows parlance and overcome this limitation, e.g. linkd C:\mingw C:\myfancyplace\MinGW linkd D:\mingw C:\myfancyplace\MinGW that also solves the problem of compiling from a different drive. (Linkd.exe can be downloaded with the resource kit, othe sysinternals alternatives may exist.) ---------------------------------------------------------------------- >Comment By: Ale Vesely (alevesely) Date: 2006-05-25 13:56 Message: Logged In: YES user_id=262065 Awright, I moved all mingw/gcc/* to mingw. Then I deleted the two symbolic links. Now gcc works when invoked from any drive, and, if -v is given, complains that it is ignoring nonexistent directory "/mingw/include" ignoring nonexistent directory "/mingw/include" ignoring nonexistent directory "/mingw/lib/gcc/mingw32/3.4.2/include" ignoring nonexistent directory "/mingw/mingw32/include" ignoring nonexistent directory "/mingw/include" Some files overlapped (before moving I got: Alessandro Vesely@NUOVO /mingw $ find . -type f | sed 's|^[.]/gcc/|./|' | sort | uniq -c | sort -n | egrep -v '^ *1 ' 2 ./COPYING 2 ./COPYING.LIB 2 ./info/dir 2 ./lib/libiberty.a only info/dir is documented at step 2) Thus the correct statement is that gcc must be installed in the mingw directory as exemplified, or else mingw must be in (or linked from) the root directory for gcc to work. Perhaps that's more confusing than helpful, so please forget this bug, unless you are willing to reword that concept in order to document those gcc specs. However, don't forget to mention there should be no spaces in directory names next time you edit that page... Ciao Ale ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2006-05-25 00:35 Message: Logged In: YES user_id=15438 Ok, then I don't know why you needed to do your linkd steps. It isn't required by anyone else that I've heard of. I.E.: I don't have an issue with gcc -I /include -c a.c where a.c merely includes a.h and a.h is an empty file in /include. ---------------------------------------------------------------------- Comment By: Ale Vesely (alevesely) Date: 2006-05-24 18:05 Message: Logged In: YES user_id=262065 Yes, I have MSYS 1.0.10, it is in a parellel directory than MinGW (see tree below.) Earnie, I don't dare asking why that would affect MinGW binaries execution. If by design they can run under cmd.exe as well (as gcc does), please say so at point 5 in that page. I cannot read gcc specs file, however snippets like *md_startfile_prefix: /mingw/lib/ apparently imply that mingw should be in the root directory. FWIW, my tree is as follows: $ find c:/uX -type d -maxdepth 2 c:/uX c:/uX/MinGW c:/uX/MinGW/bin c:/uX/MinGW/doc c:/uX/MinGW/gcc c:/uX/MinGW/include c:/uX/MinGW/info c:/uX/MinGW/lib c:/uX/MinGW/man c:/uX/MinGW/mingw32 c:/uX/MinGW/uninstall c:/uX/msys c:/uX/msys/1.0 ---------------------------------------------------------------------- Comment By: Luke Dunstan (infidel) Date: 2006-05-24 17:13 Message: Logged In: YES user_id=30442 You must install gcc, w32api and mingw-runtime in the same tree to allow it to find the headers and libraries, not in separate subdirectories. ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2006-05-24 13:07 Message: Logged In: YES user_id=15438 You mention HOME directory, are you using MSYS-1.0.10? Did you install MSYS in the same directories as the MinGW binaries? If, yes, that is your problem and the "Install MinGW" page isn't discussing MSYS. MSYS-1.0.11 will allow you to install MinGW and MSYS together. ---------------------------------------------------------------------- Comment By: Ale Vesely (alevesely) Date: 2006-05-24 09:06 Message: Logged In: YES user_id=262065 I had no spaces in paths, except for HOME. Without links, I've been able to compile by specifying -I, but then I couldn't link. Perhaps I also got something else wrong (e.g. I have both gcc and mingw32 as subdirectories of mingw)? I attach the output of gcc in all 3 cases: -naive, -using -I, -with a junction It contains lines like ignoring nonexistent directory "/mingw/include" that inspired the soft links. ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2006-05-24 01:32 Message: Logged In: YES user_id=15438 Your advice isn't correct and your problem is more likely to be spaces in the path name. I have my mingw installed in c:/opt/mingw. I often build in e:/usr/src. Can you please check to see if spaces in the path name is your problem? Earnie ---------------------------------------------------------------------- Comment By: Ale Vesely (alevesely) Date: 2006-05-23 19:48 Message: Logged In: YES user_id=262065 Yes, sysinternals has such an utility at http://www.sysinternals.com/Utilities/Junction.html source code is available ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1493668&group_id=2435 |