public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* ld fails when -L/lib is on the command line
@ 2010-10-12 17:55 Nathan Thern
  2010-10-12 20:55 ` Christopher Faylor
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Thern @ 2010-10-12 17:55 UTC (permalink / raw)
  To: cygwin

A complicated project I'm building fails on this call to gcc:
gcc -shared <object files> -L<lib_path_in_build_tree> -L/lib
-L/usr/lib <build_libs> <std_libs> -o .libs/cyg<lib>.dll
-Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker
.libs/lib<lib>.dll.a

If I remove the -L/lib, the call succeeds. Using the -v option to gcc,
I see that it's actually a call to
/usr/lib/gcc/i686-pc-cygwin/4.3.4/collect2.exe (which claims to be
ld.exe) that fails. Unfortunately, the gcc command is actually called
from "libtool --mode=install", so can't see any way to expunge the
offending -L/lib. How do I get this build to succeed?

regards,
NT

P.S. Also, is this a bug in the gcc-4.3.4 linker, or is it some other problem?

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ld fails when -L/lib is on the command line
  2010-10-12 17:55 ld fails when -L/lib is on the command line Nathan Thern
@ 2010-10-12 20:55 ` Christopher Faylor
  2010-10-13  7:51   ` Csaba Raduly
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Faylor @ 2010-10-12 20:55 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 12, 2010 at 12:55:09PM -0500, Nathan Thern wrote:
>A complicated project I'm building fails on this call to gcc:
>gcc -shared <object files> -L<lib_path_in_build_tree> -L/lib
>-L/usr/lib <build_libs> <std_libs> -o .libs/cyg<lib>.dll
>-Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker
>.libs/lib<lib>.dll.a

You're going to have to clue us in on what "fails" means in this context.

See also: http://cygwin.com/problems.html

cgf

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ld fails when -L/lib is on the command line
  2010-10-12 20:55 ` Christopher Faylor
@ 2010-10-13  7:51   ` Csaba Raduly
  0 siblings, 0 replies; 3+ messages in thread
From: Csaba Raduly @ 2010-10-13  7:51 UTC (permalink / raw)
  To: cygwin

On Tue, Oct 12, 2010 at 10:55 PM, Christopher Faylor  wrote:
> On Tue, Oct 12, 2010 at 12:55:09PM -0500, Nathan Thern wrote:
>>A complicated project I'm building fails on this call to gcc:
>>gcc -shared <object files> -L<lib_path_in_build_tree> -L/lib
>>-L/usr/lib <build_libs> <std_libs> -o .libs/cyg<lib>.dll
>>-Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker
>>.libs/lib<lib>.dll.a
>
> You're going to have to clue us in on what "fails" means in this context.

In other words, we need the error message.

Check the makefile. My suspicion is that there is a
-L$(SOME_VARIABLE)/lib there, but the variable is not defined and so
it's expanded to empty.

-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ L w++$ tv+ b++ DI D++ 5++
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-13  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-12 17:55 ld fails when -L/lib is on the command line Nathan Thern
2010-10-12 20:55 ` Christopher Faylor
2010-10-13  7:51   ` Csaba Raduly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).