EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Base R3.14.11-pre1 available for testing
From: "Abbott, MG (Michael)" <[email protected]>
To: "Andrew Johnson" <[email protected]>, <[email protected]>
Date: Fri, 31 Jul 2009 19:56:10 +0100
(I'm very sorry that quoting is messed up below.  Unfortunately I'm still stuck with Outlook for e-mail from work, which seems to deliberately break all mailing conventions.  I'll try a different mailer next time.)

From: Andrew Johnson [mailto:[email protected]] 
> On Thursday 30 July 2009 06:02:50 Abbott, MG (Michael) wrote:
> >
> > This patch is rather important.  The line removed by this 
> patch has a
> > very strange effect: it adds makefile rules of the form
> >
> > 	$(action).$(arch): $(action).$(EPICS_HOST_ARCH)
> >
> > specifically, it adds the rule
> >
> > 	install.linux-arm: install.linux-x86
> >
> > to my build. 
> 
> This rule was added because when using the -j option to 
> enable parallel builds 
> we have to make sure that any host programs have finished 
> compiling before we 
> can start compiling objects for the targets, since we might 
> have to run those 
> host programs when building the target code.  Unfortunately 
> in the current 
> versions of GNUmake it is not possible to detect that the -j 
> option has been 
> supplied (unlike most other make options which *can* be 
> detected).  If we 
> could detect the -j option we would be able to make that rule 
> conditional, 
> but we can't.  Even if we could though, your application 
> wouldn't be able to 
> take advantage of the make -j option, so this isn't really be 
> a proper 
> solution anyway.
> 
> > The effect of this rule is that in order to build my 
> > linux-arm IOC, I have to first build a linux-x86 version of 
> the IOC, and
> > more generally, all cross-compiled IOCs depend on having a 
> native IOC
> > build succeed first.  This isn't going to work.
> 
> Each EPICS architecture declares whether it can build Host or 
> Ioc targets or 
> both by setting VALID_BUILDS in its 
> base/configure/CONFIG.Common.<arch> file.  
> Host targets are those named in the Makefile variables 
> PROD_HOST and similar, 
> while Ioc targets are those named in in PROD_IOC etc.
> 
> You can limit what gets built for specific OS classes by 
> using PROD_IOC_Linux, 
> but that doesn't help you since both your host and target are 
> in that same OS 
> class.
> 
> If your application can't be built on linux-x86 then one 
> solution would be to 
> create a new linux-x86-host architecture which defines 
> VALID_BUILDS=Host 
> only, and use that for hosting cross-builds for your 
> linux-arm applications.
> 
> However if it's only a few applications it will be much 
> simpler to override 
> VALID_BUILDS in those applications; in each one you would 
> create a new file 
> configure/CONFIG_SITE.Common.linux-x86 that sets 
> VALID_BUILDS=Host and hence 
> stops the build system from trying to build any Ioc code on 
> linux-x86 inside 
> that application.
> 
> You will of course need to make sure that your Makefiles 
> properly set the 
> PROD_IOC and LIBRARY_IOC variables rather than PROD and 
> LIBRARY.  You can 
> still build linux-x86 code if needed by using PROD or 
> PROD_HOST instead.
> 
> This change will also mean that you no longer have specify 
> 'make linux-arm' 
> every time (which I guess is what you've been doing), you can just 
> run 'make'.

Well. 

Actually, I just use `make` to build, but I specify my list of valid BUILD_ARCH targets in configure/CONFIG.

Sorry, just going on holiday for a week, so don't have time to respond properly to your solution.

Have to say I don't like it, think you've broken the make system.  Not being able to specify target builds is really not clever, and at first glance your workarounds sound very cumbersome -- but I'll have a proper look week after next.  Do you have time to look at my build: http://controls.diamond.ac.uk/downloads/libera ?  I've tried to make the configure and Makefiles as clear and simple as I can, but the EPICS build is always full of mysteries for me.

 
> > Patching CONFIG.Common.linux-arm.  This patch is arguable, 
> but I'm not
> > sure that such target specific architecture flags belong in 
> EPICS base.
> > The line removed by this patch crept into 3.14.10, and 
> breaks the Libera
> > build.
> 
> This change was contributed by Heinrich du Toit who is no 
> longer working with 
> EPICS anyway.  I have reverted it.
> 
> 
> Thanks for testing this.
> 
> - Andrew
> -- 
> The best FOSS code is written to be read by other humans -- 
> Harold Welte
> 
--
Sorry about the nonsense below.  Think I'll mail from home next time.
-- 
Scanned by iCritical.


Replies:
Re: Base R3.14.11-pre1 available for testing Andrew Johnson
References:
Re: Base R3.14.11-pre1 available for testing Andrew Johnson

Navigate by Date:
Prev: Re: Base R3.14.11-pre1 available for testing Andrew Johnson
Next: Re: Base R3.14.11-pre1 available for testing Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Base R3.14.11-pre1 available for testing Andrew Johnson
Next: Re: Base R3.14.11-pre1 available for testing Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·