Page 1 of 1

Building Elmer for Nixpkgs fails

Posted: 24 Mar 2024, 18:26
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.

Re: Building Elmer for Nixpkgs fails

Posted: 25 Mar 2024, 11:25
by raback
Hi

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

-Peter

Re: Building Elmer for Nixpkgs fails

Posted: 30 Mar 2024, 06:15
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.

Re: Building Elmer for Nixpkgs fails

Posted: 31 Mar 2024, 23:18
by tzwinger
Hi,
do you have QWT library available on your system?

Regards,
Thomas

Re: Building Elmer for Nixpkgs fails

Posted: 27 Apr 2024, 17:06
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?