compiling a single binary for all linux distros?

compiling a single binary for all linux distros?

Post by amc_NO_SPA » Wed, 02 Nov 2005 02:18:01


As my wx app is nearing completion, I'm wanting to make available a
single binary release for all linux platforms.

In the past I've come up against things like glibc and libstdc++
confilcts. But it must be possible, as commercially available apps seem
to have no trouble.

Does anyone have any tips, or could point me at a web site with this info?

Cheers,
AC.


---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM
 
 
 

compiling a single binary for all linux distros?

Post by jori » Wed, 02 Nov 2005 06:21:24


This wiki entry may help:
http://www.yqcomputer.com/
Our experience is that statically linking (we use wx2.6.2 with gtk1.2.10 on
RedHat 6.2 (zoot)) works for our product.
Regards, Jorik.




---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM

 
 
 

compiling a single binary for all linux distros?

Post by biol7 » Wed, 02 Nov 2005 20:03:39

I used a slackware 9.1 distro, with wxGTK 2.4.2

configure --enable-debug --with-gtk --enable-gtk2 --with-libpng=builtin
--enable-shared=no

It ran on Slackware 9.1 and 10.x Debian 3.1 ubuntu 5.04 SUSE 9.2 and
Fedora core 2 without any problems

I found a gtk1 linked app would not run on default installs of some of these
chris





---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM
 
 
 

compiling a single binary for all linux distros?

Post by amc_NO_SPA » Wed, 02 Nov 2005 20:15:22


Thanks guys, that's great.

Though I'm surprised to see that GTK is the major issue, I thought GLIBC
and libstdc++ were the major cause of cross-distro incompatabilities.

AC.


---------------------------------------------------------------------
To unsubscribe, e-mail: XXXX@XXXXX.COM
For additional commands, e-mail: XXXX@XXXXX.COM
 
 
 

compiling a single binary for all linux distros?

Post by malcolm.ne » Wed, 02 Nov 2005 23:04:53


The single solution (numbered Solution 1 which infers that there is/are/will
be more) says " If you do not need OpenGL, use wxGTK2-static-devel rpm
from [ http://www.yqcomputer.com/ ]
< http://www.yqcomputer.com/ ;, compile your super-application on ***
RedHat 8.0 (i386) for i386 binary (it will run on x86_64 too) and on ***
Yellow Dog 3.0 for ppc binary; your binaries will work on virtually all
i386, x86_64, and ppc linux distros in use today."

Which brings up several questions (at least for me).

1) what if your program NEEDS OpenGL?

2) Where can I download/purchase 8.0?

3) Would Fedora do? (since RedHat is now on Enterprise

4) Has anyone made a live C(DV)D which could be used to do the compiling
without needing a total installation?

5) Does anyone know how to?

Bets
Mal


This wiki entry may help:<br><a href=" http://www.yqcomputer.com/ "> http://www.yqcomputer.com/ ;/a><br>Our experience is that statically linking (we use
wx2.6.2 with gtk1.2.10 on<br>RedHat 6.2 (zoot)) works for our product.<br></blockquote></div><br>
The single solution (numbered Solution 1 which infers that there is/are/will be more) says "
If you do not need OpenGL, use wxGTK2-static-devel rpm from <a href=" http://www.yqcomputer.com/ ">[ http://www.yqcomputer.com/ ] <img src=" http://www.yqcomputer.com/ " border="0"></a>,
compile your super-application on *** RedHat 8.0 (i386) for i386
binary (it will run on x86_64 too) and on *** Yellow Dog 3.0 for ppc
binary; your binaries will work on virtually all i386, x86_64, and ppc
linux distros in use today."<br>
<br>
Which brings up several questions (at least for me).<br>
<br>
1) what if your program NEEDS OpenGL?<br>
<br>
2) Where can I download/purchase 8.0? <br>
<br>
3) Would Fedora do? (since RedHat is now on Enterprise <br>
<br>
4) Has anyone made a live C(DV)D which could be used to do the compiling without needing a total installation?<br>
<br>
5) Does anyone know how to?<br>
<br>
Bets<br>
Mal<br>
 
 
 

compiling a single binary for all linux distros?

Post by John Ratli » Thu, 03 Nov 2005 05:03:09

>

They still are, but many distros are just starting to replace GTK+ 1.2
with GTK+ 2.0 rather then put them both. gentoo doesn't install GTK+ 1.2
by default anymore, but I install it to see what my apps look like with
1.2. I release 1.2 and 2.0 versions of my Linux/wxGTK apps.

I compile on a Fedora Core 2 system, but I really don't know how
portable my binaries are. Fedora Core 2 is still a 2.6 system which is
pretty new. I don't expect too many linux users to be running ancient
distros though.

You can static link against the C++ library, but there may be
complications I'm not aware of. I think this can be done if you make a
symlink to the libstdc++.a file in your build directory.

libstdc++.so.6 is included with the newest g++ compilers, 3.4.4 for
example, probably 4.x too though I've never used it. I'd steer clear of
that for awhile. Though a guy I know who runs FreeBSD has g++ 3.4.4 with
libstdc++.so.5. I gues they didn't install the new standard C++ lib with it.

I compile with g++ 3.3 (3.3.1 on Jaguar, 3.3.3 on Linux). I use g++ 3.4
on Windows, but mingw/msys static links the c++ library and uses MSVCRT
for the C library, so it's not really an issue on Windows.

--John Ratliff