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  2020  2021  2022  <20232024  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  2020  2021  2022  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: Cross Compilation of Epics-base
From: Han Lee via Tech-talk <tech-talk at aps.anl.gov>
To: Navani Srivastava <nsrivastava at bridge12.com>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Tue, 17 Oct 2023 09:09:46 -0700
Hi Navani,

Please check the following three files,


HTH,
Han

On Tue, Oct 17, 2023 at 6:15 AM Navani Srivastava via Tech-talk <tech-talk at aps.anl.gov> wrote:
Hi Andrew,

I appreciate your email and detailed information. It helped a lot. 

I am building epic-base for Jetson Xavier NX Development kit (aarch64 architecture) on x86_64 linux ubuntu machine. I have created cross toolchain i.e. SDK through poky/yocto development system and looking forward to releasing an open-source support for epics-base with yocto.

I have attached the changes I did in patch file and with those changes, "make" was successful on executing from configure directory. I was able to get "O.linux-aarch64", "O.linux-x86_64" and "O.Common" directories generated.

My compilation failed in the base directory with below stated error- 


make -C O.linux-aarch64 -f ../Makefile TOP=../../../.. \
    T_A=linux-aarch64 install
make[4]: Entering directory '/home/nsrivastava/epics-base/modules/libcom/src/O.linux-aarch64'
/opt/poky/4.0.12/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/bin/aarch64-poky-linux-g++  -D_GNU_SOURCE -D_DEFAULT_SOURCE           -DUNIX  -Dlinux      -O3   -Wall             -fPIC -I. -I../O.Common -I. -I../osi/compiler/gcc -I../osi/compiler/default -I. -I../osi/os/Linux -I../osi/os/posix -I../osi/os/default -I.. -I../as -I../bucketLib -I../calc -I../cvtFast -I../cppStd -I../cxxTemplates -I../dbmf -I../ellLib -I../env -I../error -I../fdmgr -I../flex -I../freeList -I../gpHash -I../iocsh -I../log -I../macLib -I../misc -I../osi -I../pool -I../ring -I../taskwd -I../timer -I../yacc -I../yacc -I../yajl -I../../../../include/compiler/gcc -I../../../../include/os/Linux -I../../../../include         -MM -MF timerQueuePassive.d  ../timer/timerQueuePassive.cpp
In file included from ../timer/timerPrivate.h:21,
                 from ../timer/timerQueuePassive.cpp:26:
../cxxTemplates/tsFreeList.h:66:10: fatal error: string.h: No such file or directory

This should be resolved if I am able to give sysroot directory for the needed header files. Can you please guide me on the right file to include sysroot changes for aarch64 architecture? Thank you. Appreciate your help!

Regards
nsrivastava

From: Johnson, Andrew N. <anj at anl.gov>
Sent: Saturday, October 14, 2023 7:20 PM
To: nsrivastava <nsrivastava at bridge12.com>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: Cross Compilation of Epics-base
 

Hi,

 

I haven't seen any replies to your question here yet. I know many of our core developers have been at the ICALEPCS-2023 conference, and I'm on vacation this week and next, so my apologies if you're still waiting for help.

 

Unfortunately we don't have detailed documentation that answers your question (I agree that we should), but the majority of the configuration needed to set up your cross-builds may have already been done. You haven’t said what your host architecture is, I hope it's Linux on 32- or 64-bit x86 or amd64, and that your target will be running under Linux.

 

Assuming those are correct you would start by editing the file base-7.0.7/configure/os/CONFIG_SITE.linux-x86.linux-arm and change the GNU_DIR variable there to point to the prefix of where your cross-compiler has been installed — the EPICS build system looks in $(GNU_DIR)/bin for the cross-compiler.

 

Then edit the base-7.0.7/configure/CONFIG_SITE file and set CROSS_COMPILER_TARGET_ARCHS to linux-arm. You don't need to make any other changes in those files for now.

 

With those settings you can try running "make" in the base-7.0.7/configure directory. That should create the directories O.linux-x86_64 and O.linux-arm, and inside each of those it will try to run the C Preprocessor for that target. If you don't see the build in the O.linux-arm directory running your cross-compiler's preprocessor you will have to make some additional configuration changes, but you should copy the command-line it runs and any errors you get into a post to this mailing list for help at that stage.

 

If it did the right thing, cd to the base-7.0.7 directory and run "make" from there to see how far the build gets. Again if you see errors please copy & paste them into an email here (don't paste a screen-dump image, text only).

 

The more detail about your configuration and the errors you're seeing that you send to this list, the easier it will be for us to help.

 

- Andrew

 

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of nsrivastava via Tech-talk <tech-talk at aps.anl.gov>
Date: Tuesday, October 10, 2023 at 2:50 AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Cross Compilation of Epics-base

I have created a cross toolchain using Yocto (Kirkstone branch) for Nvidia Jetson Xavier NX development kit. I am trying to compile epics-base-7.0.7 version (https://epics.anl.gov/download/base/base-7.0.7.tar.gz) using the cross toolchain for arm architecture.

 

I am unable to find any clear instruction to cross compile epic 7.0.7 for any other architecture. It would be helpful to guide me through the link to document or any related information. Thank you

 

Regards

NSrivastava

 

 

**********************************************

Bridge12 Technologies, Inc.

11 Michigan Drive Ste 2

Natick, MA 01760, USA


Web: http://www.bridge12.com

**********************************************

This email and any files transmitted with it
are company confidential, meant for the sole
use of the intended recipient. Any use or
dissemination of this email by others is strictly
prohibited. If you are not the intended recipient,

please contact the sender immediately.


**********************************************
Bridge12 Technologies, Inc.
11 Michigan Drive Ste 2
Natick, MA 01760, USA

Web: http://www.bridge12.com
**********************************************
This email and any files transmitted with it
are company confidential, meant for the sole
use of the intended recipient. Any use or
dissemination of this email by others is strictly
prohibited. If you are not the intended recipient,
please contact the sender immediately.


--
Jeong Han Lee, Dr.rer.nat.
Staff Scientist and Engineer
Cell: +1 510 384 3868

Replies:
Re: Cross Compilation of Epics-base Navani Srivastava via Tech-talk
References:
Cross Compilation of Epics-base nsrivastava via Tech-talk
Re: Cross Compilation of Epics-base Johnson, Andrew N. via Tech-talk
Re: Cross Compilation of Epics-base Navani Srivastava via Tech-talk

Navigate by Date:
Prev: Re: [EXTERNAL] Re: PVA connection problem Kasemir, Kay via Tech-talk
Next: Re: Cross Compilation of Epics-base Navani Srivastava 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  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: Re: Cross Compilation of Epics-base Navani Srivastava via Tech-talk
Next: Re: Cross Compilation of Epics-base Navani Srivastava 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  2020  2021  2022  <20232024 
ANJ, 17 Oct 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·