Prof. A Olowofoyeku (The African Chief) wrote:
On 11 Apr 2002 at 18:02, da Silva, Joe wrote:
OK, if I may ask a possibly silly question ...
I installed Linux (Mandrake) almost two weeks ago now (having never used Linux before), so there's a LOT I don't yet understand.
So, is there any difference between a GPC build for one flavour of Linux, versus another?
Yes, there are potentially a lot of differences
Assuming it's based on the same GCC version (eg. 2.95.3),
The differences will be reduced in this case. But there can still be problems, depending on what versions of what libraries were installed on the system on which GPC was built, and other things (e.g., different path names for files). On some systems, you might have a path name like 'xxx/lib/gcc-lib/i586-pc-linux/2.95.3'. On others you might have 'xxx/lib/gcc-lib/i686-linux-mandrake/2.95.3', or 'xxx/lib/gcc-lib/i386-redhat-linux/2.95.3', or any other permutation.
These differences should not matter if you take a GPC from system A to system B and install it in the same directories on system B where it was on system A (even if a native build on system B would choose another directory).
But differences in library versions (particularly shared libraries) are not so easily surmounted. You might need for example, to update your libraries, etc. AFAIK GPC itself cannot be statically linked. Therefore issues with shared library versions will always be potentially there.
Yes, that's the main problem, and that's why I prefer to distribute all Linux binaries (if any) statically linked (at the expense of file size).
AFAIK there are no problems building GPC statically (provided you have static versions of libc which should normally be there), by just adding `-static' to CFLAGS during make.
Frank