This is the mail archive of the cygwin@sourceware.cygnus.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: LIBRARY_PATH problems




This is _NOT_ a problem with gcc.

This problem is with cygwin.

If you have paths of the same name on different drives, cygwin will
often become confused as to which to use.


---Kris Thielemans <kris@wren.rpms.ac.uk> wrote:
>
> 
> Hi Mumit,
> (I forward this to the list now as I can be more specific now)
> 
> I'm using egcs 1.0.2 (on Cygwin b19.1), on a NT 4.0 sp3 machine.
Using the
> LIBRARY_PATH variable has apparently a problem when the specified
directory
> is not on the c: drive (probably this should read "on the drive
mounted as
> /").
> 
> I did the following:
> 1)
> - copy a library (I'll take libX11.a as example) to c:\ll
> - LIBRARY_PATH=/ll
> - gcc -lX11 finds the library correctly
> - remove c:\ll\*, but keep the (empty) directory
> 
> 2)
> - copy that library to d:\ll
> - LIBRARY_PATH=//d/ll or d:/ll or /home/ll (as I have d:\ mounted as
/home)
> or even or d:\ll
> - gcc -lX11 does not find the library in any of these 4 cases
> - running gcc with the -v option shows that an option -L/ll (or
-L\ll in the
> last case) is passed to ld, that is, the drive letter is simply
discarded
> (after some processing of mount tables and //d syntax).
> (Note that you'll see this only when you have c:\ll present)
> - gcc -lX11 -L$LIBRARY_PATH works in all 4 cases
> 
> 3) I tried similar things with more complicate paths (and
mountings). The
> result is always the same: gcc strips (only) the drive letter from
the path
> given in LIBRARY_PATH.
> 
> I hope this is reproducible (and clear enough).
> 
> Kris
> 
> PS:
> an example (where I've added the *** in  the output of gcc to guide
your
> eye, silly lines breaks are because I copy paste from an NT window).
> 
> bash-2.01$ LIBRARY_PATH=//d/ll
> bash-2.01$ gcc -v -lX11
> Reading specs from
>
d:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\egcs-2.90.27\specs
> gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)
> 
>
d:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\egcs-2.90.27\../../.
> ./../i386-cygwin3
> 2\bin\ld.exe
>
d:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\egcs-2.90.27\../../.
> ./../
> i386-cygwin32\lib\crt0.o
-Ld:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cy
> gwin32\egcs-2.90.2
> 7 -Ld:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib  ***-L\ll ***
> -Ld:\Cygnus\B19\H-i386-cygwin32\lib\gcc-li
> b\i386-cygwin32\egcs-2.90.27\../../../../i386-cygwin32\lib
-Ld:\Cygnus\B19\H
> -i386-cygwin32\lib
> \gcc-lib\i386-cygwin32\egcs-2.90.27\../../.. -lX11 -lgcc -lcygwin
-lkernel32
>  -ladvapi32 -lshel
> l32 -lgcc
> /usr/H-i386-cygwin32/i386-cygwin32/bin/ld.exe: cannot open -lX11: No
such
> file or directory
> 
> 
> 
> bash-2.01$ mount
> Device           Directory           Type        Flags
> d:\Cygnus\B19    /usr                native      text=binary
> d:               /home               native      text!=binary
> \\.\tape1:       /dev/st1            native      text!=binary
> \\.\tape0:       /dev/st0            native      text!=binary
> \\.\b:           /dev/fd1            native      text!=binary
> \\.\a:           /dev/fd0            native      text!=binary
> c:               /                   native      text!=binary
> 
> -
> For help on using this list (especially unsubscribing), send a
message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".
> 

==
-        \\||//
---o0O0--Earnie--0O0o----
--earnie_boyd@yahoo.com--
------ooo0O--O0ooo-------



_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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