Busybox Syntax error: word unexpected (expecting ")")
Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Busybox Syntax error: word unexpected (expecting ")")
Hi,
When I tried compile an simple hello world program on ARM9 board by using Busybox 1.15.3, I am getting the error,
Syntax error: word unexpected (expecting ")")
"file busybox" output:: busybox: ELF 32-bit LSB executable, ARM, version 1, statically linked, for GNU/Linux 2.4.3, stripped
"file Hello" output:: hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.14, not stripped
Probably would be a good idea to show us the source code of this program you're trying to compile; the error might be just as simple as it reads: You're missing a ")" somewhere. Shouldn't be hard to spot, but it would help to see the code.
Not sure what to suggest, but the program compiled and ran for me (yes, totally different architecture), and here's the `file` and `ldd` info, in case it helps at all:
Thanks for the hint.
Seems, the binary on ARM is looking for some libraries. I tried the same ldd for ARM version of hello executable. But getting the error,
ldd: exited with unknown exit code (126)
This is something like binaries incompatibility, IMHO nothing to deal with busybox, busybox is just a light version of useful tools for embedded system. I'll look to the cross-compiler version used for the libc of your target and the libc you're linking your application with....
You are correct.
I copied the libc and ld-linux library from the arm cross-compiler libc into my target root filesystems /lib. Now the program is working fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.