Experimental Physics and
| |||||||||||||||||
|
I was wondering if anyone can suggest an approach for building EPICS on multiple linux distributions (which may have different kernel versions, compiler versions, etc.) Hi John, We build EPICS on multiple Linux versions, e.g Scientific Linux 3 and Scientific Linux 5. I have defined new architectures as you suggested. I used the names SL3-x86 and SL5-x86. The advantage of this approach is that different architectures are installed into different sub-directories. So code cannot get mixed up even if it is on a network drive. I have created the configure files CONFIG.Common.SL3-x86, CONFIG.SL3-x86.Common, CONFIG.SL3-x86.SL3-x86, and CONFIG_SITE.SL3-x86.Common which basically just include their "linux-x86" analogon: > cat CONFIG.Common.SL3-x86 # Include definitions common to linux targets include $(CONFIG)/os/CONFIG.Common.linux-x86 > cat CONFIG.SL3-x86.Common #CONFIG.$(EPICS_HOST_ARCH).Common is required by build system #Include definitions common to linux hosts include $(CONFIG)/os/CONFIG.linux-x86.Common > cat CONFIG.SL3-x86.SL3-x86 # Include common linux definitions include $(CONFIG)/os/CONFIG.linux-x86.linux-x86 > cat CONFIG_SITE.SL3-x86.Common include $(CONFIG)/os/CONFIG_SITE.linux-x86.Common The same for all other Linux architectures. Don't forget to set EPICS_HOST_ARCH everywhere correctly so that EPICS Makefiles build the correct code. We set it for each system in a script in /etc/profile.d/. I have very good experiences with this approach. Unfortunately, I did not succeed to "cross compile" e.g. SL3 on a SL5 host. That means every code has to be compiled separately on each operating system version. Andrew mentioned that a different kernel does not require to rebuild the application code. But often a new Linux version comes with a new compiler version. And gcc tends to change things (especially C++) between versions. (Even with the same major release). I can run SL3 compiled code on SL5 but running SL5 compiled code on SL3 crashes with a floating point exception. So it is safest to compile separately whenever gcc and/or glibc versions change. Best regards, Dirk
| ||||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |