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> 2023 2024 2025 | 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> 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Help compiling synApps for linux-arm: opcua missing S7-1500-server.db |
From: | "Marco A. Barra Montevechi Filho via Tech-talk" <tech-talk at aps.anl.gov> |
To: | Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>, "Mooney, Tim M." <mooney at anl.gov>, SOL <sol at lnls.br>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Mon, 24 Oct 2022 22:23:42 +0000 |
Hello all.
We managed to cross-compile epics base correctly, thanks! We are now having trouble with the compilation of synApps simDetector... To compile EPICS_BASE we made an Ubuntu 16.04 container and installed the gnu-aarch64-linux cross-compiler. We then cloned EPICS_BASE from github and edited configure/CONFIG_SITE to add CROSS_COMPILER_TARGET_ARCHS=linux-aarch64, edited configure/os/CONFIG_SITE.linux_x86_64.linux-aarch64 to add GNU_TARGET = aarch64-linux-gnu and GNU_DIR = /usr. Compilation went fine.
file $EPICS_BASE/bin/linux-x86_64/cainfo prints
/usr/local/epics-nfs/base/R7.0.5//bin/linux-x86_64/cainfo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=92aff4a05d0dd04343edcaa31972c1520a94049f, not stripped In the screen and file $EPICS_BASE/bin/linux-aach64/cainfo prints /usr/local/epics-nfs/base/R7.0.5//bin/linux-aarch64/cainfo: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=f9463d78cf8668f1b0ba06f23e67a0bd5ddbea7a, not stripped in the screen as expected.
About synApps: i cloned it from the master branch in
https://github.com/EPICS-synApps/support.git. Inside assemble_synApps.sh i edited EPICS_BASE to point to the right location. It cloned all repositories and executed make release. I then realised I hadn't configured LD_LIBRARY_PATH and PATH to add $EPICS_BASE,
so i added $EPICS_BASE/bin/linux-aarch64 and $EPICS_BASE/bin/linux-x86_64 to PATH and $EPICS_BASE/lib/linux-x86_64 and $EPICS_BASE/lib/linux-aarch64 to LD_LIBRARY_PATH and did
make release again. Now, compiling with make resulted in error. I went directly to directory to see what was happening: cd /usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSimDetector/iocs/simDetectorNoIOC/simDetectorNoIOCApp/src make And I got: make -C O.linux-x86_64 -f ../Makefile TOP=../../.. \ T_A=linux-x86_64 install
make[1]: Entering directory '/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSimDetector/iocs/simDetectorNoIOC/simDetectorNoIOCApp/src/O.linux-x86_64'
make[1]: Nothing to be done for 'install'.
make[1]: Leaving directory '/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSimDetector/iocs/simDetectorNoIOC/simDetectorNoIOCApp/src/O.linux-x86_64'
make -C O.linux-aarch64 -f ../Makefile TOP=../../.. \
T_A=linux-aarch64 install
make[1]: Entering directory '/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSimDetector/iocs/simDetectorNoIOC/simDetectorNoIOCApp/src/O.linux-aarch64'
/usr/bin/aarch64-linux-gnu-g++ -o simDetectorNoIOCApp -Wl,-Bstatic -L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSimDetector/lib/linux-aarch64 -L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSimDetector/iocs/simDetectorNoIOC/lib/linux-aarch64
-L/usr/local/epics-nfs/base/R7.0.5/lib/linux-aarch64 -L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADCore/lib/linux-aarch64 -L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSupport/lib/linux-aarch64
-L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/asyn-R4-42/lib/linux-aarch64 -L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/autosave-R5-10-2/lib/linux-aarch64 -L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/busy-R1-7-3/lib/linux-aarch64
-L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/calc-R3-7-4/lib/linux-aarch64 -L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/iocStats-3-1-16/lib/linux-aarch64 -L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/seq-2-2-9/lib/linux-aarch64
-L/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/sscan-R2-11-5/lib/linux-aarch64 -Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSimDetector/lib/linux-aarch64 -Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSimDetector/iocs/simDetectorNoIOC/lib/linux-aarch64
-Wl,-rpath,/usr/local/epics-nfs/base/R7.0.5/lib/linux-aarch64 -Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADCore/lib/linux-aarch64 -Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSupport/lib/linux-aarch64
-Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/asyn-R4-42/lib/linux-aarch64 -Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/autosave-R5-10-2/lib/linux-aarch64 -Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/busy-R1-7-3/lib/linux-aarch64
-Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/calc-R3-7-4/lib/linux-aarch64 -Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/iocStats-3-1-16/lib/linux-aarch64 -Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/seq-2-2-9/lib/linux-aarch64
-Wl,-rpath,/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/sscan-R2-11-5/lib/linux-aarch64 -rdynamic -L/usr/aarch64-linux-gnu/lib simDetectorNoIOC.o -lsimDetector -lNDPlugin -lADBase -lqsrv -lntndArrayConverter -lnt -lpvDatabase
-lpvAccessIOC -lpvAccessCA -lpvAccess -lpvData -lnetCDF -lMagick++ -lcoders -lMagick -ljbig -ljp2 -lbzlib -lpng -lwebp -llcms -lttf -lwmf -lfilters -lnanohttp_stream -ltiff -lxml2 -lNeXus -lhdf5 -lhdf5_hl -lbitshuffle -lblosc -lszip -lzlib -ljpeg -lasyn -lautosave
-lbusy -lcalc -ldevIocStats -lsscan -lseq -lpv -ldbRecStd -ldbCore -lca -lCom -Wl,-Bdynamic -lX11 -lXext -lpthread -lm -lrt -ldl -lgcc
/usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/bin/ld: cannot find -lX11
/usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/bin/ld: cannot find -lXext
collect2: error: ld returned 1 exit status
/usr/local/epics-nfs/base/R7.0.5//configure/RULES_BUILD:226: recipe for target 'simDetectorNoIOCApp' failed
make[1]: *** [simDetectorNoIOCApp] Error 1
make[1]: Leaving directory '/usr/local/epics-nfs/modules/R7.0.5/support/synApps/support/areaDetector-R3-11/ADSimDetector/iocs/simDetectorNoIOC/simDetectorNoIOCApp/src/O.linux-aarch64'
/usr/local/epics-nfs/base/R7.0.5//configure/RULES_ARCHS:58: recipe for target 'install.linux-aarch64' failed
make: *** [install.linux-aarch64] Error 2
So it seems it understands that it needs to build for aarch64 but it cant find the right libraries. Should i add anything else (or less) to PATH or LD_LIBRARY_PATH?
I searched for something like libx11-aarch64-dev or similars but couldnt find anything for this distro/version. As always, thanks for the help. Marco From: Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>
Sent: 21 October 2022 09:09 To: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>; Mooney, Tim M. <mooney at anl.gov>; SOL <sol at lnls.br>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: RE: Help compiling synApps for linux-arm: opcua missing S7-1500-server.db Hi Marco,
I think you will need to have epics base compiled for both amd64 and linux-arm, though you only need amd64 executables for the build you will need the linux-arm versions of the epics base libraries created for synApps linux-arm to link against. If you set CROSS_COMPILER_TARGET_ARCHS=linux-arm in configure/CONFIG_SITE in base that should hopefully build both architectures automatically for you when you use EPICS_HOST_ARCH=linux-x64_64
Regards,
Freddie
From: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>
Hi, Akeroyd! Sorry for the late answer
From: Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>
Hi Marco,
How was the other EPICS base compiled – was that cross compiled? Does it have e.g. bin/linux-x86_64 as well as bin/linux-arm directories? I guess strictly you would only need as much of epics base compiled for amd64 to be able to run any necessary executables (e.g. msi) as part of the cross compile build – you will need all necessary libraries compiled for linux-arm to be able to cross-link applications. If the epics base was cross compiled for linux-arm on amd64 and has both these architectures in its bin directory, then I would have though setting your EPICS_HOST_ARCH to linux-x86_64 and pointing synApps at this EPICS base would then also pick up the epics base cross compile option and build synApps linux-arm for you too (as well as for x86_64).
Regards,
Freddie
From: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>
Thanks, Akeroyd! Im going to take a look at it. From: Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>
Hi,
I hadn’t noticed you were compiling for linux-arm on amd64, I think you’ll need to set CROSS_COMPILER_TARGET_ARCHS rather than EPICS_HOST_ARCH maybe something along the lines of https://epics-controls.org/resources-and-support/documents/howto-documents/cross-compile-epics-ioc-old-x86-linux/
Regards,
Freddie
From: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>
Hi, Freddie! make -C O.linux-arm -f ../Makefile TOP=../../.. \ T_A=linux-arm install make[1]: Entering directory '/usr/local/epics-nfs/modules/R7.0.5/synApps/R6.1/support/synApps/support/opcua-v0-9-3/exampleTop/DeviceDbApp/S7-1500Db/O.linux-arm' Inflating database from ../S7-1500-server.substitutions I. -I.. -I../O.Common -I../../../db -o S7-1500-server.db -S../S7-1500-server.substitutions make[1]: I.: Command not found make[1]: [/usr/local/epics-nfs/base/R7.0.5//configure/RULES.Db:477: ../O.Common/S7-1500-server.db] Error 127 (ignored) mv: cannot stat 'S7-1500-server.db': No such file or directory make[1]: *** [/usr/local/epics-nfs/base/R7.0.5//configure/RULES.Db:478: ../O.Common/S7-1500-server.db] Error 1 make[1]: Leaving directory '/usr/local/epics-nfs/modules/R7.0.5/synApps/R6.1/support/synApps/support/opcua-v0-9-3/exampleTop/DeviceDbApp/S7-1500Db/O.linux-arm' make: *** [/usr/local/epics-nfs/base/R7.0.5//configure/RULES_ARCHS:58: install.linux-arm] Error 2 From: Freddie Akeroyd - STFC UKRI <freddie.akeroyd at stfc.ac.uk>
Hi Marco,
I think Tim is correct that the msi command has not been found. A version of MSI is shipped with EPICS 7, if it is not being picked up you may be able to just add
MSI = $(MSI3_15)
To e.g. configure/CONFIG_SITE
Regards,
Freddie
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Mooney, Tim M. via Tech-talk
Hi Marco,
The tool that turns a .substitutions file into a .db file is MSI. I think that's what's not being found.
Tim Mooney (mooney at anl.gov) (630)252-5417 From: Tech-talk <tech-talk-bounces at aps.anl.gov>
on behalf of Marco A. Barra Montevechi Filho via Tech-talk <tech-talk at aps.anl.gov>
Hello all. Im compiling synApps with EPICS base R7.0.5 for linux-arm. The base has already been compiled for linux-arm here. (details about arm compilation at the end of e-mail). I got the synApps support from
https://github.com/EPICS-synApps/support. I then defined my EPICS_BASE to point to the right directory and EPICS_HOST_ARCH=linux-arm. I also added $EPICS_BASE/bin/linux-arm to
PATH and $EPICS_BASE/lib/linux-arm to LD_LIBRARY_PATH. I edited EPICS_BASE inside assemble_synApps.sh to point to the right location. make -C O.linux-arm -f ../Makefile TOP=../../.. \ T_A=linux-arm install make[1]: Entering directory '/usr/local/epics-nfs/modules/R7.0.5/synApps/R6.1/support/synApps/support/opcua-v0-9-3/exampleTop/DeviceDbApp/S7-1500Db/O.linux-arm' Inflating database from ../S7-1500-server.substitutions I. -I.. -I../O.Common -I../../../db -o S7-1500-server.db -S../S7-1500-server.substitutions make[1]: I.: Command not found make[1]: [/usr/local/epics-nfs/base/R7.0.5//configure/RULES.Db:477: ../O.Common/S7-1500-server.db] Error 127 (ignored) mv: cannot stat 'S7-1500-server.db': No such file or directory make[1]: *** [/usr/local/epics-nfs/base/R7.0.5//configure/RULES.Db:478: ../O.Common/S7-1500-server.db] Error 1 make[1]: Leaving directory '/usr/local/epics-nfs/modules/R7.0.5/synApps/R6.1/support/synApps/support/opcua-v0-9-3/exampleTop/DeviceDbApp/S7-1500Db/O.linux-arm' make: *** [/usr/local/epics-nfs/base/R7.0.5//configure/RULES_ARCHS:58: install.linux-arm] Error 2 2 things here make me curious: make[1]: I.: Command not found and mv: cannot stat 'S7-1500-server.db': No such file or directory
The "command not found" makes no sense to me at all. I tried following the Makefiles and includes to find where is the problematic command comming
from but i couldnt find it. Im not fluent in make so i might be missing something silly.
Obs: details about arm compilation
The IOCs from this base and synApps are going to run in an arm machine, but the compilation is being made in a container hosted in an amd machine. Inside the container, uname -a returns: Linux sol7-linux 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64 GNU/Linux
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente. Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately. This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. |