Compiling CalculiX ccx on fedora, ubuntu and debian

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
PrzemoF
Posts: 2655
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Compiling CalculiX ccx on fedora, ubuntu and debian

Postby PrzemoF » Wed Feb 06, 2019 1:15 pm

The script to build CalculiX ccx from scratch of fedora/ubuntu/debian [1].

1a. for FEDORA install git tar make bzip2 gzip make aprack arpack-devel lapack lapack-devel blas blas-devel

Code: Select all

dnf install git tar make bzip2 gzip make arpack arpack-devel lapack lapack-devel blas blas-devel
1b. for UBUNTU/DEBIAN install git tar make bzip2 gzip liblapack-dev libarpack2 libarpack2-dev libblas3 libblas-dev gfortran

Code: Select all

apt-get update && apt-get install git tar make bzip2 gzip liblapack-dev libarpack2 libarpack2-dev libblas3 libblas-dev gfortran
2. clone the repo

Code: Select all

git clone https://gitlab.com/PrzemoF/calculix-build-script
3. cd into the repo

Code: Select all

cd calculix-build-script
4a. ..and run script. It should produce ccx executable
FEDORA:

Code: Select all

./fedora.sh
UBUNTU/DEBIAN

Code: Select all

./ubuntu.sh
5. Start FreeCAD, open FEM workbench (required to get FEM wb properties in Settings)
6. Go to Edit->Preferences->FEM-CalculiX and set path to the newly compiled ccx file

[1] https://gitlab.com/PrzemoF/calculix-build-script
User avatar
bernd
Posts: 8479
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: CalculiX in fedora 27, 28 & 29

Postby bernd » Wed Feb 06, 2019 2:27 pm

User avatar
Kunda1
Posts: 5927
Joined: Thu Jan 05, 2017 9:03 pm

Re: CalculiX in fedora 27, 28 & 29

Postby Kunda1 » Wed Feb 06, 2019 5:46 pm

PrzemoF wrote:
Wed Feb 06, 2019 1:15 pm
build CalculiX ccx from scratch of fedora [1].
[1] https://gitlab.com/PrzemoF/build-script ... -on-fedora
Image
Maybe we can get Calculix in to Rawhide ?
Last edited by Kunda1 on Wed Feb 06, 2019 7:33 pm, edited 1 time in total.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
PrzemoF
Posts: 2655
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: CalculiX in fedora 27, 28 & 29

Postby PrzemoF » Wed Feb 06, 2019 6:32 pm

You mean fedora rawhide? I think the script should work as well - I'll try to test it if I can run rawhide in gnome Boxes. Ubuntu flavours will be next on the TODO list as well.
User avatar
Kunda1
Posts: 5927
Joined: Thu Jan 05, 2017 9:03 pm

Re: CalculiX in fedora 27, 28 & 29

Postby Kunda1 » Wed Feb 06, 2019 7:34 pm

PrzemoF wrote:
Wed Feb 06, 2019 6:32 pm
You mean fedora rawhide? I think the script should work as well - I'll try to test it if I can run rawhide in gnome Boxes. Ubuntu flavours will be next on the TODO list as well.
Yes, Fedora Rawhide.
BTW, https://github.com/luzpaz/FreeCAD-depen ... /issues/30
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
PrzemoF
Posts: 2655
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: CalculiX in fedora 27, 28 & 29

Postby PrzemoF » Wed Feb 06, 2019 7:51 pm

The script works fine on rawhide as well. I need to put together a list of required packages (git, tar, gzip, bzip2, make + libraries) to make it foolproof.
User avatar
PrzemoF
Posts: 2655
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: CalculiX in fedora 27, 28 & 29

Postby PrzemoF » Thu Feb 07, 2019 10:10 am

Repo address changed to: https://gitlab.com/PrzemoF/calculix-build-script

I'm giving up with ubuntu for now - it's too weird for me (read: I don't know it). Getting installed package version is strange, names of libraries don't match dev packages and there is no arpack (or it's under some other name). I'll probably come back to it if there is any interest to compile ccx on ubuntu.
User avatar
HarryvL
Posts: 1052
Joined: Sat Jan 06, 2018 7:38 pm

Re: CalculiX in fedora 27, 28 & 29

Postby HarryvL » Thu Feb 07, 2019 12:48 pm

PrzemoF wrote:
Thu Feb 07, 2019 10:10 am
I'll probably come back to it if there is any interest to compile ccx on ubuntu.
+1

... and wrt making this “foolproof”, please count me in as a fool. I have no idea where to start. :shock:
User avatar
PrzemoF
Posts: 2655
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: CalculiX in fedora 27, 28 & 29

Postby PrzemoF » Thu Feb 07, 2019 12:55 pm

:D

Code: Select all

git clone https://gitlab.com/PrzemoF/calculix-build-script.git
Run the ubuntu.sh, read what's missing, install with apt-get, run again, repeat. Alternatively install all those before running the script:
tar make bzip2 gzip liblapack-dev libarpack2 libarpack2-dev libblas3 libblas-dev gfortran

I got great help on ubuntu channel, so the script should be almost ready.
User avatar
PrzemoF
Posts: 2655
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: CalculiX in fedora 27, 28 & 29

Postby PrzemoF » Thu Feb 07, 2019 1:03 pm

Code: Select all

sudo add-apt-repository universe
sudo apt-get install git tar make bzip2 gzip liblapack-dev libarpack2 libarpack2-dev libblas3 libblas-dev gfortran
git clone https://gitlab.com/PrzemoF/calculix-build-script.git
cd calculix-build-script
./ubuntu.sh
Enabling Universe repo might not work on older versions of ubuntu, more here: https://askubuntu.com/questions/148638/ ... ory#227788

Edit: one-liner to build ccx for ubuntu 18.10:

Code: Select all

sudo add-apt-repository universe && sudo apt-get install git ; git clone https://gitlab.com/PrzemoF/calculix-build-script.git && cd calculix-build-script/ && sudo apt-get install tar make bzip2 gzip liblapack-dev libarpack2 libarpack2-dev libblas3 libblas-dev gfortran && ./ubuntu.sh