Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: Building EPICS for multiple Linux distributions
From: Dirk Zimoch <dirk.zimoch@psi.ch>
To: John Dobbins <john.dobbins@cornell.edu>
Cc: EPICS Tech-Talk <tech-talk@aps.anl.gov>
Date: Thu, 11 Mar 2010 17:43:50 +0100
John Dobbins wrote:
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.)

Does one define new architectures linux-x86-distribution_a linux-x86-distribution_b?

John Dobbins
Lab for Elementary Particle Physics
Cornell University


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


Replies:
Re: Building EPICS for multiple Linux distributions Rod Nussbaumer
References:
Building EPICS for multiple Linux distributions John Dobbins

Navigate by Date:
Prev: RE: IP asyn timeout connection Mark Rivers
Next: Re: 2 MAXv problems Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: Building EPICS for multiple Linux distributions Steven M. Hartman
Next: Re: Building EPICS for multiple Linux distributions Rod Nussbaumer
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·