Compilation error ccx 2.21

Hi. While compiling ccx 2.21 I get the following error:
/usr/bin/ld: …/…/…/ARPACK/libarpack_INTEL.a(drot.o): relocation R_X86_64_32 against `.text’ can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
make: *** [Makefile:29: ccx_2.21] Error 1
Please tell me what to do? I tried all ARPACK from the official site and I get errors eveywhere.

If you OS has packages or build scripts for CalculiX, I suggest you try those.

It seems the original ARPACK library has not seen releases in some years. So the files you have might be stale or built with older conventions. There is a currently maintained fork, arpack-ng. I built CalculiX on FreeBSD 13 with arpack-ng and it works fine.

The package system on my machine lists the following dependencies for its arpack-ng package:


What is your operating system?

Where did you download the ARPACK package from?

Try ARPACK from this repo, please: GitHub - calculix/ccx_prool: Prool's modifications of CalculiX CrunchiX (ccx)

With best regards, Prool

I have Ubuntu 22.04.3. I download ARPACK from Thank you I will try this repo.

I don’t can reproduce this error.

Everything compiling without error.

Ubuntu 22.04.3, gcc 11.4.0, GNU fortran 11.4.0.


make clean
rm *.a


make lib

Because there are *.o *.a files in the ARPACK distribution

They can disturb.

It is unknown what OS/compilers version they were created in.


1 Like

Thank you for reply.
I downloaded ARPACK from your repository then I went into the ./home/…/ccx_prol/ARPACK folder and ran ./ and make lib. I got the error again:

367 | call svout (logfil, 1, rnorm0, ndigit,
| 2

404 | call svout (logfil, n, resid, ndigit,
| 1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
make[1]: *** [Makefile:50: sgetv0.o] Error 1
make[1]: Leaving directory ‘/home/…/ccx_prool/ARPACK/SRC’
ranlib /home/…/ccx_prool/ARPACK/libarpack_INTEL.a

After that I tried to run Makefile in the /home/…/ccx_prool folder and I got error again:
usr/bin/ld: ccx_2.21.a(arpack.o): in function arpack': arpack.c:(.text+0x1e21): undefined reference to dsaupd_’
/usr/bin/ld: arpack.c:(.text+0x1fa7): undefined reference to dsaupd_' /usr/bin/ld: arpack.c:(.text+0x5626): undefined reference to dnaupd_’
/usr/bin/ld: arpack.c:(.text+0x585d): undefined reference to dseupd_' /usr/bin/ld: arpack.c:(.text+0x5d21): undefined reference to dneupd_’
/usr/bin/ld: arpack.c:(.text+0x607c): undefined reference to dnaupd_' /usr/bin/ld: ccx_2.21.a(arpackbu.o): in function arpackbu’:
arpackbu.c:(.text+0x2408): undefined reference to dsaupd_' /usr/bin/ld: arpackbu.c:(.text+0x24f9): undefined reference to dsaupd_’
/usr/bin/ld: arpackbu.c:(.text+0x2f85): undefined reference to dseupd_' /usr/bin/ld: ccx_2.21.a(arpackcs.o): in function arpackcs’:
arpackcs.c:(.text+0x26db): undefined reference to dsaupd_' /usr/bin/ld: arpackcs.c:(.text+0x27e9): undefined reference to dsaupd_’
/usr/bin/ld: arpackcs.c:(.text+0x2933): undefined reference to dnaupd_' /usr/bin/ld: arpackcs.c:(.text+0x2b82): undefined reference to dseupd_’
/usr/bin/ld: arpackcs.c:(.text+0x8ea3): undefined reference to dneupd_' /usr/bin/ld: arpackcs.c:(.text+0x908d): undefined reference to dnaupd_’
/usr/bin/ld: ccx_2.21.a(randomfieldmain.o): in function randomfieldmain': randomfieldmain.c:(.text+0xd19): undefined reference to dsaupd_’
/usr/bin/ld: randomfieldmain.c:(.text+0xfc0): undefined reference to `dseupd_’
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:29: ccx_2.21] Error 1
make[1]: Leaving directory ‘…/ccx_prool/CalculiX/ccx_2.21/src’
make: *** [Makefile:7: all] Error 2.
I have a clean Ubuntu 22.04.3, GCC 11.4.0, Fortran 11.4.0

Fix for ARPACK for new gfortran (for example for Ubuntu 22)

add flag -fallow-argument-mismatch to FFLAGS in file


make clean
make lib

And go to ccx source directory and

rm *.o *.a


WBR, Prool