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
ENV LANG C.UTF-8
RUN apt-get update && apt-get install -y \
wget \
gfortran \
make \
git \
autoconf \
f2c \
openmpi-bin openmpi-doc libopenmpi-dev\
libtool\
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 http://www.netlib.org/linalg/spooles/spooles.2.2.tgz && 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' Make.inc
RUN sed -i 's@# CC = gcc@ CC = gcc@g' Make.inc
RUN make lib
WORKDIR /usr/local/SPOOLES.2.2/MT/src/
RUN make
RUN mkdir /tmp/ARPACK
WORKDIR /tmp/ARPACK
ENV OMPI_ALLOW_RUN_AS_ROOT=1
ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
RUN git clone https://github.com/opencollab/arpack-ng.git
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 http://www.dhondt.de/ccx_2.20.src.tar.bz2
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/libarpack.so@g' Makefile
WORKDIR /root/shared
This is the error I receive
### Errors with LIBS = /usr/local/lib/libarpack.so
./date.pl; 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/libarpack.so -lpthread -lm -lc -fopenmp
Can't open ccx_2.20step.c: No such file or directory at ./date.pl 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/liblapack.so.3: 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.
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.
Is there any way to set up ccx_2.23? I have encountered repeated problems of software no longer available and following threads from there to proposed replacements encountered only more non-available software.
arpack-ng can be used together with CalculiX instead of the original one (@CharlieM I guess you had bad luck trying to access it and I’d put some trust into GitHub that it will be available for some more time)
There are not many straightforward alternatives to arpack as far as I’m aware (even scipy uses arpack for sparse eigenvalue problems). There is e.g. Spectra and Anasazi, but both have additional dependencies for their data structures and are not the same in terms of the algorithms they provide.
FEAST seems to be a newer alternative vs. ARPACK and is written as well in Fortran which would not add additional complexity to the compilation process of ccx while other packages as Spectra are written in other programming languages like C++. FEAST is used by the COMSOL FEM package where you can choose between FEAST and ARPACK.
@Durbul at some point it would be convenient to talk about adding Trilinos’ Anasazi and/or PETSc’s SLEPc capabilities to the core ccx code. Is that something that is planned from a development perspective?
It’s something we’ve been looking into, but not planning at the moment / in the short run, since it would require major changes in the code. A possibility could be to start with a solver interface to one of the libraries to have access to the linear and eigensolver capabilities. In a next step, the linear algebra capabilities and other functionality could be introduced one by one into the code wherever it makes sense.
Many thanks for your help. I was initially under the impression that Calculix was dying and no longer supported, from looking at the dates of the forum communications.
I used the autotools to config, build, and install and my computer didn’t blow up.
Is there a way to test that these tools work?
I have been using FreeCAD since this January and only started learning Linux Ubuntu since December 2025. I am not fluent at speaking Linux Ubuntu. It seems that many sites I have visited require that you speak Linux. As a materials engineer, I am more skilled at steel foundry and forging work or sintering ceramic materials. Not Linux.
I have used the Calculix portion of FreeCAD but found that it is unable to handle fracture behaviour. Apparently Elmer doesn’t do fracture mechanics. Hence, I have been chasing down the program Calculix 2. 23.
My next goal today is to work on SPOOLES and configure, build and install.
“Lis (Library of Iterative Solvers for linear systems, pronounced [lis]) is a parallel software library to solve discretized linear equations and eigenvalue problems that arise from the numerical solution of partial differential equations using iterative methods.”
Patch for ccx 2.9 by Kodanda Ram Mangipudi, from the yahoo forum days.
Some clues can be taken from the PKGBUILD files for mingw/msys2: