|
Home > Archive > Unix Programming > April 2006 > How to build one Linux binary for many i386 platforms?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to build one Linux binary for many i386 platforms?
|
|
|
| I would like to build one Linux binary set--binary apps and any
associated dynamic libraries--for many Linux i386-based platforms (at
least RHEL 3.x/4.x, Fedora Core 2,3,4,5, Debian 3.1, but would like
sever more). I may still make multiple *package* distributions (eg,
..rpm, .deb etc), but I would like to have one build process provide
the binary-file-set input to these packages.
How does one effectively do this?
I see application distributions like these doing this:
http://dev.mysql.com/downloads/mysql/5.0.html
http://www.cmake.org/files/v2.2/cma...86-linux.tar.gz
(I recall there being many others, I just don't have references to
them at the moment.)
How is this done? Is it a careful management of
std-library/kernel-library dependence? I'm sure it is, but I'm not
sure exactly how to go about controlling this. Is there a reference I
can read somewhere? Is it mostly a matter of constructing the "least
common denominator" build systems from which to link the "most
ubiquitous" library set? Do I need to build the
libstdc-2.x/libstdc++-* on a Linux machine and compile to that?
I suspect this is a faq that's been answered somewhere; I have yet to
find the answer.
My project is a C++-based one. Does this have a bearing on my library
depedence? (eg, libstdc++...so?)
Thanks for any help,
-Matt
--
Remove the "downwithspammers-" text to email me.
| |
|
| On Fri, 14 Apr 2006 09:58:59 -0500, Matt I wrote:
>I would like to build one Linux binary set--binary apps and any
>associated dynamic libraries--for many Linux i386-based platforms (at
>least RHEL 3.x/4.x, Fedora Core 2,3,4,5, Debian 3.1, but would like
>sever more).
I forgot to mention: I'm looking for more info besides "just find the
dependencies and statically link" or "find the
lowest-common-demoniator libraries". The question: how do I determine
these libraries (I doubt that an ldd on a couple systems is going to
tell me everything) and which revs (eg, what rev of these libs are
going to work for most/all of these systems)? I'm also of the
impression that it's best not to statically link kernel/libstdc* lib
objects.
Thanks for any help,
-Matt
On Fri, 14 Apr 2006 09:58:59 -0500, Matt
<matt@downwithspammers-mengland.net> wrote:
>I would like to build one Linux binary set--binary apps and any
>associated dynamic libraries--for many Linux i386-based platforms (at
>least RHEL 3.x/4.x, Fedora Core 2,3,4,5, Debian 3.1, but would like
>sever more). I may still make multiple *package* distributions (eg,
>.rpm, .deb etc), but I would like to have one build process provide
>the binary-file-set input to these packages.
>
>How does one effectively do this?
>
>I see application distributions like these doing this:
>
>http://dev.mysql.com/downloads/mysql/5.0.html
>http://www.cmake.org/files/v2.2/cma...86-linux.tar.gz
>
>(I recall there being many others, I just don't have references to
>them at the moment.)
>
>How is this done? Is it a careful management of
>std-library/kernel-library dependence? I'm sure it is, but I'm not
>sure exactly how to go about controlling this. Is there a reference I
>can read somewhere? Is it mostly a matter of constructing the "least
>common denominator" build systems from which to link the "most
>ubiquitous" library set? Do I need to build the
>libstdc-2.x/libstdc++-* on a Linux machine and compile to that?
>
>I suspect this is a faq that's been answered somewhere; I have yet to
>find the answer.
>
>My project is a C++-based one. Does this have a bearing on my library
>depedence? (eg, libstdc++...so?)
>
>Thanks for any help,
>-Matt
--
Remove the "downwithspammers-" text to email me.
| |
| Joe Beanfish 2006-04-27, 7:55 am |
| Matt wrote:[vbcol=seagreen]
> On Fri, 14 Apr 2006 09:58:59 -0500, Matt I wrote:
>
> I forgot to mention: I'm looking for more info besides "just find the
> dependencies and statically link" or "find the
> lowest-common-demoniator libraries". The question: how do I determine
> these libraries (I doubt that an ldd on a couple systems is going to
> tell me everything) and which revs (eg, what rev of these libs are
> going to work for most/all of these systems)? I'm also of the
> impression that it's best not to statically link kernel/libstdc* lib
> objects.
>
> Thanks for any help,
> -Matt
>
>
> On Fri, 14 Apr 2006 09:58:59 -0500, Matt
> <matt@downwithspammers-mengland.net> wrote:
>
IME applications compiled on RedHat 7.2 (kernel 2.4.9 and glibc 2.2.4
run on all newer versions, up thru FC4 at least. You may need to provide
copies of the shared libs you linked with if the user hasn't installed
the compatibility packages.
| |
| Michael Paoli 2006-04-27, 7:55 am |
| Matt wrote:
> I would like to build one Linux binary set--binary apps and any
> associated dynamic libraries--for many Linux i386-based platforms (at
> least RHEL 3.x/4.x, Fedora Core 2,3,4,5, Debian 3.1, but would like
> sever more). I may still make multiple *package* distributions (eg,
> .rpm, .deb etc), but I would like to have one build process provide
> the binary-file-set input to these packages.
>
> How does one effectively do this?
One may want to start with LSB, in such a case. At least in theory,
if it's built to run on a minimally compliant LSB system, it should
then run on all compliant LSB systems - which, at least in theory,
would be most or all applicable platforms.
Some (many?) distributions also provide tools for supporting LSB, e.g.
supporting LSB compliance, providing minimally compliant LSB
environment(s) for testing/building, etc.
(Followup-to trimmed, due to specificity to LINUX)
references/excerpts:
$ cat /etc/debian_version
3.1
$ apt-cache search lsb
alien - install non-native packages with dpkg
nullmailer - simple relay-only mail transport agent
lsb - Linux Standard Base 2.0 support package
lsb-base - Linux Standard Base 2.0 init script functionality
lsb-core - Linux Standard Base 2.0 core support package
lsb-cxx - Linux Standard Base 2.0 C++ support package
lsb-graphics - Linux Standard Base 2.0 graphics support package
lsb-release - LSB release command
lsb-rpm - Red Hat package manager for LSB package building
lsbappchk - Linux Standard Base application compliance checking tool
$
http://www.linuxbase.org/
| |
|
| Michael and Joe,
Thanks for the LSB and Redhat info/references, that's quite helpful.
All-
This slashdot article looks applicable.
http://ask.slashdot.org/article.pl?sid=05/11/24/2230256
Also:
Unless the LSB is a fairly ubiquitous solution, I suspect there's more
info I need to grok to try and solve this problem well. Nonetheless,
I suspect my project will be leveraging LSB in any case.
-Matt
On Fri, 14 Apr 2006 13:10:41 -0400, Joe Beanfish <joe@nospam.duh>
wrote:
>
>IME applications compiled on RedHat 7.2 (kernel 2.4.9 and glibc 2.2.4
>run on all newer versions, up thru FC4 at least. You may need to provide
>copies of the shared libs you linked with if the user hasn't installed
>the compatibility packages.
On 14 Apr 2006 12:54:33 -0700, "Michael Paoli" <michael1cat@yahoo.com>
wrote:
>One may want to start with LSB, in such a case. At least in theory,
>if it's built to run on a minimally compliant LSB system, it should
>then run on all compliant LSB systems - which, at least in theory,
>would be most or all applicable platforms.
>
>Some (many?) distributions also provide tools for supporting LSB, e.g.
>supporting LSB compliance, providing minimally compliant LSB
>environment(s) for testing/building, etc.
>
>(Followup-to trimmed, due to specificity to LINUX)
>
>references/excerpts:
>$ cat /etc/debian_version
>3.1
>$ apt-cache search lsb
>alien - install non-native packages with dpkg
>nullmailer - simple relay-only mail transport agent
>lsb - Linux Standard Base 2.0 support package
>lsb-base - Linux Standard Base 2.0 init script functionality
>lsb-core - Linux Standard Base 2.0 core support package
>lsb-cxx - Linux Standard Base 2.0 C++ support package
>lsb-graphics - Linux Standard Base 2.0 graphics support package
>lsb-release - LSB release command
>lsb-rpm - Red Hat package manager for LSB package building
>lsbappchk - Linux Standard Base application compliance checking tool
>$
>http://www.linuxbase.org/
--
Remove the "downwithspammers-" text to email me.
| |
|
|
| Dr Balwinder S Dheeman 2006-04-27, 7:55 am |
| On 04/14/06 20:28, Matt wrote:
> I would like to build one Linux binary set--binary apps and any
> associated dynamic libraries--for many Linux i386-based platforms (at
> least RHEL 3.x/4.x, Fedora Core 2,3,4,5, Debian 3.1, but would like
> sever more). I may still make multiple *package* distributions (eg,
> .rpm, .deb etc), but I would like to have one build process provide
> the binary-file-set input to these packages.
>
> How does one effectively do this?
IMHO, select a LiveCD distro (I prefer Knoppix, please don't ask why?),
learn to re-master it, apt-get remove --purge <some-un-wanted-packages>
to make room for your binaries, develop, compile, install and, or test
whatever you want and ... re-master a custom ISO image which you can
easily distribute and, or sell in the shape of CD/DVD disks or may
provide free downloads better via jigdu.
Hope that helps!
--
Dr Balwinder Singh Dheeman Registered Linux User: #229709
CTO (Chief Technology Officer) Machines: #168573, 170593, 259192
Anu's Linux@HOME Distros: Ubuntu, Fedora, Knoppix
More: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/
|
|
|
|
|