Hi Per, On Mon, 24 Jul 2006, 13:23:15 +0200, Per Jessen wrote:
Manfred Hollstein wrote:
http://www.novell.com/coolsolutions/feature/11793.html http://en.opensuse.org/SUSE_Build_Tutorial
Interesting links, thanks.
HTH, cheers.
Hi Manfred,
what I am after is more like gcc and/or linker flags - these are my own applications, my own code - doesn't belong to any package.
OK. For such scenarios I built my own cross compilers and libraries in the past which made me independant from the actual target system; from a consistency and reproduceability point of view, this is probably the right way. This is how I structured the stuff /opt/gnu/packages/ gcc-2.95.3/{bin,lib,...} gcc-3.3.2/{bin,lib,...} glibc-2.0.5/{...} glibc-2.2.4/{...} ... For gcc it then comes down to adding suitable -I/opt/gnu/packages/glibc-2.2.4/include ... parameters to your CFLAGS; provided you only want to create statically linked executables, the situation is similar: adding -L/opt/gnu/packages/glibc-2.2.4/lib -llib would suffice. Using shared libraries is not that much more difficult with the exception of /lib/ld-linux.so.2, which is hard-coded into the executable... Finding shared libraries at runtime can be achieved by (a) setting LD_LIBRARY_PATH to contain the corresponding directories, or (b) setting LD_RUN_PATH at compile time. Many people don't like (b), because you define at build time where libraries have to be located on the actual target system at runtime; I don't have a problem with that because I _can_ control that aspect. To be clear here, _today_ I prefer to build (even my own very private software) everything as an RPM; hence I suggested build.rpm initially.
Another similar question- on my development system, I currently have libmysqlclient 0.15 installed - but the target system is still on 0.14. Preferably I would build my app such that it is linked against libmysqlclient.so without any version indication, but it seems to default to using the full name:
I doubt that this is possible unless you build libmysqlclient.so to not include any version number in its soname; but then it's impossible to have more than one version of a shared library installed and usable... HTH, cheers. l8er manfred