Re: Is a binary with this libraries portable



On 28 Feb., 12:14, John Reiser <jrei...@xxxxxxxxxxxx> wrote:


For me it looks like all this should be available on recent Linux
versions.

Not everybody runs a recent Linux version. For instance, there are still
many installations of Red Hat Enterprise Linux version 4 [also CentOS4.]
It is only three years old. It still has 3 months of Full Support,
8 months of Deployment Support, and 4 years of Maintenance Support.

Well but what is the current state for Desktop users?

I'm compiling on Ubunto 6.06 Dapper Drake. I think this should be old
enough for most desktop users.

At least for them who consider purchasing binary Software. I don't
care
about the others.

The functional capabilities for which libXrandr was designed
are missing from the majority of existing VGA chips/cards and displays.

Yes. I found out in the meantime that it is best to link statically
against it.
It only depends on libXrender and hopefully the GUI toolkit (i have to
look at this)
will handle a non working libXrandr gracefully.

Many installations lack the libraries libexpat.so.1 and libXau.so.6.

I used readelf (thanks for the hint) to read what i'm using and this
is only:

0x00000001 (NEEDED) Shared library: [libXft.so.2]
0x00000001 (NEEDED) Shared library: [libX11.so.6]
0x00000001 (NEEDED) Shared library: [libXext.so.
6]
0x00000001 (NEEDED) Shared library:
[libfreetype.so.6]
0x00000001 (NEEDED) Shared library:
[libfontconfig.so.1]
0x00000001 (NEEDED) Shared library:
[libXrender.so.1]
0x00000001 (NEEDED) Shared library: [librt.so.1]
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libcrypt.so.
1]
0x00000001 (NEEDED) Shared library:
[libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.
1]
0x00000001 (NEEDED) Shared library: [libc.so.6]

Luckily all libs are part of the LSB 3.2 Desktop standard. freetype is
using expat and
Xrender needs Xau. So that's not my responsibility.

Run "readelf --version-info <executable_program>" to see which GLIBC_* versions
your executables expect. Greater than GLIBC_2.3.2 probably will force you
to distribute libc.so.6 and the other pieces of glibc-2.x.y.

How can i find out about this. I have to say that MSDN is giving very
good information
about what function is available on what Version. I really miss any
kind of information
about this in the man pages.
As far as know i'm only using posix and bsd functions. But i guess i
need a good
runtime checker. Unfortunately the LSB checker for Ubuntu does not
work and there
is none for 3.2 prepackaged. Well 6.06 is far from being LSB compliant
anyway.

You must distribute "private" libraries, and tell the runtime linker
to use them, if you wish to support at least 75% of existing installations.

No. I will never again distribute any private "pthread" or "glibc"
libraries. You only run
into a complete nightmare. My last try was with Mandriva, Red Hat
Fedora 3 and Suse 9.x
and had such terrible results that i was really really disappointed
and stopped working on
the Linux version for a few years.

This is not possible and thats also why LSB forbids to link to any of
the core libraries
statically or do bundle them and also forbids static compiled
programs.
.