This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Can't navigate dir structure properly


Hi,

I'll take a stab at answering your questions, though other more
authoritative list members may have to elaborate or correct me,
later.

> My ISP is barred from sending email to the cygwin discussion list
> because it is an open relay.  Further the help desk tells me that
> RoadRunner has no intention of closing the open relay.
> 
> Would Hotmail.com work?

There are a number of list members with Hotmail addresses, so my guess
is, yes.
> 
> I am running the latest and greatest release of cygwin as downloaded
> and installed by setup.exe from the internet.
> 
> There seems to be a bug in the directory navigation functions of the
> cygwin.dll or maybe BASH.
> 
> I am running cygwin.dll in Windows 98SE patched to the hilt.
> RAM=64meg   Disk space = lots and lots of free space.
> Pentium 200MMX

It's often a good idea to include the output of "cygcheck -v -r -s".
> 
> This installation has been working well for quite a while.  Recently I
> added pdcurses to root/usr/include/pdcurses/curses.h  and to
> root/usr/lib/pdcurses/pdcurses.a.
> I made these additions using a WindoZ program called WinZip by Nico Mak

Ncurses is already available for Cygwin - is pdcurses somehow 'better'?

When installing software under Cygwin, you should avoid using Windows
archive management tools such as WinZip.  For *.tar.gz archives, extract
with "tar -xzf FILE.tar.gz"; for *.zip files, you can use "unzip FILE.zip".
This is especially true when installing into /usr/bin or /usr/lib (see below),
but also applies if the archive contains Unix-style symbolic links.
> 
> When I tried to compile and link I found a few puzzles that may indicate
> a bug somewhere.  Maybe in my head :-)
> 
> Here is one way that the bug manifests itself.
> 
> BASH.EXE-2.04$ cd /f/cygwin/usr/lib/pdcurses
> BASH.EXE-2.04$ ls
> ls: .: No such file or directory
> BASH.EXE-2.04$ pwd
> /f/cygwin/usr/lib/pdcurses
> 
> DOS's CD command thinks that this dir does exist.
> as  f:\cygwin\usr\lib\pdcurses
> I proved it by cut and paste to DOS's cd command.

For various reasons, within Cygwin /bin is mounted on /usr/bin and
/lib is mounted as /usr/lib.  you can find discussions on this in the
Cygwin list archives.  Looking at /usr/bin or /usr/lib in DOS, or
in Explorer, you will see only empty directories.  Only tools using
the cygwin DLL will know about the mounts, and within the context
of cygwin, /bin and /usr/bin will show the same contents - likewise
for /lib and /usr/lib.

I'm not sure why you got the " ls: .: No such file or directory", but I
recently saw a similar problem.  Shutting down all programs using
the cygwin dll (bash, etc.,) then restarting fixed it for me.  In bash,
can you do "ls -la /usr/lib/pdcurses" or "ls -lad /usr/lib/pdcurses"?
> 
> Here's my mount table
> BASH.EXE-2.04$ mount
> Device              Directory           Type         Flags
> f:\cygwin\bin       /usr/bin            user         binmode
> f:\cygwin\lib       /usr/lib            user         binmode
> f:\cygwin\tmp       /tmp                user         textmode
> f:\cygwin           /                   user         binmode
> 
> f:\proj             /proj               user         textmode
> c:                  /c                  user         textmode
> d:                  /d                  user         textmode
> e:                  /e                  user         textmode
> f:                  /f                  user         textmode
> g:                  /g                  user         textmode
> 
> 
> The stuff above the blank line was invented by cygwin, not by me.
> 
> Why is  f:\cygwin\bin mounted as /usr/bin instead of /bin?
> 
> Why is  f:\cygwin\lib mounted as /usr/lib instead of /lib?
> It seems that f:\cygwin\usr\lib should be mounted there instead.
> 
> Here is another piece of the puzzle, well several pieces actually
> 
> 
> GO to the root directory and show what's there
> 
> BASH.EXE-2.04$ cd /
> BASH.EXE-2.04$ pwd
> /
> BASH.EXE-2.04$ ls
> READMEopengl-1.2.1-1.txt  cygwindir.dir             setup.log.full
> bin                       etc                       tmp
> bison-infonfo.tar.gz      latest                    uninst.bat
> contrib                   lib                       usr
> cygwin.bat                setup.exe                 var
> cygwin.ico                setup.log
> BASH.EXE-2.04$
> 
> 
> Go to the usr subdirectory   root/usr
> 
> 
> BASH.EXE-2.04$ cd usr
> BASH.EXE-2.04$ pwd
> /usr
> BASH.EXE-2.04$ ls
> bin      include  lib      local    sbin     tmp
> doc      info     libexec  man      share
> 
> Every thing is correct so far.  But look what happens when I try to
> step down one more level to     root/usr/lib
> 
> BASH.EXE-2.04$ cd lib
> BASH.EXE-2.04$ ls | less
> CRT_noglob.o
> binmode.o
> crt0.o
> crt1.o
> crtmt.o
> crtst.o
> cvs
> dllcrt1.o
> gcc-lib
> gcrt0.o
> ldscripts
> libadvapi32.a
> 
> This is the wrong lib subdirectory.  This lib is root/lib
> I wanted to get to root/usr/lib

/lib and /usr/lib are supposed to be the the same, because of the
mount.
> 
> 
> The linker gets lost as well.  Here are a few lines from my last
> effort at linking.
> 
> /usr/bin/ld: cannot find -l/f/cygwin/usr/lib/pdcurses/pdcurses.a
> collect2: ld returned 1 exit status
> make: *** [deal] Error 1

It looks like you may have manually copied your library into /usr/lib,
using a non-cygwin tool, rather than a "make install" within the context
of cygwin.

Hope this helps a bit.

Regards,
Doug Wyatt



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]