# Guide to compile CalculiX

**URL:** <https://calculix.discourse.group/t/guide-to-compile-calculix/509>\
**Category:** Uncategorized\
**Created:** [March 26, 2021, 8:41am UTC](https://calculix.discourse.group/t/guide-to-compile-calculix/509 "2021-03-26T08:41:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![greenz1](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@greenz1](https://calculix.discourse.group/u/greenz1)\
**Post date:** [March 26, 2021, 8:41am UTC](https://calculix.discourse.group/t/guide-to-compile-calculix/509/1 "2021-03-26T08:41:46Z")

</div>

[Last updated: 26 March 2021]

Hello!

CalculiX is a powerful tool for FEM purposes and is used by many open source software for this very purpose. However, a newcomer can be deterred by the troubles one can face while compiling CalculiX for their distro. The compiled binary available on the website doesn’t work on Fedora 33.

The following steps were performed on a system with AMD CPU, Nvidia GPU with Nvidia proprietary drivers. The steps here are for the complete source downloaded from [here (cgx\_2.17.1.all.tar.bz2)](http://www.dhondt.de/cgx_2.17.1.all.tar.bz2).

1. Start by reading [install guide](http://www.dhondt.de/cgx_2.17.INSTALL)
2. When you run `make` then your installation will throw an error that a header or any other file cannot be found. Copy the file name.
3. Paste the file name in the search option [here](https://pkgs.org/search/?q=XInput.h). Select **Provides** tab. This will show you list of packages that provide this particular file.
4. Install the package and proceed with step 2. Keep doing this until the build process is complete.

Here are the packages that I had to install on Fedora 33 `libXmu-devel libXi-devel mesa-libGL-devel mesa-libGLU-devel`

I was unable to compile the program available [here(ccx\_2.17.src.tar.bz2)](http://www.dhondt.de/ccx_2.17.src.tar.bz2). It kept throwing errors related to **ARPACK** which was compiled in `/usr/local/ARPACK`. If someone has compiled just the source then please extend this guide.

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [March 26, 2021, 6:03pm UTC](https://calculix.discourse.group/t/guide-to-compile-calculix/509/2 "2021-03-26T18:03:04Z")

</div>

> [@greenz1](#):
>
> I was unable to compile the program available [here(ccx\_2.17.src.tar.bz2)](http://www.dhondt.de/ccx_2.17.src.tar.bz2). It kept throwing errors related to **ARPACK** which was compiled in `/usr/local/ARPACK` . If someone has compiled just the source then please extend this guide.

Could you share the errors related to ARPACK?

---

<div class="post-metadata">

**Author:** ![greenz1](https://avatars.discourse-cdn.com/v4/letter/g/a6a055/32.png) [@greenz1](https://calculix.discourse.group/u/greenz1)\
**Post date:** [March 26, 2021, 10:10pm UTC](https://calculix.discourse.group/t/guide-to-compile-calculix/509/3 "2021-03-26T22:10:51Z")

</div>

During the build process, `libarpack_$(PLAT).a` couldn’t be found. So, I rebuilt it from scratch. After this I was able to compile `ccx_2.17` .

If you are interested in the exact error then [this](https://calculix.discourse.group/t/calculix-version-2-17/55/5) comment summarizes it.

---

<div class="post-metadata">

**Author:** ![fsimonis](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fsimonis](https://calculix.discourse.group/u/fsimonis)\
**Post date:** [April 7, 2021, 10:11am UTC](https://calculix.discourse.group/t/guide-to-compile-calculix/509/4 "2021-04-07T10:11:55Z")

</div>

Hi, the [documentation of the CalculiX adapter for the preCICE Coupling library](https://www.precice.org/adapter-calculix-get-calculix.html) explains how to install dependencies and build CalculiX from source.  
You can omit the adapter-specific parts and simply run `make` inside the `src` folder to build `ccx`.

We are continuously improving the wiki, so the page may change in the future. Of course constructive feedback is always welcome.
