EPICS Home

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

Subject: EPICS cross compile with buildroot problems
From: Tom Slejko <[email protected]>
To: [email protected]
Date: Mon, 03 Jun 2013 11:00:36 +0200 (CEST)
Hi all, 

I have been integrating EPICS base, as well some modules and extensions into buildroot (buildroot.uclibc.org), but I am having some problems since EPICS cross-compilation build system is a bit above my understanding. Note that for us, even if we are building x86 target on x86 host we need to cross-compile since we are linking against uClibc on the target and not glibc.

My current approach is the following;

-detect buildroot target arch

Depending on buildroot target arch a script makes a copy of the closest architecture (lets assume that target arch is linux-x86), creates apropriate CONFIG_SITE.Common.xxx file and sets the correct GNU_DIR and CMPLR_PREFIX and CMPLR_SUFFIX variables.

-cp COMMON.Common.linux-x86 COMMON.Common.linux-buildroot
-touch COMMON_SITE.Common.linux-buildroot 
-fix COMMON_SITE.Common.linux-buildroot

and finally fix the main CONFIG_SITE and set CROSS_COMPILER_TARGET_ARCHS=linux-buildroot to include linux-buildroot. 

The base and modules (asyn, sequencer,..) now build fine and run as expected, on both host and target machines. 

But here comes the problem; some application require some external libraries, for example a device userspace library. If this library is available for both host and target, there is no problem, however if it is only available for TARGET than we can not build our application, since the build system always insists on building the EPICS_HOST_ARCH architecture first. So even if I run "make build.linux-buildroot" the build system will first try to build the linux-x86_64 which will fail since the required library is not available. I tried completely disabling building EPICS_HOST_ARCH in CONFIG_COMMON, but that simply results in an: No rule to make linux-x86_64 needed by linux-buildroot error. 

Why is EPICS_HOST_ARCH a dependency for CROSS_TARGET? Have I missed something? After all our cross-target also compiles whole base system, so there shouldn't be any need for building host binaries within the app. How should I tackle this problem? I know I must be missing something, but I am just not sure what... 


Thanks in advance, 

Tom Slejko


Replies:
RE: EPICS cross compile with buildroot problems Hu, Yong
Re: EPICS cross compile with buildroot problems Andrew Johnson

Navigate by Date:
Prev: RE: IP330 modules question Geon-Yeong Mun
Next: RE: IP330 modules question Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: IP330 modules question Mark Rivers
Next: RE: EPICS cross compile with buildroot problems Hu, Yong
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024