delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/12/07/21:17:00

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9D6F1383F84F
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=tlinx.org
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cygwin AT tlinx DOT org
Message-ID: <5FCDD97A.7080409@tlinx.org>
Date: Sun, 06 Dec 2020 23:27:54 -0800
From: L A Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: Johnathan Schneider <johnny DOT schneider10 AT outlook DOT com>
Subject: Re: Workaround for cygwin's way of linking folders?
References: <CPZP284MB000578B94B75ED84DE1EF39E8ECF0 AT CPZP284MB0005 DOT BRAP284 DOT PROD DOT OUTLOOK DOT COM>
In-Reply-To: <CPZP284MB000578B94B75ED84DE1EF39E8ECF0@CPZP284MB0005.BRAP284.PROD.OUTLOOK.COM>
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Cc: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On 2020/12/06 14:41, Johnathan Schneider via Cygwin wrote:
> Hi all,
>
> I'm setting up a cross platform development environment using Cygwin. Upon attempting to use Cygwin's CMake that is natively bundled, I discovered that Cygwin goes looking for the gcc in /usr/bin/cc,
----
    If you go into 'bash' under cygwin, what do you see in /usr/bin?
/usr/bin is only a valid path inside programs that are running on cygwin --
if you run programs outside of cygwin, say directly from Windows, they 
won't see
them.

    Cmake would likely be in the same folder as gcc.  How are you invoking
Cmake?  If you are running cmake from, say, the cygwin path of /bin 
(assuming
you have cygwin installed at C:\ and have your cygwin mount prefix set 
to '/'.
In bash, type mount -p and you should see something like:
>  mount -p

Prefix              Type         Flags                                          
/                   user         binmode                                        


Just like windows has various magic folders that show up under explorer, but
don't really exist, cygwin does too, but only cygwin utils see the
cygwin-folders.

    FWIW, /bin from a cygwin install is mounted (within cygwin) on 
/usr/bin, so
the contents should be the same.

    If you want to make use of windows+cygwin at the same time, it's best
to install cygwin at 'C:\' and set you mount prefix like I have above, then
you will get more commonality between windows+cygwin.  For example, to make
/usr/bin appear under window, I have a symlink at C:/usr/bin that points to
C:/bin.

Under windows, a 'dir' of C:\usr will show (from cmd.exe, some lines removed
for brevity):
C:\Users\linda>dir \usr
 Volume in drive C is System Disk

 Directory of C:\usr

2020/05/17  17:11    <DIR>          .
2020/05/17  17:11    <DIR>          ..
2018/05/19  09:42    <SYMLINKD>     bin [..\bin]
2020/10/07  09:35    <DIR>          include
2018/05/19  09:41    <SYMLINKD>     lib [..\lib]
2018/05/17  11:20    <SYMLINKD>     lib64 [..\lib]
2020/12/06  23:25    <SYMLINKD>     sbin [..\sbin]
2020/11/03  20:38    <DIR>          share
2020/10/07  08:37    <DIR>          src
2020/05/17  17:11    <DIR>          x86_64-pc-cygwin
               0 File(s)              0 bytes
              17 Dir(s)  150,639,538,176 bytes free

>  
> Alas, my question - what is the recommended workaround?
>   
---
    Look for cygwin paths from a cygwin shell.  That's the start.
Making win+cyg play nice, involves little bits like symlinks
like I used above.  It's not officially supported by the cygwin, but
I find such things convenient.


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019