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: anyone ever crosscompile pvaPy?
From: "Veseli, Sinisa via Tech-talk" <tech-talk at aps.anl.gov>
To: "Peter.Milne at d-tacq.com" <Peter.Milne at d-tacq.com>, "Johnson, Andrew N." <anj at anl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Fri, 22 May 2020 18:46:57 +0000
Hi,

On 5/22/20 12:10 PM, Peter Milne wrote:
> Hi Andrew
>
> On 22/05/2020 16:27, Johnson, Andrew N. wrote:
>> Hi Peter,
>>
>> On May 22, 2020, at 3:23 AM, Peter Milne via Tech-talk 
>> <tech-talk at aps.anl.gov<mailto:tech-talk at aps.anl.gov>> wrote:
>>
>> We have a requirement to run pvaPy on a linux-arm system.
>> The ARM system is configured to provide a full EPICS7, Boost lib.
>>
>> Following
>> https://github.com/epics-base/pvaPy/blob/master/README.md
>>
>> Custom Build:
>>
>> Seems to build fine for EPICS_HOST_ARCH=linux-x86_64
>>
>> It's also putting in hooks for linux-arm:
>> ls ./src/pvaccess/O.linux-arm
>> Makefile
>>
> ...
>> pgm TOP ../../.. T_A linux-arm
>> make[3]: Nothing to be done for 'install'.
>> make[3]: Leaving directory 
>> '/home/pgm/PROJECTS/EPICS/pvaPy/src/pvaccess/O.linux-arm'
>> make[2]: Leaving directory '/home/pgm/PROJECTS/EPICS/pvaPy/src/pvaccess'
>> make[1]: Leaving directory '/home/pgm/PROJECTS/EPICS/pvaPy/src'
>>
>>
>> .... does nothing..
>>
>>
>> Is there any way to enable a cross-compile?
>> I don't see any PROD_HOST entries that could be changed to PROD, for 
>> example.
>>
>>
>> The important entry in src/pvaccess/Makefile is the line
>>
>> LOADABLE_LIBRARY_HOST += pvaccess
>>
>> Since pvaPy is a dynamic library that gets loaded by Python, there 
>> are no binaries to create so no use of the PROD or PROD_HOST 
>> variables in the Makefile. Change the above to LOADABLE_LIBRARY and 
>> it should start cross-compiling for your target.
>>
> Yes, that's it!. Thank you. And, really generically the same idea as
> PROD_HOST, should have spotted that.
>
> So, the good news, it's trying to build.
> The bad news, there are errors, maybe just one:
>
> /usr/include/python3.7m/pyconfig.h:4:10: fatal error: pyconfig-32.h:
>
> So the next step is to get it to look at the linux-arm version of the 
> python headers rather than the HOST version..
>
> ... and that suddenly becomes really site-specific..
>
>
The build looks into configure/CONFIG_SITE.local file to determine any 
site specific settings, which might also include a custom python build.

Specifically, variables that can be modified are PVA_PY_CPPFLAGS and 
PVA_PY_LDFLAGS. In one of my builds I have the following:

bluegill2> more configure/CONFIG_SITE.local
PVA_PY_CPPFLAGS = -I/local/sveseli/MARTY/CONDA/include/python3.7m 
-I/local/sveseli/MARTY/opt/boost-python-1.70.0/include
PVA_PY_LDFLAGS = -L/local/sveseli/MARTY/CONDA/lib 
-L/local/sveseli/MARTY/opt/boost-python-1.70.0/lib/linux-x86_64 -lpython3.7m
PVA_PY_SYS_LIBS = boost_python37  boost_numpy37
PVA_API_VERSION = 482
PVA_RPC_API_VERSION = 482
HAVE_BOOST_NUM_PY = 0
HAVE_BOOST_PYTHON_NUM_PY = 1
PYTHON_VERSION = 3.7
PVA_PY_PYTHON = /local/sveseli/MARTY/CONDA/bin/python3
PVA_PY_PYTHONPATH = 
/local/sveseli/MARTY/pvapy-sv/lib/python/3.7/linux-x86_64
PVA_PY_LD_LIBRARY_PATH = 
/local/sveseli/MARTY/CONDA/lib:/local/sveseli/MARTY/opt/boost-python-1.70.0/lib/linux-x86_64
PVA_PY_SPHINX_BUILD = /local/sveseli/MARTY/CONDA/bin/sphinx-build
PVA_PY_EPICS_BASE = /local/sveseli/MARTY/opt/epics-7.0.3.1
PVA_PY_EPICS4_DIR = /local/sveseli/MARTY/opt/epics-7.0.3.1
PVA_PY_HOST_ARCH = linux-x86_64
PVA_PY_SETUP_SH = 
/local/sveseli/MARTY/pvapy-sv/bin/linux-x86_64/pvapy_setup_full.3.7.sh

Automatic configuration should work for the host architecture that you 
are building on, but at the moment it will likely not work for 
cross-compiles.
>
>
>> Hopefully you and Sinisa can work out some way to adjust the build so 
>> cross-builds like this can be configured more easily, but I suspect 
>> it may always need some kind of manual configuration to enable it.
>
> .. as confirmed above.
>
> Should be possible to make a configure/ option of course..
>
> Thanks again Andrew
>
> Cheers
>
>
I talked to Andrew about making this easier.

Sinisa


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


Replies:
Re: anyone ever crosscompile pvaPy? Peter Milne via Tech-talk
References:
anyone ever crosscompile pvaPy? Peter Milne via Tech-talk
Re: anyone ever crosscompile pvaPy? Johnson, Andrew N. via Tech-talk
Re: anyone ever crosscompile pvaPy? Peter Milne via Tech-talk

Navigate by Date:
Prev: Re: anyone ever crosscompile pvaPy? Peter Milne via Tech-talk
Next: Reminder: Codeathon Survey Johnson, Andrew N. 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: Re: anyone ever crosscompile pvaPy? Peter Milne via Tech-talk
Next: Re: anyone ever crosscompile pvaPy? Peter Milne 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, 23 May 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·