multiple definition of `exodus_unused_symbol_dummy_1' when building VTK 8.2.0

I’m trying to build VTK 8.2.0 on Arch Linux on a Steam Deck, in hopes of using it with an Azure Kinect for photogrammetry… it’s been QUITE a journey getting all the right dependencies installed, but I’ve finally hit an error that seems to be related to VTK itself, or at least something it comes bundled with:

[ 89%] Linking C shared library ../../../lib/
/usr/bin/ld: CMakeFiles/vtkexodusII.dir/src/ex_open_par.c.o:/home/deck/projects/VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c:477: multiple definition of `exodus_unused_symbol_dummy_1'; CMakeFiles/vtkexodusII.dir/src/ex_create_par.c.o:/home/deck/projects/VTK-8.2.0/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c:617: first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [ThirdParty/exodusII/vtkexodusII/CMakeFiles/vtkexodusII.dir/build.make:4436: lib/] Error 1
make[1]: *** [CMakeFiles/Makefile2:5607: ThirdParty/exodusII/vtkexodusII/CMakeFiles/vtkexodusII.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Googling turned up this thread: which suggests that this is fixed already? Does anyone have any idea why it would still be happening for me?

Because it was fixed in 9.0, not any (released) version of 8.2. Looking at the MR that fixed it, it did not go into the 8.2 maintenance branch either.

Super easy to fix - go to ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c and ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c and replace

const char exodus_unused_symbol_dummy_1;


const char exodus_unused_symbol_dummy_ex_create_par;

should solve your compile issues!

You can also go to ThirdParty/exodusII/ and change the tag to readonly tag="for/vtk-20200128-7.24f-v2019-12-18"

That worked, thank you!