04-26-07 12:23 AM
C code
gcc 3.4.6 / 3.3.5
SuSE 9.3, RHAS4
I'm starting to get into a situation where shared libraries either
don't exist on a target platform, or if they exist their version
number can vary by platform. (For example, the default libpcap in
SuSE 9.3 is 0.8.1, and on RHAS4 it's 0.8.3.)
I recently got caught, for example, when I tried to run a set of
images, built on RHAS4, on SuSE 9.3 -- and it didn't find libpcap
0.8.3.
Duh.
For shared object files that simply don't exist on a given platform,
what I've been doing is editing the code to remove references that
would be resolved in unavailable shared objects, and building images
on that platform, and maintaining separate image sets. I don't see
that I've got much choice about that; I can nest conditionally-
included code in an #ifdef block, and pass the necessary define on
the 'make' command line. (If there's a more elegant way to do that,
I'd love to know it exists.)
But for library versions, I need to learn if there's a smarter way to
handle this than explicitly building of a set of images on each of
the platforms. I'm guessing that this would be done in the Makefile
somewhere, but if I could get a hint about what capabilities exist I
can then focus on learning more about the tools. Just would like to
minimize the time I might spend barking up the wrong tree.
Any guidance or references greatly appreciated. If I'm basically
doing it the way it has to be done, I'd appreciate knowing that as
well.
[ Post a follow-up to this message ]
|