You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 4
Next »
Debugging, trying to see if can get epics installed in a container
Installation on Linux / MacOS — EPICS Documentation documentation (epics-controls.org)
TODO: patrick try installing it yourself and see if you can move the .so and build with epics
- You need /lib, /include, and /bin.
- 1) Keep everything in the epics/ folder, but copy the folder over, then update $LD_LIBRARY_PATH(lib), $PATH(bin), $CPATH(include)?
- cp -r /mnt/eed/ad-build/registry/epics-base/R7.0.8/rocky9/epics-base/ /build/
# If this works add to .bashrc because this'll be dev image
export EPICS_BASE=/build/epics-base
export EPICS_HOST_ARCH=$(${EPICS_BASE}/startup/EpicsHostArch)
export PATH=${EPICS_BASE}/bin/${EPICS_HOST_ARCH}:${PATH}
Works for binaries, need to try building simple ioc with it.
mkdir -p /build/testIoc
cd /build/testIoc
makeBaseApp.pl -t example testIoc
makeBaseApp.pl -i -t example testIoc
make
cd iocBoot/ioctestIoc
chmod u+x st.cmd
./st.cmd
Building works, and can run the ioc.
[root@ad-build-container-rocky9-544f5787dc-gl4sq ioctestIoc]# pwd
/build/testIoc/iocBoot/ioctestIoc
[root@ad-build-container-rocky9-544f5787dc-gl4sq ioctestIoc]# ls
Makefile README envPaths st.cmd
[root@ad-build-container-rocky9-544f5787dc-gl4sq ioctestIoc]# ./st.cmd
#!../../bin/linux-x86_64/testIoc
< envPaths
epicsEnvSet("IOC","ioctestIoc")
epicsEnvSet("TOP","/build/testIoc")
epicsEnvSet("EPICS_BASE","/build/epics-base")
cd "/build/testIoc"
## Register all support components
dbLoadDatabase "dbd/testIoc.dbd"
testIoc_registerRecordDeviceDriver pdbbase
## Load record instances
dbLoadTemplate "db/user.substitutions"
dbLoadRecords "db/testIocVersion.db", "user=root"
dbLoadRecords "db/dbSubExample.db", "user=root"
cd "/build/testIoc/iocBoot/ioctestIoc"
iocInit
Starting iocInit
############################################################################
## EPICS R7.0.8
## Rev. R7.0.8
## Rev. Date Git: 2023-12-14 16:42:10 -0600
############################################################################
cas WARNING: Configured TCP port was unavailable.
cas WARNING: Using dynamically assigned TCP port 37587,
cas WARNING: but now two or more servers share the same UDP port.
cas WARNING: Depending on your IP kernel this server may not be
cas WARNING: reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)
iocRun: All initialization complete
## Start any sequence programs
#seq sncExample, "user=root"
epics> ^C
[root@ad-build-container-rocky9-544f5787dc-gl4sq ioctestIoc]#
- Now need to try asyn as that would need 'include' statements of epics. After this then we can conclude epics can be built/ran in a container, although still unclear if can access s3df pvs?
- git clone --depth 1 --branch R4-39 https://github.com/epics-modules/asyn.git
- mkdir /build/support/
- cp -r /mnt/eed/ad-build/registry/asyn/R4.39-1.0.1/rocky9/asyn/ /build/support/
- export LD_LIBRARY_PATH=/build/epics-base/lib/linux-x86_64
- Update asyn/configure/RELEASE
- Change EPICS_BASE to point to your epics base =/build/epics-base
- Change SUPPORT to point to your support folder = /build/support
- Comment out IPAC and SNCSEQ
- if get xdr.* missing error, then uncomment TIRPC in configure/CONFIG_SITE
dnf --enablerepo=crb install libtirpc-devel
# -devel is important, its (developer) and gives header files in /usr/include/rpc
- yum install -y rpcgen
- Patrick left off here, still gives error. How about try these options
- Get the prebuilt one from afs, and upload to ad-build-test github, and download in registry and use that
- Get test-ioc to have the basic ioc in there.
- How would channel access work if epics is in container? Can it be accessed from main server?
- 2) Or try moving everything (/include (.h), /lib (.so/.a), and /bin (binaries)) to according directories