EPICS Controls 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  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Cross compiling for non-$EPICS_HOST_ARCH targets
From: "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov>
To: Rod Nussbaumer <bomr at triumf.ca>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Tue, 7 Apr 2020 20:27:34 +0000
Hi Rod,

On Apr 7, 2020, at 12:35 PM, R Nussbaumer via Tech-talk <tech-talk at aps.anl.gov> wrote:

When I try to build IOC applications, I wan the build system to NOT build for the EPICS_HOST_ARCH target platform, as it will always fail due to not having the accordant libraries. In the R3.14.12 (my present EPICS version) Application Developer's Guide, it gives an example of what I think is supposed to work, but it doesn't seem to, for me:

PROD_IOC = aaa
VX_PROD_vxWorks-68040 = bbb
VX_PROD_vxWorks-ppc603 = bbb
PROD_IOC += $(VX_PROD_$(T_A))

That example looks right to me, aaa will be built for all targets, but bbb only for the two VxWorks ones.

So, editing my own src/Makefile:

IOCNAME = qwertyAsynPortDriver
LINUXARM_PROD_linux-arm = $(IOCNAME)
  # This builds for linux-x86_64 & linux-arm
# PROD_IOC = $(IOCNAME)
# This only builds a DBD file
PROD_IOC += $(LINUXARM_PROD_$(TA_A))

Unless it’s a transcription error in your email there’s a typo in the last line above; you’re using a variable named TA_A instead of T_A.

GNUmake does have a flag --warn-undefined-variables but our build system relies on these a lot, so setting it wouldn’t have helped you find that typo.

In my base/configure/CONFIG_SITE and in the IOC $(TOP)/configure/CONFIG I have:

CROSS_COMPILER_TARGET_ARCHS=linux-arm

Your IOC application may not need to set that for itself as it inherits the setting from Base anyway. If you’re actually building Base for other cross-targets too and you only want this one for this application that’s fine, but I generally try to avoid overriding the cross-architectures here myself. If you later add another IOC to this application that needs a different target you then have to remember to edit this setting, and possibly also adjust any Makefiles where you forgot to limit which targets to build for.

What other magical incantations are required to build for the ARM target platform only?

I think the typo explains the failure to build that you’re describing.

When (if?) I get this sorted out, I will try to prepare some instructions for the Wiki, where it talks about cross compiling, but doesn't go into this specific scenario.

We’re in the process of moving away from the Wiki to a new set of documentation on the epics-controls.org website and its docs.epics-controls.org companion (which is hosted by read-the-docs and populated from GitHub). See this email and others in that thread from earlier this week. I’m not sure which wiki page you were suggesting or whether we’ve already moved that to the new website, but it would be more helpful to contribute there at this point if possible.

HTH, and thanks.

Hey Ralph & Timo, in case you aren’t already working on it, we probably need a How-to on contributing to the How-to’s that we can point potential contributors to...

- Andrew

-- 
Complexity comes for free, simplicity you have to work for.


Replies:
Re: Cross compiling for non-$EPICS_HOST_ARCH targets Ralph Lange via Tech-talk
References:
Cross compiling for non-$EPICS_HOST_ARCH targets R Nussbaumer via Tech-talk

Navigate by Date:
Prev: Cross compiling for non-$EPICS_HOST_ARCH targets R Nussbaumer via Tech-talk
Next: Re: Cross compiling for non-$EPICS_HOST_ARCH targets Ralph Lange via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Cross compiling for non-$EPICS_HOST_ARCH targets R Nussbaumer via Tech-talk
Next: Re: Cross compiling for non-$EPICS_HOST_ARCH targets Ralph Lange via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 07 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·