Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
hi all, if i'd like to compile a simple program (eg GNU netcat) as a binary that can run on any i386, how might i do that? i tried setting CFLAGS='-march=i386 -static -static-libgcc', '-march=i386', and '-march=i386 -static'. but when i run it on another box, it gives me errors like "Bus error" or "./netcat: /lib/libc.so.6: version `GLIBC_2.3' not found (required by ./netcat)"
"if i'd like to compile a simple program (eg GNU netcat) as a binary that can run on any i386, how might i do that?"
Setting -march=i386 produce a binary that will run on any i386.
"./netcat: /lib/libc.so.6: version `GLIBC_2.3' not found (required by ./netcat)"
A program compiled under gcc is Glibc dependent. There is a correspondence between Glibc versions and gcc versions. It is common for programs to fail when they are run against a Glibc which does not correspond to the gcc version used to compile them.
so s it possible for me to statically link glibc into the binary, such that it is always available to the app? that's what i thought -static or -static-libgcc does.
"so s it possible for me to statically link glibc into the binary, such that it is always available to the app? that's what i thought -static or -static-libgcc does."
But when I include those two options to the compiler, I get a "Bus error" when running it on the target platform. It is difficult for me to debug it because the platform is pebble and is running on a device (not a full blown PC) with no space for gdb.
Originally posted by overbored But when I include those two options to the compiler, I get a "Bus error" when running it on the target platform. It is difficult for me to debug it because the platform is pebble and is running on a device (not a full blown PC) with no space for gdb.
Just curious, what exact CPU does that device have?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.