public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Marco Atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com
Subject: Re: gcc x86 - problem on library search order
Date: Tue, 26 Apr 2016 13:54:00 -0000	[thread overview]
Message-ID: <0b805922-5ba8-41e5-0736-90456b9902e2@gmail.com> (raw)
In-Reply-To: <571F400F.3000306@gmail.com>



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/

COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=i686'
  /usr/lib/gcc/i686-pc-cygwin/5.3.0/collect2.exe -plugin 
/usr/lib/gcc/i686-pc-cygwin/5.3.0/cyglto_plugin.dll 
-plugin-opt=/usr/lib/gcc/i686-pc-cygwin/5.3.0/lto-wrapper.exe 
-plugin-opt=-fresolution=/tmp/ccqHx4mQ.res 
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc 
-plugin-opt=-pass-through=-lcygwin -plugin-opt=-pass-through=-ladvapi32 
-plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 
-plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lgcc_s 
-plugin-opt=-pass-through=-lgcc --build-id --wrap _Znwj --wrap _Znaj 
--wrap _ZdlPv --wrap _ZdaPv --wrap _ZnwjRKSt9nothrow_t --wrap 
_ZnajRKSt9nothrow_t --wrap _ZdlPvRKSt9nothrow_t --wrap 
_ZdaPvRKSt9nothrow_t -Bdynamic --dll-search-prefix=cyg 
--large-address-aware --tsaware /usr/lib/crt0.o 
/usr/lib/gcc/i686-pc-cygwin/5.3.0/crtbegin.o 
-L/usr/lib/gcc/i686-pc-cygwin/5.3.0 
-L/usr/lib/gcc/i686-pc-cygwin/5.3.0/../../../../i686-pc-cygwin/lib 
-L/usr/lib/w32api /tmp/ccHGOCXX.o -luuid -lgcc_s -lgcc -lcygwin 
-ladvapi32 -lshell32 -luser32 -lkernel32 -lgcc_s -lgcc 
/usr/lib/default-manifest.o /usr/lib/gcc/i686-pc-cygwin/5.3.0/crtend.o
/tmp/ccHGOCXX.o:uuid.c:(.text+0x16): undefined reference to 
`uuid_generate_random'
collect2: error: ld returned 1 exit status

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

  reply	other threads:[~2016-04-26 12:11 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 [this message]
2016-04-26 17:29     ` JonY

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=0b805922-5ba8-41e5-0736-90456b9902e2@gmail.com \
    --to=marco.atzeri@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).