* Re: how to get target ldd ?
@ 2009-06-10 8:34 Nebojša Ćosić
2009-06-10 14:48 ` Dan Wilder
0 siblings, 1 reply; 11+ messages in thread
From: Nebojša Ćosić @ 2009-06-10 8:34 UTC (permalink / raw)
To: crossgcc; +Cc: peter
Did you check that your /lib/ld-2.8.so (or whatever version of ld it
is) has access/exec rights?
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: how to get target ldd ?
2009-06-10 8:34 how to get target ldd ? Nebojša Ćosić
@ 2009-06-10 14:48 ` Dan Wilder
0 siblings, 0 replies; 11+ messages in thread
From: Dan Wilder @ 2009-06-10 14:48 UTC (permalink / raw)
To: Nebojša Ćosić, crossgcc; +Cc: peter
And just to be clear. I'm sure the answer is "yes" but felt it wouldn't hurt to ask.
Apologies if this information is already clear in the thread.
When you're trying to run ldd and friends (using LD_TRACE_LOADED_OBJECTS=1 on the command line),
you do this on the target system, not the build system?
--
Dan Wilder
-----Original Message-----
From: crossgcc-owner@sourceware.org [mailto:crossgcc-owner@sourceware.org] On Behalf Of Nebojša Cosic
Sent: Wednesday, June 10, 2009 1:34 AM
To: crossgcc@sourceware.org
Cc: peter
Subject: Re: how to get target ldd ?
Did you check that your /lib/ld-2.8.so (or whatever version of ld it
is) has access/exec rights?
--
For unsubscribe information see http://sourceware.org/lists.html#faq
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how to get target ldd ?
2009-06-11 20:39 ` Yann E. MORIN
@ 2009-06-12 8:03 ` ng
0 siblings, 0 replies; 11+ messages in thread
From: ng @ 2009-06-12 8:03 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc
Yann E. MORIN wrote:
> Peter,
> All,
>
> On Wednesday 10 June 2009 23:29:40 ng@piments.com wrote:
>> I have just rerun ct-ng build and all libs in sys-tools come out with
>> 555 permissons.
>> after populate, all copied libs in /lib are 644 ie NO x bit set at all,
>
> OK, populate uses "install -m 0644" so that's no wonder the mode is incorrect.
> ;-/
>
> I'll fix that.
>
> Thank you for the time you invested to help!
>
> Regards,
> Yann E. MORIN.
>
OK , thanks for the confirmation. I did point out this permissions issue
in another thread nearly a month back. It's a shame you did pick up on
it. It's odd no one else has flagged it.
bash-4.0#grep -R "install -m 644" *
scripts/build/debug/200-duma.sh: CT_DoExecLog ALL install -m 644
${libs} "${CT_SYSROOT_DIR}/usr/lib"
Is the (only) line that needs to be corrected?
regards, Peter.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how to get target ldd ?
2009-06-10 21:29 ` ng
@ 2009-06-11 20:39 ` Yann E. MORIN
2009-06-12 8:03 ` ng
0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2009-06-11 20:39 UTC (permalink / raw)
To: ng; +Cc: crossgcc
Peter,
All,
On Wednesday 10 June 2009 23:29:40 ng@piments.com wrote:
> I have just rerun ct-ng build and all libs in sys-tools come out with
> 555 permissons.
> after populate, all copied libs in /lib are 644 ie NO x bit set at all,
OK, populate uses "install -m 0644" so that's no wonder the mode is incorrect.
;-/
I'll fix that.
Thank you for the time you invested to help!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software Designer | \ / CAMPAIGN | ___ |
| --==< ^_^ >==-- `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
`------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how to get target ldd ?
2009-06-10 7:08 ` ng
@ 2009-06-10 21:29 ` ng
2009-06-11 20:39 ` Yann E. MORIN
0 siblings, 1 reply; 11+ messages in thread
From: ng @ 2009-06-10 21:29 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc
ng@piments.com wrote:
> Yann E. MORIN wrote:
>> Peter,
>> All,
>>
>> On Wednesday 10 June 2009 00:16:58 ng@piments.com wrote:
>>> # ldd
>>> -sh: ldd: not found
>>> # ls -ail `which ldd`
>>> 3273877 -r-xr-xr-x 1 root root 5583 Jun 8 2009
>>> /usr/bin/ldd
>>> So it's there, it's found by which, but "not found". Clearly this is
>>> just busybox's challenged error handling spewing garbage. The
>>> question is how to debug what is really happending.
>>> This error is helpful in itself since it's not even a binary, it's a
>>> script.
>>
>> Running a shell script (or any other script type) first imply running a
>> shell, and that shell will interpret the script.
>>
>>> Binaries give : -sh: gnuplot: Permission denied
>>> even though they have x permissions and are being invoked by root.
>>
>> Hmmm. Sounds like a ld problem. Please run this on the target:
>> # ls -l /lib/ld*
>>
>> It should be marked with the 'x' bit.
>>
>> I'm off to work, will look in more details tonight...
>>
>> Regards,
>> Yann E. MORIN.
>>
>
> Damn! it was that simple.
>
> chmod a+x /lib/ld* fix it. My hello.dyn and gnuplot now work.
>
> I posted quite some time back in another thread that all my libs were
> without x perms and it got no comment. So I assumed that it was normal
> and the it was regarded as a dumb question.
>
> So the question is: why is it installed with the wrong permissions?
>
> I have just rebuild the toolchain and the perms look correct in sys-root.
>
> 3317406 -r-xr-xr-x 1 prof users 160750 2009-06-10 01:49 ld-2.9.so
> 3317408 lrwxrwxrwx 1 prof users 9 2009-06-10 01:49 ld-linux.so.3
> -> ld-2.9.so
>
>
> However ldd still does not work:
> # ldd gnuplot
> -sh: ldd: not found
> # which ldd
> /usr/bin/ldd
>
>
> I think what may have happened it that , having noted that nothing had x
> in /lib I added it to all libs without noting that ld was (possibly)
> already executable. When I did not get any comment on that I likely
> reverted everything including ld to -x .
>
>
> I'll do more thorough testing tonight but initial evidence suggests that
> it is fixed.
>
> It would be good to have ldd as a tool but I think that is a differenct
> problem.
>
> It tool a long time to find something so simple but at least I can
> rebuild everything dynamic now.
>
> Many thanks, Peter.
>
>
[UPDATE:]
I have just rerun ct-ng build and all libs in sys-tools come out with
555 permissons.
after populate, all copied libs in /lib are 644 ie NO x bit set at all,
notably:
3384784 -r-xr-xr-x 1 prof users 160750 Jun 10 22:15 ld-2.9.so
3384786 lrwxrwxrwx 1 prof users 9 Jun 10 22:15 ld-linux.so.3 ->
ld-2.9.so
So it's not finger trouble at my end, it really was like this start with.
/Peter
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how to get target ldd ?
2009-06-10 6:01 ` Yann E. MORIN
@ 2009-06-10 7:08 ` ng
2009-06-10 21:29 ` ng
0 siblings, 1 reply; 11+ messages in thread
From: ng @ 2009-06-10 7:08 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc
Yann E. MORIN wrote:
> Peter,
> All,
>
> On Wednesday 10 June 2009 00:16:58 ng@piments.com wrote:
>> # ldd
>> -sh: ldd: not found
>> # ls -ail `which ldd`
>> 3273877 -r-xr-xr-x 1 root root 5583 Jun 8 2009 /usr/bin/ldd
>> So it's there, it's found by which, but "not found". Clearly this is
>> just busybox's challenged error handling spewing garbage. The question
>> is how to debug what is really happending.
>> This error is helpful in itself since it's not even a binary, it's a
>> script.
>
> Running a shell script (or any other script type) first imply running a
> shell, and that shell will interpret the script.
>
>> Binaries give :
>> -sh: gnuplot: Permission denied
>> even though they have x permissions and are being invoked by root.
>
> Hmmm. Sounds like a ld problem. Please run this on the target:
> # ls -l /lib/ld*
>
> It should be marked with the 'x' bit.
>
> I'm off to work, will look in more details tonight...
>
> Regards,
> Yann E. MORIN.
>
Damn! it was that simple.
chmod a+x /lib/ld* fix it. My hello.dyn and gnuplot now work.
I posted quite some time back in another thread that all my libs were
without x perms and it got no comment. So I assumed that it was normal
and the it was regarded as a dumb question.
So the question is: why is it installed with the wrong permissions?
I have just rebuild the toolchain and the perms look correct in sys-root.
3317406 -r-xr-xr-x 1 prof users 160750 2009-06-10 01:49 ld-2.9.so
3317408 lrwxrwxrwx 1 prof users 9 2009-06-10 01:49 ld-linux.so.3
-> ld-2.9.so
However ldd still does not work:
# ldd gnuplot
-sh: ldd: not found
# which ldd
/usr/bin/ldd
I think what may have happened it that , having noted that nothing had x
in /lib I added it to all libs without noting that ld was (possibly)
already executable. When I did not get any comment on that I likely
reverted everything including ld to -x .
I'll do more thorough testing tonight but initial evidence suggests that
it is fixed.
It would be good to have ldd as a tool but I think that is a differenct
problem.
It tool a long time to find something so simple but at least I can
rebuild everything dynamic now.
Many thanks, Peter.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how to get target ldd ?
2009-06-09 22:17 ` ng
@ 2009-06-10 6:01 ` Yann E. MORIN
2009-06-10 7:08 ` ng
0 siblings, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2009-06-10 6:01 UTC (permalink / raw)
To: crossgcc; +Cc: ng
Peter,
All,
On Wednesday 10 June 2009 00:16:58 ng@piments.com wrote:
> # ldd
> -sh: ldd: not found
> # ls -ail `which ldd`
> 3273877 -r-xr-xr-x 1 root root 5583 Jun 8 2009 /usr/bin/ldd
> So it's there, it's found by which, but "not found". Clearly this is
> just busybox's challenged error handling spewing garbage. The question
> is how to debug what is really happending.
> This error is helpful in itself since it's not even a binary, it's a
> script.
Running a shell script (or any other script type) first imply running a
shell, and that shell will interpret the script.
> Binaries give :
> -sh: gnuplot: Permission denied
> even though they have x permissions and are being invoked by root.
Hmmm. Sounds like a ld problem. Please run this on the target:
# ls -l /lib/ld*
It should be marked with the 'x' bit.
I'm off to work, will look in more details tonight...
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software Designer | \ / CAMPAIGN | ___ |
| --==< ^_^ >==-- `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
`------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how to get target ldd ?
2009-06-07 16:56 ` Yann E. MORIN
@ 2009-06-09 22:17 ` ng
2009-06-10 6:01 ` Yann E. MORIN
0 siblings, 1 reply; 11+ messages in thread
From: ng @ 2009-06-09 22:17 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: crossgcc
Yann E. MORIN wrote:
> Peter,
> All,
>
> On Saturday 06 June 2009 09:09:02 peter wrote:
>> I am having problems with a busybox ARM target I have build using ct-ng.
>> None of the executables , including busybox, seem to work unless I
>> build them static.
>
> What's the symptom ?
> Do they segfault ?
> Can you run a statically linked hello world ? A dynamic one ?
> What does it say on the console?
> Using glibc or uClibc ?
> ...
>
> You did not give enough info to diagnose the problem...
>
>> Is there a way to get ldd for the target system out of ct-ng?
>
> Look in the archives, this has already been discussed...
>
> The /problem/ with ldd (the one in glibc, at least) is that it tries to
> _run_ the dynamic linker /lib/ld-xxx.so with some environment variables
> set, and this will print the libraries it finds _at_runtime_.
>
> Obviously, you don't want to run your ARM dynamic linker on your dev
> machine, as this most probably is some kind os x86.
>
> If using populate as per your previous posts, what does populate -v says?
>
> Regards,
> Yann E. MORIN.
>
Thanks Yann, Dan,
I did not give more details of the problem because I thought ldd would
enable me to see where the problem lay. Sadly not. I copied the sys-root
copy of ldd and it gives me the same silliness as the other commands.
# which ldd
/usr/bin/ldd
# ldd
-sh: ldd: not found
# ls -ail `which ldd`
3273877 -r-xr-xr-x 1 root root 5583 Jun 8 2009 /usr/bin/ldd
So it's there, it's found by which, but "not found". Clearly this is
just busybox's challenged error handling spewing garbage. The question
is how to debug what is really happending.
This error is helpful in itself since it's not even a binary, it's a
script. Binaries give :
-sh: gnuplot: Permission denied
even though they have x permissions and are being invoked by root.
# which gnuplot
/usr/bin/gnuplot
# `which gnuplot`
-sh: /usr/bin/gnuplot: Permission denied
# ls -ail `which gnuplot`
3272843 -rwxr-xr-x 1 root root 2074273 Jun 2 2009
/usr/bin/gnuplot
Following Dan's suggestion got not more information: (unless getting the
same output with the trace IS more information)
# LD_TRACE_LOADED_OBJECTS=1 gnuplot
-sh: gnuplot: Permission denied
Busybox static works , bb with normal dyn linking : permission denied.
> If using populate as per your previous posts, what does populate -v says?
Tar bleats about some files in /etc having "improbable" datestamp, circa
1/1/1970. This does not seem to be an error though. After that it finds
the expected libs , oopies them , then starts "looping". This just
reports libs to be already present. This seems to be in order.
LD_TRACE_LOADED_OBJECTS=1 hello.stat
Hello world!
# LD_TRACE_LOADED_OBJECTS=1 hello.dyn
-sh: hello.dyn: Permission denied
So either ld loads but can't link or there is a broken lib...
bash-4.0#file /back/ts/root-image/lib/libc.so.6
/back/ts/root-image/lib/libc.so.6: ELF 32-bit LSB shared object, ARM,
version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux
2.6.29, not stripped
# readelf -a /back/ts/root-image/lib/libc.so.6
...
Version needs section '.gnu.version_r' contains 1 entries:
Addr: 0x0000000000012520 Offset: 0x012520 Link: 4 (.dynstr)
000000: Version: 1 File: ld-linux.so.3 Cnt: 2
0x0010: Name: GLIBC_2.4 Flags: none Version: 10
0x0020: Name: GLIBC_PRIVATE Flags: none Version: 9
Notes at offset 0x00000194 with length 0x00000020:
Owner Data size Description
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "4T"
Tag_CPU_arch: v4T
Tag_ARM_ISA_use: Yes
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align8_needed: Yes
Tag_ABI_align8_preserved: Yes, except leaf SP
Tag_ABI_enum_size: int
I'm short on ideas now.
Thx
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: how to get target ldd ?
2009-06-06 7:09 peter
2009-06-06 17:09 ` Dan Wilder
@ 2009-06-07 16:56 ` Yann E. MORIN
2009-06-09 22:17 ` ng
1 sibling, 1 reply; 11+ messages in thread
From: Yann E. MORIN @ 2009-06-07 16:56 UTC (permalink / raw)
To: crossgcc; +Cc: peter
Peter,
All,
On Saturday 06 June 2009 09:09:02 peter wrote:
> I am having problems with a busybox ARM target I have build using ct-ng.
> None of the executables , including busybox, seem to work unless I
> build them static.
What's the symptom ?
Do they segfault ?
Can you run a statically linked hello world ? A dynamic one ?
What does it say on the console?
Using glibc or uClibc ?
...
You did not give enough info to diagnose the problem...
> Is there a way to get ldd for the target system out of ct-ng?
Look in the archives, this has already been discussed...
The /problem/ with ldd (the one in glibc, at least) is that it tries to
_run_ the dynamic linker /lib/ld-xxx.so with some environment variables
set, and this will print the libraries it finds _at_runtime_.
Obviously, you don't want to run your ARM dynamic linker on your dev
machine, as this most probably is some kind os x86.
If using populate as per your previous posts, what does populate -v says?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software Designer | \ / CAMPAIGN | ___ |
| --==< ^_^ >==-- `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
`------------------------------^-------^------------------^--------------------'
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
* RE: how to get target ldd ?
2009-06-06 7:09 peter
@ 2009-06-06 17:09 ` Dan Wilder
2009-06-07 16:56 ` Yann E. MORIN
1 sibling, 0 replies; 11+ messages in thread
From: Dan Wilder @ 2009-06-06 17:09 UTC (permalink / raw)
To: peter, Crossgcc list
Maybe nyou can, but LDD is a shell script, and you can grab almost any
old copy of it.
Very likely you can get the same effect on your command using the
command line
LD_TRACE_LOADED_OBJECTS=1 your-command-here
which is the heart of ldd. Don't set LD_TRACE_LOADED_OBJECTS on a
command line by itself!
--
Dan Wilder
-----Original Message-----
From: crossgcc-owner@sourceware.org
[mailto:crossgcc-owner@sourceware.org] On Behalf Of peter
Sent: Saturday, June 06, 2009 12:09 AM
To: Crossgcc list
Subject: how to get target ldd ?
Hi,
I am having problems with a busybox ARM target I have build using ct-ng.
None of the executables , including busybox, seem to work unless I
build them static.
Unfortunately the rather trimmed down error handling in BB is more of a
distraction than a help in finding where the real problem lies.
Is there a way to get ldd for the target system out of ct-ng?
TIA, Peter.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
* how to get target ldd ?
@ 2009-06-06 7:09 peter
2009-06-06 17:09 ` Dan Wilder
2009-06-07 16:56 ` Yann E. MORIN
0 siblings, 2 replies; 11+ messages in thread
From: peter @ 2009-06-06 7:09 UTC (permalink / raw)
To: Crossgcc list
Hi,
I am having problems with a busybox ARM target I have build using ct-ng.
None of the executables , including busybox, seem to work unless I
build them static.
Unfortunately the rather trimmed down error handling in BB is more of a
distraction than a help in finding where the real problem lies.
Is there a way to get ldd for the target system out of ct-ng?
TIA, Peter.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-06-12 8:03 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-10 8:34 how to get target ldd ? Nebojša Ćosić
2009-06-10 14:48 ` Dan Wilder
-- strict thread matches above, loose matches on Subject: below --
2009-06-06 7:09 peter
2009-06-06 17:09 ` Dan Wilder
2009-06-07 16:56 ` Yann E. MORIN
2009-06-09 22:17 ` ng
2009-06-10 6:01 ` Yann E. MORIN
2009-06-10 7:08 ` ng
2009-06-10 21:29 ` ng
2009-06-11 20:39 ` Yann E. MORIN
2009-06-12 8:03 ` ng
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).