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>
Sent: 21 October 2022 12:32
To: Akeroyd, Freddie (STFC,RAL,ISIS) <freddie.akeroyd at stfc.ac.uk>; Mooney, Tim M. <mooney at anl.gov>; SOL <sol at lnls.br>; tech-talk at aps.anl.gov
Subject: Re: Help compiling synApps for linux-arm: opcua missing S7-1500-server.db
Hi, Akeroyd! Sorry for the late answer
I thought i had cross-compiled it but i clearly made some mistake because there is a folder $EPICS_BASE/bin/linux-arm but when i cd into it and do `file cainfo` i get: "cainfo: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter
/lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=d2cd53a92925e14041b68e4a5e804d0f772aef27, not stripped" so that is clearly not arm.
Im going to do the following:
1 - Decompile EPICS_BASE and recompile it with the right paths, only for amd;
2 - Build the toolchain;
3 - Compile the arm version of synApps.
Thanks for the help. Also, i noticed that the crostool-ng installation tutorial on
https://epics-controls.org/resources-and-support/documents/howto-documents/cross-compile-epics-ioc-old-x86-linux/ is deprecated and results in an infinite compilation loop. If thats useful for anyone in the future, i found this installation guide which
seems to be working for me:
https://crosstool-ng.github.io/docs/install/#clone
Thanks for the help, I will report any interesting info if things go right.
Marco
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
Thanks, Akeroyd! Im going to take a look at it.
Can i consider that my EPICS base compilation is not right then?
In the link you showed me its written: "I’m also assuming you already have EPICS base downloaded and compiled"
The compiled EPICS here is compiled in the target architecture or the host? In other words: do i need to compile my EPICS base using this toolchain or can i use my current one, supposing ts compiled for amd architecture?
Regards,
Marco
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
Hi, Freddie!
I tried adding it to configure/CONFIG_SITE inside opcua-v0-9-3 but it still doesnt work:
opcua-v0-9-3/exampleTop/DeviceDbApp/S7-1500Db# make
make -C O.linux-arm -f ../Makefile TOP=../../.. \
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
Should it be in cnofigure/CONFIG_SITE of synApps?
Thanks,
Marco
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
The tool that turns a .substitutions file into a .db file is MSI. I think that's what's not being found.
MSI: Macro Substitution and Include Tool. MSI is a general purpose macro substitution/include tool. It accepts as input an ascii template file. Documentation
|
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.
In the compilation process i needed to install libnet-dev, libpcap0.8-dev and libusb-dev, all without trouble.
Now, inside synApps/support/opcua-v0-9-3/exampleTop/DeviceDbApp/S7-1500Db, when i run make i get the following error message:
/usr/local/epics-nfs/modules/R7.0.5/synApps/R6.1/support/synApps/support/opcua-v0-9-3/exampleTop/DeviceDbApp/S7-1500Db# make
make -C O.linux-arm -f ../Makefile TOP=../../.. \
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.
The 'S7-1500-server.db': No such file or directory makes more sense to me: after cd into the opcua-v0-9-3 module and doing ´find -iname S7-1500-server.db´ i find nothing. I also find nothing with this name below EPICS base. Am i misunderstanding something or
is this .db file actually missing?
Im compilng synApps just to get AreaDetector anyway, so i suppose i can just comment out opcua from my support/configure/RELEASE?
Thanks for any help,
Marco
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
but i configured EPICS_HOST_ARCH=linux-arm
The base compiled with no problem.
I did this because we have a few arm machines in here and their EPICS_HOST_ARCH was defined this way. Am i forgetting anything important? Should just defining this env var make the compilation work for arm even if the host is amd?
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.
|