Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. You need /lib, /include, and /bin.
    1. 1) Keep everything in the epics/ folder, but copy the folder over, then update $LD_LIBRARY_PATH(lib), $PATH(bin),  $CPATH(include)?
      1. cp -r /mnt/eed/ad-build/registry/epics-base/R7.0.8/rocky9/epics-base/ /build/
      2. # 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}
      3. Works for binaries, need to try building simple ioc with it.

        Code Block
        languagebash
        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. 

        Code Block
        languagebash
        linenumberstrue
        collapsetrue
        [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]#
      4. 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?
          1. For registry git clone --depth 1 --branch R4-39 https://github.com/epics-modules/asyn.git
          2. Steps to build asyn

            Code Block
            languagebash
            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
            cd asyn/
            make

        1. Now you have the libraries and binaries needed, in /asyn/lib.
        2. try test-ioc with asyn with your guardian 'example' branch
          1. cd /build 
          2. git clone -b example https://github.com/pnispero/Guardian.git
          3. in configure/RELEASE
            1. Update EPICS_BASE   to point to /build/epics-base
            2. Update ASYN to point to /build/support/asyn
          4. make
          5. cd iocBoot/iocGuardianTest/
          6. in st.cmd
            1. Update the shebang to point to #!../../bin/linux-x86_64/Guardian
          7. chmod +x st.cmd
          8. ./st.cmd
          9. Optional:

            Code Block
            languagebash
            # Then in the shell you can 'dbl' to get pvs
            # And in another terminal write to 'device' pv.
            $ caput FBCK:FB02:GN01:S2DES_TEST 5
            # Trigger the 'trigger' pv.
            $ caput SIOC:B34:GD_PATRICK:SNAPSHOT_TRG_EN 1
            # The code will then takeSnapshot(). And your output should be 5
        1. Patrick left off here, still gives error. How about try these options
          1. Get the prebuilt one from afs, and upload to ad-build-test github, and download in registry and use that
          2. Get test-ioc to have the basic ioc in there.
      1. How would channel access work if epics is in container? Can it be accessed from main server?
    1. 2) Or try moving everything (/include (.h), /lib (.so/.a), and /bin (binaries)) to according directories

...