delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <505EC94B.3040108@gmail.com> |
References: | <CAHODtZQ6y8H=Teje=sjdBms_h9i45zFtY+76ihbFiTHgkamRug AT mail DOT gmail DOT com> <505C438B DOT 4040902 AT gmail DOT com> <loom DOT 20120922T223801-212 AT post DOT gmane DOT org> <505EC94B DOT 3040108 AT gmail DOT com> |
Date: | Sun, 23 Sep 2012 21:08:06 +0200 |
Message-ID: | <CAHODtZS8jiVSJ56zD2bMm+CT7naxCBDbCNeGmdXGy5fUroFayQ@mail.gmail.com> |
Subject: | Re: [BUG] Cygwin default mounts in 1.7 |
From: | Jiri Engelthaler <engycz AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id q8NJ8Rw1020718 |
2012/9/23 marco atzeri <marco DOT atzeri AT gmail DOT com>: > On 9/22/2012 11:03 PM, Jiri Engelthaler wrote: >> >> marco atzeri <marco.atzeri <at> gmail.com> writes: >> >>> >>> On 9/21/2012 10:48 AM, Jiri Engelthaler wrote: >>>> >>>> Hello Cygwin developers >>>> I have a problem with cygwin default mounts >>>> I have compiled gcc cross compiler for powerpc (some problem with arm >>>> cross) and installed to destination directory. Installed directory >>>> structure is (truncated) >>>> >>>> +bin >>>> | +powerpc-unknown-linux-gnu-gcc.exe >>>> +include >>>> +lib >>>> +libexec >>>> | +gcc >>>> | +powerpc-unknown-linux-gnu >>>> | +4.4.7 >>>> | +cc1.exe >>>> +powerpc-unknown-linux-gnu >>>> +share >>>> >>>> When I start “powerpc-unknown-linux-gnu-gcc.exe a.c” in “bin” >>>> directory from windows command line, compiler fails with >>>> “powerpc-unknown-linux-gnu-gcc: error trying to exec 'cc1': execvp: No >>>> such file or directory”. Starting compiler from bash shell works fine >>>> and a.c is compiled. >>>> “powerpc-unknown-linux-gnu-gcc --print-search-dirs” says that one of >>>> search paths for programs is >>>> “/usr/bin/../libexec/gcc/powerpc-unknown-linux-gnu/4.4.7/” so all >>>> should work. >>>> But problem is with “/usr/bin” prefix. I have made tests with “ls” and >>>> “pwd” copied do “bin” directory and found that: >>>> - “pwd” is “/usr/bin” >>>> - “ls” shows “bin” directory content >>>> - “ls ..” shows “ls: cannot access ..: No such file or directory” >>>> - “ls /” shows “bin cygdrive dev etc include lib libexec >>>> powerpc-unknown-linux-gnu proc share” >>>> >>>> Core of problem is that pwd for “bin” directory is “/usr/bin”, but >>>> “/usr/bin/..” is not accessible. >>>> How to mount current directory as "/cygdrive/c/foo/bar/...../bin" >>>> while executing pwd or ls? >>>> >>>> Thank you for your answer and have a nice day. >>>> Jiri Engelthaler >>>> >>> >>> Jiri, >>> I tried to follow up your mail and I am confused and not really >>> sure what is you problem. >>> On cygwin "/bin" and "/usr/bin" are the same directory >>> (see http://cygwin.com/cygwin-ug-net/using.html#mount-table) >>> >>> $ mount >>> E:/cygwin/bin on /usr/bin type ntfs (binary,auto) >>> E:/cygwin/lib on /usr/lib type ntfs (binary,auto) >>> >>> as /usr/bin is a mount of /bin. >>> >>> Pwd works in both the two cases: >>> $ cd /bin >>> $ pwd >>> /bin >>> >>> $ cd /usr/bin >>> $ pwd >>> /usr/bin >>> >>> Most of the compilers/programs expect to find themself in /usr/bin, >>> and some are referring their libraries relative to such position >>> in this way >>> ../libexec/gcc/powerpc-unknown-linux-gnu/4.4.7/ >>> is correctly targeting >>> /usr/bin/../libexec/gcc/powerpc-unknown-linux-gnu/4.4.7/ >>> >>> for this reason you should have in the PATH "/usr/bin" before "/bin" >>> ( /bin not defined at all) >>> to avoid that these programs looks for >>> >>> /bin/../libexec/gcc/powerpc-unknown-linux-gnu/4.4.7/ >>> >>> that does not exist. >>> >>> What is your PATH ? >>> >>> On /etc/profile it is defined as: >>> PATH="/usr/local/bin:/usr/bin:${PATH}" >>> >>> Regards >>> Marco >>> >>> >> >> >> Hello Marco. >> You didn't understood me fully. In bash shell all works as expected but >> calling programs directly from windows command line don't. I wont to have >> gcc >> compiler with cygwin-1.dll only which can be run directly from windows >> command >> line or GNU make or Eclipse without need to have installed whole cygwin or >> need >> to run from bash. >> Here >> https://docs.google.com/file/d/0B3P4bLGf7ME1OFZhY0pVd3V6YVk/edit?pli=1 >> are ls,pwd and minimal set of dll's. Try to run testcmd.cmd from bin which >> will >> have wrong result: >> C:\tmp\Cyg\foo\bar\bin>pwd >> /usr/bin > > > you missed this point on > http://cygwin.com/cygwin-ug-net/using.html#mount-table > > "/usr/bin and /usr/lib are by default also automatic mount points generated > by the Cygwin DLL similar to the way the root directory is evaluated. > /usr/bin points to the directory the Cygwin DLL is installed in, /usr/lib is > supposed to point to the /lib directory. This choice is safe and usually > shouldn't be changed. An fstab entry for them is not required." > > What are you looking for is a way to avoid it > > >> Regards >> Jiri Engelthaler >> Hello Marco. I didn't miss the note about default mount of /usr/bin, /lib and /. I think that this feature is a bug. According to my tests /usr/bin is not mounted where Cygwin DLL is but where executable is. Try testcmd.cmd in https://docs.google.com/open?id=0B3P4bLGf7ME1ZE1KUjU1WUk1V2s . And if I'm looking a way how to avoid this ...buggy feature..., my answer is yes. If someone can help me with how to run gcc compiler (see first post) which looks in ../libexec/...... for cc1.exe, I'll be happy. My question is still same: How to access ../libexec directory from bin directory. Regards Jiri Engelthaler -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |