public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: JonY <10walls@gmail.com>
To: cygwin@cygwin.com
Subject: Re: gcc x86 - problem on library search order
Date: Tue, 26 Apr 2016 17:29:00 -0000	[thread overview]
Message-ID: <571F7313.2000401@gmail.com> (raw)
In-Reply-To: <0b805922-5ba8-41e5-0736-90456b9902e2@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]

On 4/26/2016 20:10, Marco Atzeri wrote:
> 
> 
> On 26/04/2016 12:16, JonY wrote:
>> On 4/26/2016 01:46, Marco Atzeri wrote:
>>> Visible on 32bit and not present on 64bit
>>>
>>> $ cat uuid.c
>>> #include <uuid/uuid.h>
>>>
>>> int main ()
>>> {
>>>     uuid_t out;
>>>     uuid_generate_random(out);
>>>     return 0;
>>> }
>>>
>>>
>>> $ gcc uuid.c -luuid
>>> /tmp/ccLlmFMf.o:uuid.c:(.text+0x16): undefined reference to
>>> `uuid_generate_random'
>>> collect2: error: ld returned 1 exit status
>>>
>>
>> Pretty sure I removed the patch that does that, not sure where it gets
>> in from. It isn't in the specs file either.
>>
>> -Wl,-v does say it is from gcc.
> 
> may be from "COLLECT_GCC_OPTION" as "LIBRARY_PATH" has the right order
> 
> LIBRARY_PATH=/usr/lib/gcc/i686-pc-cygwin/5.3.0/:/usr/lib/gcc/i686-pc-cygwin/5.3.0/../../../../i686-pc-cygwin/lib/:/usr/lib/:/lib/:/usr/lib/w32api/
> 

In -Wl,-v, looks like 64bit gcc too has -L/usr/lib/w32api, however, it
is "-L/usr/lib/../lib -L/lib/../lib
-L/usr/lib/gcc/x86_64-pc-cygwin/5.3.0/../../../../x86_64-pc-cygwin/lib
-L/usr/lib/w32api", so it comes out correct eventually. The 32bit
version is lacking that.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

      reply	other threads:[~2016-04-26 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 19:34 Marco Atzeri
2016-04-26 12:11 ` JonY
2016-04-26 13:54   ` Marco Atzeri
2016-04-26 17:29     ` JonY [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=571F7313.2000401@gmail.com \
    --to=10walls@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).