All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurentiu Palcu <laurentiu.palcu@intel.com>
To: Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: Yocto list discussion <yocto@yoctoproject.org>, poky@yoctoproject.org
Subject: Re: [yocto] Is this a bug of binutils
Date: Fri, 20 Sep 2013 14:00:22 +0300	[thread overview]
Message-ID: <20130920110021.GD14107@lpalcu-linux> (raw)
In-Reply-To: <523C228F.7060700@cn.fujitsu.com>

Hi,

On Fri, Sep 20, 2013 at 06:25:19PM +0800, Li Zhijian wrote:
> >>>>>
> >>>>>III) compile a simple C program
> >>>>># cat test.c
> >>>>>int main ()
> >>>>>{
> >>>>>printf("hello world\n");
> >>>>>return 0;
> >>>>>}
> >>>>># source toolchain-1.3-tcmode-default/environment-setup-x86_64-poky-linux
> >>>>># $CC -o test test.c -L tmp/sysroots/qemux86-64/usr/lib/ -lm
OK, it looks like something strange happens in your setup.

To debug it, let's add '-Wl,--verbose' at the end of your command and you
should be able to see where the linker is looking for libraries. Also,
the linker script will be printed.

You should see it try your directory first
tmp/sysroots/qemux86-64/usr/lib/, and then fall through the default ones
with the sysroot prefix added and, at the end, the system ones:
/lib:/usr/lib.

Thanks,
Laurentiu


WARNING: multiple messages have this Message-ID (diff)
From: Laurentiu Palcu <laurentiu.palcu@intel.com>
To: Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: Yocto list discussion <yocto@yoctoproject.org>, poky@yoctoproject.org
Subject: Re: [poky] Is this a bug of binutils
Date: Fri, 20 Sep 2013 14:00:22 +0300	[thread overview]
Message-ID: <20130920110021.GD14107@lpalcu-linux> (raw)
In-Reply-To: <523C228F.7060700@cn.fujitsu.com>

Hi,

On Fri, Sep 20, 2013 at 06:25:19PM +0800, Li Zhijian wrote:
> >>>>>
> >>>>>III) compile a simple C program
> >>>>># cat test.c
> >>>>>int main ()
> >>>>>{
> >>>>>printf("hello world\n");
> >>>>>return 0;
> >>>>>}
> >>>>># source toolchain-1.3-tcmode-default/environment-setup-x86_64-poky-linux
> >>>>># $CC -o test test.c -L tmp/sysroots/qemux86-64/usr/lib/ -lm
OK, it looks like something strange happens in your setup.

To debug it, let's add '-Wl,--verbose' at the end of your command and you
should be able to see where the linker is looking for libraries. Also,
the linker script will be printed.

You should see it try your directory first
tmp/sysroots/qemux86-64/usr/lib/, and then fall through the default ones
with the sysroot prefix added and, at the end, the system ones:
/lib:/usr/lib.

Thanks,
Laurentiu


  reply	other threads:[~2013-09-20 11:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20  6:45 Is this a bug of binutils Li Zhijian
2013-09-20  8:43 ` [yocto] " Laurentiu Palcu
2013-09-20  8:43   ` Laurentiu Palcu
2013-09-20  8:50   ` [yocto] " Laurentiu Palcu
2013-09-20  8:50     ` [poky] " Laurentiu Palcu
2013-09-20  9:56     ` Li Zhijian
2013-09-20 10:02       ` [yocto] " Laurentiu Palcu
2013-09-20 10:02         ` [poky] " Laurentiu Palcu
2013-09-20 10:25         ` Li Zhijian
2013-09-20 11:00           ` Laurentiu Palcu [this message]
2013-09-20 11:00             ` Laurentiu Palcu
2013-09-23  2:34             ` Li Zhijian
2013-09-23  2:44               ` Li Zhijian
2013-09-26  3:57             ` Li Zhijian
2013-09-26  7:36               ` [yocto] " Laurentiu Palcu
2013-09-26  7:36                 ` [poky] " Laurentiu Palcu
2013-09-20  9:40   ` Li Zhijian

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=20130920110021.GD14107@lpalcu-linux \
    --to=laurentiu.palcu@intel.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=poky@yoctoproject.org \
    --cc=yocto@yoctoproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.