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  <20192020  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  <20192020 
<== Date ==> <== Thread ==>

Subject: Re: Fwd: cross-compiling (kind of) with Buildroot
From: "Johnson, Andrew N. via Tech-talk" <tech-talk@aps.anl.gov>
To: Pierrick M Hanlet <hanlet@fnal.gov>, "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Mon, 8 Jul 2019 17:12:21 +0000
On 7/8/19 11:39 AM, Pierrick M Hanlet wrote:
My problems stem from when the cross compiler attempts to build test or examples.  I first saw it
in seq (using 2.2.5) and then in asyn  (using 4-35).  The XXX.st and XXX.i files don't get copied to
O.linux-686 directory.  So for seq, I copied in by hand (using the syntax which worked for HOST)
all of the files in the list of TESTPROD_CROSS in ./seq/test/compiler/Makefile; the following attempt
to compile, the next failure came from the next file that wasn't explicitly in the TESTPROD_CROSS
list in the Makefile.

For asyn:
/usr/local/products/elsd/vmivme7805/linux-3.16.7_generic/output/host/usr/bin/i686-buildroot-linux-uclibc-gcc -x c -E  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -D_X86_  -DUNIX  -Dlinux   -I. -I../O.Common -I. -I.. -I../../../include/os/Linux -I../../../include -I/home/hanlet/platforms/vmivme7805/epicsDEV/base/include/os/Linux -I/home/hanlet/platforms/vmivme7805/epicsDEV/base/include       /usr/local/products/elsd/vmivme7805/linux-3.16.7_generic/output/staging/usr/include -I/usr/local/products/elsd/vmivme7805/linux-3.16.7_generic/output/host/usr/i686-buildroot-linux-uclibc/include ../array.st > array.i
cc1: fatal error: /usr/local/products/elsd/vmivme7805/linux-3.16.7_generic/output/staging/usr/include: No such file or directory
compilation terminated.
make[3]: *** [array.i] Error 1

This particular error is due to a missing -I in the preprocessor command-line. The cc1 command above is complaining that /usr/local/.../output/staging/usr/include is missing, although my guess is that it's a directory that does exist. However if you look carefully at the command line that path appears in the middle of the set of -I <path> options but doesn't itself have a -I in front of it.

Work out where in your Base target configuration you are providing that path (probably when setting a <something>_INCLUDES variable) and fix it. There are a couple of different ways we prepend the -I to include directory paths in the Base builds. In CONFIG.CrossCommon we use
    CROSS_INCLUDES = $(GNU_TARGET_INCLUDE_DIR:%=-I%)
while in other places where the source variable may have multiple paths in it we use a construct like this
    xxx_INCLUDES = $(addprefix -I, $(wildcard $(xxx_DIRS)))

Not sure whether this will fix all your problems, but it definitely needs resolving.

- Andrew

The build for seq did work when I commented out the test and examples in the ./seq/Makefile.

I hope that this is enough information, and again, thank you for your assistance.
Pierrick


On 7/8/19 11:14 AM, Johnson, Andrew N. wrote:
Hi Pierrick,

On 7/8/19 10:51 AM, Pierrick M Hanlet wrote:
Thanks again for your assistance earlier; I've successfully built base.
Great.

I've a new, but related problem which is to find the correct flags so that I
can build all of my support modules also.  I had hoped that the information
which you gave me for building base would have sufficed to allow me to
build my support modules, but alas, the build failed early on.  Are there any
generic flags from base CONFIG* files that will prevent me from having to
modify individual CONFIG* files in each support module?
Without know what modules you're building, how you're configuring them and seeing the actual build failures I can't be of much help. However you shouldn't normally have to add target-specific configuration files to your modules, all settings should be pulled from copy of Base that your module's configure/RELEASE file points to. However there might be gotcha's if you're trying to use a target-specific RELEASE file for instance.

For us to help we need more information about what you've done and what messages or errors you're seeing (and please copy/paste too much of the output rather than too little, it saves time in case you miss something that you don't realize is important, or we may be able to use some other build output to infer something else about your build that we need to know/check).

- Andrew
-- 
Complexity comes for free, Simplicity you have to work for.

-- 
Pierrick Hanlet
Fermi National Accelerator
Accelerator Front End Controls
+1-630-840-5555 -- lab
+1-312-687-4980 -- mobile

"Whether you think you can or think you can't, you're right" -- Henry Ford


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

Replies:
Re: Fwd: cross-compiling (kind of) with Buildroot Pierrick M Hanlet via Tech-talk
References:
cross-compiling (kind of) with Buildroot Pierrick M Hanlet via Tech-talk
Fwd: cross-compiling (kind of) with Buildroot Pierrick M Hanlet via Tech-talk
Re: Fwd: cross-compiling (kind of) with Buildroot Johnson, Andrew N. via Tech-talk
Re: Fwd: cross-compiling (kind of) with Buildroot Pierrick M Hanlet via Tech-talk
Re: Fwd: cross-compiling (kind of) with Buildroot Johnson, Andrew N. via Tech-talk
Re: Fwd: cross-compiling (kind of) with Buildroot Pierrick M Hanlet via Tech-talk
Re: Fwd: cross-compiling (kind of) with Buildroot Johnson, Andrew N. via Tech-talk
Re: Fwd: cross-compiling (kind of) with Buildroot Pierrick M Hanlet via Tech-talk
Re: Fwd: cross-compiling (kind of) with Buildroot Johnson, Andrew N. via Tech-talk
Re: Fwd: cross-compiling (kind of) with Buildroot Pierrick M Hanlet via Tech-talk

Navigate by Date:
Prev: Re: Problems with stream device 2.8.8 Johnson, Andrew N. via Tech-talk
Next: RE: Problems with stream device 2.8.8 Mark Rivers 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  <20192020 
Navigate by Thread:
Prev: Re: Fwd: cross-compiling (kind of) with Buildroot Pierrick M Hanlet via Tech-talk
Next: Re: Fwd: cross-compiling (kind of) with Buildroot Pierrick M Hanlet 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  <20192020 
ANJ, 08 Jul 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·