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  <20212022  2023  2024  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  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: EPICS in Docker image Build Error base-3.15.6 (alpine linux)
From: Josh Fiddler via Tech-talk <tech-talk at aps.anl.gov>
To: tech-talk at aps.anl.gov
Date: Tue, 20 Apr 2021 19:07:09 -0400
Good afternoon everyone!

I have what seems to be a unique problem. 
I am new to EPICS and it is just that, epic! I have read and re-read chapter 4 of the dev guide. Then I read it some more. 

The unique problem is that we are trying to integrate EPICS and MDSplus for our controls and data system. MDSplus for the physics data and instrument definitions, and EPICS to control and for feedback. 

The beauty of MDSplus is the fact it is designed for pulsed experiments, putting everything in 'shot trees', including device definitions, data conversion steps, etc. Since this isn't an MDSplus board, obviously not a lot of reference to it. But it's not MDSplus that's giving me the headache. It's EPICS. 

The advice on porting to a new os/architecture didn't reveal anything different I needed to do other than to ensure the requirements are met and they are.

To build the MDSplus EPICS interface requirements I appear to need the MDSplus libraries. MDSplus provides a docker image based on Alpine linux. I've added the required build tools with `apk`. 

The EPICS_HOST_ARCH is set as `linux-x86_64` and the target will be the same. Most if not all IOCs will be soft IOCs as none of our equipment has RTEMS or vxWorks embedded (for now). 

An EPICS tarball is pulled with `wget` and then untarred during the Docker build so it is found at  `EPICS_BASE`, which is set to `/epics/base` during the container build.

############# Dockerfile ############# 
FROM mdsplus/mdsplus:latest
# Use mdsplus image to build EPICS in alpine linux based image of mdsplus/mdsplus:latest

ENV EPICS_BASE /epics/base
ENV EPICS_HOST_ARCH linux-x86_64
ENV EPICS_BASE_BIN ${EPICS_BASE}/bin/${EPICS_HOST_ARCH}
# ENV EPICS_BASE_LIB ${EPICS_BASE}/lib/${EPICS_HOST_ARCH}
ENV LD_LIBRARY_PATH ${EPICS_BASE}/lib/${EPICS_HOST_ARCH}
ENV PATH ${PATH}:${EPICS_BASE_BIN}

RUN mkdir /epics
WORKDIR /epics

RUN rm -rf /var/cache/apk/* && \
rm -rf /tmp/*

RUN apk update && apk add --virtual build-dependencies build-base gcc wget git tar perl zip unzip curl

RUN apk add libtool check patch readline-dev re2c libxml2-dev tmux

RUN tar -xvf base-3.15.6.tar.gz
RUN ln -s /epics/base-3.15.6 /epics/base

WORKDIR /epics/base

############# END Dockerfile #############

Once the Docker container is built, I run a bash terminal session in the container at /epics/base and call 'make'. 

Everything goes swimmingly, so far as I can tell, until it comes to `src/libCom/osi` and then  the compiler complains and quits. Here's the error

############# Begin Error snippet  #############
usr/bin/gcc  -D_GNU_SOURCE -D_DEFAULT_SOURCE            -D_X86_64_  -DUNIX  -Dlinux     -O3 -g   -Wall      -mtune=generic     -m64 -fPIC -I. -I../O.Common -I. -I../../../src/libCom/osi/compiler/gcc -I../../../src/libCom/osi/compiler/default -I. -I../../../src/libCom/osi/os/Linux -I../../../src/libCom/osi/os/posix -I../../../src/libCom/osi/os/default -I.. -I../../../src/libCom/as -I../../../src/libCom/bucketLib -I../../../src/libCom/calc -I../../../src/libCom/cvtFast -I../../../src/libCom/cppStd -I../../../src/libCom/cxxTemplates -I../../../src/libCom/dbmf -I../../../src/libCom/ellLib -I../../../src/libCom/env -I../../../src/libCom/error -I../../../src/libCom/fdmgr -I../../../src/libCom/flex -I../../../src/libCom/freeList -I../../../src/libCom/gpHash -I../../../src/libCom/iocsh -I../../../src/libCom/log -I../../../src/libCom/macLib -I../../../src/libCom/misc -I../../../src/libCom/osi -I../../../src/libCom/pool -I../../../src/libCom/ring -I../../../src/libCom/taskwd -I../../../src/libCom/timer -I../../../src/libCom/yacc -I../../../src/libCom/yacc -I../../../src/libCom/yajl -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include         -c ../../../src/libCom/env/envSubr.c
../../../src/libCom/env/envSubr.c: In function 'envGetInetPortConfigParam':
../../../src/libCom/env/envSubr.c:411:21: error: 'IPPORT_USERRESERVED' undeclared (first use in this function)
     if (epicsParam<=IPPORT_USERRESERVED || epicsParam>USHRT_MAX) {
                     ^~~~~~~~~~~~~~~~~~~
../../../src/libCom/env/envSubr.c:411:21: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [../../../configure/RULES_BUILD:232: envSubr.o] Error 1
make[3]: Leaving directory '/epics/base-3.15.6/src/libCom/O.linux-x86_64'
make[2]: *** [../../configure/RULES_ARCHS:58: install.linux-x86_64] Error 2
make[2]: Leaving directory '/epics/base-3.15.6/src/libCom'
make[1]: *** [../configure/RULES_DIRS:84: libCom.install] Error 2
make[1]: Leaving directory '/epics/base-3.15.6/src'
############# END ERROR SNIPPET #############  

The Asks:
1) Is there anyone who has some insights into this error or has built in Alpine?
2) Are there any MDSplus users who could lend a hand with the integration?

Kind regards, 

Josh

Josh Fiddler

Technician

+1-450-245-1065

www.f.energy

Linkedin


--

Josh Fiddler

Fusion Technician

+1-450-245-1065

www.f.energy

Linkedin



Replies:
Re: EPICS in Docker image Build Error base-3.15.6 (alpine linux) Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Re: asyn: No rule to make target 'ipSNCServer.o'; Does configure/RELEASE have multiple pointers to ... Johnson, Andrew N. via Tech-talk
Next: Re: EPICS in Docker image Build Error base-3.15.6 (alpine linux) Johnson, Andrew N. 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: asyn: No rule to make target 'ipSNCServer.o'; Does configure/RELEASE have multiple pointers to ... Michael Davidsaver via Tech-talk
Next: Re: EPICS in Docker image Build Error base-3.15.6 (alpine linux) Johnson, Andrew N. 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  <20212022  2023  2024 
ANJ, 21 Apr 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·