Build ccx with arpack-ng


I am trying to build ccx_2.20 on ubuntu 20.04 on docker. The arpack version suggested in the official install guide () is not available anymore. I am trying to install it with the opencollab version of arpack, arpack-ng but I am receiving an error when I try to build ccx.
This is my Dockerfile

FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive 

RUN apt-get update && apt-get install -y \
    wget \
    gfortran \
    make \
    git \
    autoconf \
    f2c \
    openmpi-bin openmpi-doc libopenmpi-dev\
    liblapack3 \
    liblapack-dev \
    libexodusii-dev \
    libgl1-mesa-dev \
    libglu1-mesa-dev \
    libxi-dev libxmu-dev

RUN apt install -y libgfortran4

RUN mkdir /usr/local/SPOOLES.2.2
WORKDIR /usr/local/SPOOLES.2.2
RUN wget && tar xvf spooles.2.2.tgz
RUN sed -i 's@  CC = /usr/lang-4.0/bin/cc@# CC = /usr/lang-4.0/bin/cc@g'
RUN sed -i 's@# CC = gcc@  CC = gcc@g'
RUN make lib
WORKDIR /usr/local/SPOOLES.2.2/MT/src/
RUN make

RUN mkdir /tmp/ARPACK
RUN git clone
WORKDIR /tmp/ARPACK/arpack-ng
RUN sh bootstrap
RUN ./configure --enable-mpi
RUN make
RUN make check
RUN make install

WORKDIR /usr/local
RUN wget
RUN tar -xvjf ccx_2.20.src.tar.bz2
WORKDIR /usr/local/CalculiX/ccx_2.20/src
RUN mv Makefile Makefile_ST
RUN mv Makefile_MT Makefile
RUN sed -i 's@ ../../../ARPACK/libarpack_INTEL.a@ /usr/local/lib/' Makefile

WORKDIR /root/shared

This is the error I receive

### Errors with LIBS =  /usr/local/lib/
./; cc -Wall -O2  -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT -c ccx_2.20.c; gfortran  -Wall -O2 -o ccx_2.20 ccx_2.20.o ccx_2.20.a ../../../SPOOLES.2.2/spooles.a /usr/local/lib/ -lpthread -lm -lc -fopenmp
Can't open ccx_2.20step.c: No such file or directory at ./ line 18.
ccx_2.20.c: In function ‘main’:
ccx_2.20.c:1766:18: warning: ‘nkon0’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1766 |       ne=ne0;nkon=nkon0;
      |              ~~~~^~~~~~
In file included from ccx_2.20.c:30:
CalculiX.h:62:29: warning: ‘ne0’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   62 | #define RENEW(a,b,c) a=(b *)u_realloc((b *)(a),(c)*sizeof(b),__FILE__,__LINE__,#a)
      |                             ^~~~~~~~~
ccx_2.20.c:72:39: note: ‘ne0’ was declared here
   72 |     iprestr,kode,isolver,nslavs,nkon_,ne0,nkon0,mortar,
      |                                       ^~~
ccx_2.20.c:63:22: warning: ‘nxstate’ may be used uninitialized in this function [-Wmaybe-uninitialized]
   63 |     *ipoinpc=NULL,mt,nxstate,nload0,iload,*iuel=NULL,*ne2boun=NULL,
      |                      ^~~~~~~
/usr/bin/ld: ccx_2.20.a(dsptrf.o): undefined reference to symbol 'dlaev2_'
/usr/bin/ld: /lib/x86_64-linux-gnu/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:29: ccx_2.20] Error 1

Has anyone build ccx with arpack-ng? Please let me know what is wrong in my build.

the version recommended in the official instructions can be recovered from the wayback machine: ARPACK - Arnoldi Package


It seems like it would be a good idea for CCX to migrate to ARPACK-NG, since it is being supported by volunteers and the original was abandoned. Or ditch ARPACK altogether and use something more modern, if possible.


That worked. Thanks!!