Building Elmer for Nixpkgs fails

Discussion about building and installing Elmer
Post Reply
getty
Posts: 8
Joined: 01 Mar 2024, 05:26
Antispam: Yes

Building Elmer for Nixpkgs fails

Post by getty »

Eventual goal is to have Elmer available on nixpkgs if I can figure that out. Starting with a nix build script. As the program compiles I'm getting this error:

Code: Select all

Error: Index variable 'i' redefined at (1) in procedure 'inputvector' called from within DO loop at (2)
make[2]: *** [fem/src/modules/CMakeFiles/DCRComplexSolve.dir/build.make:75: fem/src/modules/CMakeFiles/DCRComplexSolve.dir/DCRComplexSolve.F90.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:14013: fem/src/modules/CMakeFiles/DCRComplexSolve.dir/all] Error 2
Which might be related to this: https://github.com/ElmerCSC/elmerfem/issues/322

The package is being built on NixOS 23.11
I've attached the nix build script I'm working on as well as a copy of the log file it outputs. Any help appreciated.
The actual name of nixBuildScript.txt would be default.nix, but the forum prohibited the .nix file extension.
Attachments
nixBuildScript.txt
(991 Bytes) Downloaded 9 times
build.log
(206.62 KiB) Downloaded 9 times
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Building Elmer for Nixpkgs fails

Post by raback »

Hi

Rather use the "devel" branch and let's see the complaints anew then.

-Peter
getty
Posts: 8
Joined: 01 Mar 2024, 05:26
Antispam: Yes

Re: Building Elmer for Nixpkgs fails

Post by getty »

Some good progress has been made. I've updated the script to build off git commit 1ed4eecf14703bd1c3adfafd03196642ca0e47e7, and the compilation is successful. I then uncommented -DWITH_ELMERGUI:BOOL=TRUE to try and add the GUI to the build, which originally failed with dependency errors. I added a full qt5 installation to the build, which removed those errors. Now I'm getting cmake errors I don't understand. See attached log.
Attachments
build.log
(55.67 KiB) Downloaded 10 times
tzwinger
Site Admin
Posts: 100
Joined: 24 Aug 2009, 12:20
Antispam: Yes

Re: Building Elmer for Nixpkgs fails

Post by tzwinger »

Hi,
do you have QWT library available on your system?

Regards,
Thomas
getty
Posts: 8
Joined: 01 Mar 2024, 05:26
Antispam: Yes

Re: Building Elmer for Nixpkgs fails

Post by getty »

Before you asked, I was not sure. So I made sure it was specified in the build environment. I then got more errors which were resolved by ensuring libGLU was also in the build environment, but now I have hit another issue:
/build/source/ElmerGUI/Application/vtkpost/vtkpost.cpp:86:10: fatal error: QVTKOpenGLNativeWidget.h: No such file or directory

Looking around online I found this page, which implies that its an issue with how VTK is built and that there needs to be support for QT built into that when it is compiled. Have I understood this issue correctly?
Post Reply