Re: Cross-compile Applications for 860 on x86

3 messages, 2 authors, 2000-01-17 · open the first message on its own page

Re: Cross-compile Applications for 860 on x86

From: Jim Lewis <hidden>
Date: 2000-01-17 03:56:43

dony wrote:
Hi,

I download a older version of sash and now it works. It can run any built-in commands , but it fails to run
external programs , such as my test program "mytest". I put it both on / and /bin.
"-printenv" shows "PATH=/bin:/usr/bin:/etc". When I type "mytest" or "/bin/mytest" on the command prompt ">" , it
says "No such file or directory". And I cannot find some lines
about  "SASH"  in init/main.c.
Do you know why?
Sounds like it  cannot find shared objects such as libc.so. You have two choices:
1) when you link the program, add the "-static" option
2) put the necessary libraries in /lib

If you have access to a linux-ppc machine, the command ldd with tell you what libraries will be loaded when the
command executes.
Thank you very much.

Jim Chapman wrote:
quoted
quoted
In message [off-list ref] you write:
quoted
     When I compile the SASH  with "-static" options and then replace /bin/sh with sash.
When reseting my MPC860 based board, the kernel boot normally and can show the boot messages. But at last it
cannot show the "bash#" prompt. If I input "ls" or such commands,
"sash" is the standalone shell, not bash; it  will  display  a  ">  "
prompt - not "bash# ".
quoted
It justs shows :

    ls
    pid 8: killed (signal 11)
Maybe you have a problem  with  you  shared  libraries.  Try  running
statically  link  versions  of  some  programs first. Does this work?
[Well, it should when you be able to run a shell...]
Do "-ls" at the prompt, not "ls". Prepending "-" runs sash's builtin
versions, otherwise it will try to find a ls on your ramdisk like any
other shell. See sash's man page about all available builtin commands.
BTW, don't expect all standard command switches to work on those
builtins, since sash's versions are _very_ minimized.

-Jim
-Jim Lewis


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Cross-compile Applications for 860 on x86

From: dony <hidden>
Date: 2000-01-17 03:26:38



Jim Lewis wrote:
dony wrote:
quoted
Hi,

I download a older version of sash and now it works. It can run any built-in commands , but it fails to run
external programs , such as my test program "mytest". I put it both on / and /bin.
"-printenv" shows "PATH=/bin:/usr/bin:/etc". When I type "mytest" or "/bin/mytest" on the command prompt ">" , it
says "No such file or directory". And I cannot find some lines
about  "SASH"  in init/main.c.
Do you know why?
Sounds like it  cannot find shared objects such as libc.so. You have two choices:
1) when you link the program, add the "-static" option
If I compile my test program which have only one "printf" line with "-static", It is about 1M size!  So I don't think
it's a good idea for me now.
2) put the necessary libraries in /lib
"rpc.nfsd -F -d call" says that it cannot find /etc/ld.so.cache and /etc/ld.so.preload. Yes, I have not these two files
after I decompress mbxroot.full.tgz.
Would you please send me a copy of these files? Thank you very much.h.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Cross-compile Applications for 860 on x86

From: Jim Lewis <hidden>
Date: 2000-01-17 04:35:01

dony wrote:
Jim Lewis wrote:
quoted
dony wrote:
quoted
Hi,

I download a older version of sash and now it works. It can run any built-in commands , but it fails to run
external programs , such as my test program "mytest". I put it both on / and /bin.
"-printenv" shows "PATH=/bin:/usr/bin:/etc". When I type "mytest" or "/bin/mytest" on the command prompt ">" , it
says "No such file or directory". And I cannot find some lines
about  "SASH"  in init/main.c.
Do you know why?
Sounds like it  cannot find shared objects such as libc.so. You have two choices:
1) when you link the program, add the "-static" option
If I compile my test program which have only one "printf" line with "-static", It is about 1M size!  So I don't think
it's a good idea for me now.
quoted
2) put the necessary libraries in /lib
"rpc.nfsd -F -d call" says that it cannot find /etc/ld.so.cache and /etc/ld.so.preload. Yes, I have not these two files
after I decompress mbxroot.full.tgz.
Would you please send me a copy of these files? Thank you very much.h.
You don't really need those files. If they are not there, the loader will just look in the default places for the
libraries. A hello-world program will probably need /lib/ld.so.1 and /lib/libc.so.

If you do want those files, it would be best to build ldconfig and run it to generate ld.so.cache.


--
Jim Lewis


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help