Superbuild - ctest step not working any more

New version of my ParaView custom program ready, now fighting with the “superbuild”. Everything looks like being ok, CMake and ninja are doing their jobs like previously, but the last step, for generating a package with NSIS, seems to find nothing:

[523/523] Completed 'athosgeoview'

C:\dev\atgview\pack>ctest -R athosgeoview
Test project C:/dev/atgview/pack
No tests were found!!!

I am sure that I am still doing something wrong! In the main CMakeLists.txt I commented out the “ZIP” option, but kept the “NSIS”, like before.

Something fundamentally changed from PV 5.10 to 5.13?

Yes, NSIS was dropped in preference for WIX. See this MR:

https://gitlab.kitware.com/paraview/paraview-superbuild/-/merge_requests/1004

The issue is that NSIS doesn’t support long paths. WIX added it in version 4.

Ok, got that. And I realized that even though my entire “superbuild” is based on the “superbuild” project of ParaView 5.13, I overlooked one little detail: In the main CMakeLists.txt it is WIX, not any more NSIS.

So thanks for this very basic hint!!

Now I corrected that - so far so good. I removed the entire content of the superbuild target directory and restarted from scratch. And of course I made sure that WIX is installed on my computer. Turns out to be Version 5, but in the WIX explanation it says that differences between 4 and 5 are minimal, so I did not effort to downgrade.

However the result is same as before - with this as the end of the output:

...
[523/523] Completed 'athosgeoview'

C:\dev\atgview\pack>ctest -R athosgeoview
Test project C:/dev/atgview/pack
No tests were found!!!

C:\dev\atgview\pack>ctest -R cpack
Test project C:/dev/atgview/pack
No tests were found!!!

C:\dev\atgview\pack>

Maybe I should try a “superbuild” of the “untouched” downloaded ParaView 5.13 superbuild!?

Or is there still some trick involved to make this WIX based packaging really happen?

Now I did like I proposed already myself: Run the “untouched” ParaView 5.13 superbuild - with the following result:

C:\dev\paraview-superbuild-v5.13.1\pack>ctest -R paraview
Test project C:/dev/paraview-superbuild-v5.13.1/pack
    Start 1: cpack-paraview-ZIP
1/4 Test #1: cpack-paraview-ZIP ...............   Passed   15.72 sec
    Start 2: cpack-paraview-WIX
2/4 Test #2: cpack-paraview-WIX ...............***Failed    6.11 sec
    Start 3: extract-paraview-ZIP
3/4 Test #3: extract-paraview-ZIP .............   Passed    0.60 sec
    Start 4: paraview-version-server
4/4 Test #4: paraview-version-server ..........   Passed    1.13 sec

75% tests passed, 1 tests failed out of 4

Label Time Summary:
ParaView    =  23.56 sec*proc (4 tests)

Total Test time (real) =  23.57 sec

The following tests FAILED:
          2 - cpack-paraview-WIX (Failed)
Errors while running CTest
Output from these tests are in: C:/dev/paraview-superbuild-v5.13.1/pack/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.

Meaning: I am coming closer, but the most important step is still failing! The message in the error log is:

  Could not find the WiX candle executable.

Now indeed I have installed WIX with the command

dotnet tool install --global wix

Checking with wix --version I see that I got version 5.0.2(something), not version 4. And with a search for “wix candle.exe not found” I learned that with version 4 this program is discontinued and replaced by a single “wix build” command.

My conclusion is that maybe with version 4 they still provided candle.exe for those who are used to older versions, and with version 5 they really stopped that practice. However since I do not find a way to downgrade it looks like I am stuck here!

And next to this I still have to find out what the ParaView 5.13 superbuild has that my own superbuild does not have! One thing I already see: With the command ctest -R paraview I am also getting some (failing) tests, so I am doing not everything wrong, but I need to find a way to “convince” my superbuild that it should package my own software, not the underlying paraview…

New findings regarding WIX and superbuild:

  • The paraview-superbuild-v5.13.1 package that I am using now as a reference to find out at least how the superbuild with WIX should work - before making the same thing happen with my own software - is definitely NOT working with WIX version 4: I downgraded and tried. It relies on the candle program (and later on probably on the light program) which were part of the WIX toolset up to version 3. This has changed - as explained here. I just tried also with the most recent ParaView superbuild from gitlab.kitware: It still fails because of missing candle executable, so there is obviously something to be fixed in the ParaView superbuild in my understanding! Either that, or try to find a way to install an older version of the WIX toolkit
  • For me, the next step should be to at least get the ZIP packaging option working. This was not required if you wanted to generate NSIS only, but for the WIX option it seems to be a prerequisite. This is obviously more than just uncommenting it!

Finally managed to find a WIX 3.11 installation, and after activating .net 3.5 on my Windows 11 system I was finally able to run the ParaView 5.13.latest superbuild successfully, generate the MSI package with ctest successfully and install the software!

Meaning that I neither need to either wait for WIX 4 and 5 support or try to fiddle around to enable it on my own - which I am afraid might not be such an easy job…

So finally what is left is “only” make sure that the same thing is now working also for my own software!

At least I can “attack” now from two sides: I have a) my successful superbuild of the custom software and b) a successful MSI packaging with WIX

No, it’s that CMake only supports WIX4 with CMake 3.30+.

Right, and thanks for the explicit clarification! It is what I also finally found out during my research in the meantime:

  • There is no candle.exe etc. in WIX 4+ any more, not even marked as “legacy”, for people who are not able to switch so easily. All functionality is now with wix.exe plus parameters
  • Starting with CMake 3.30, there seems to be somehow support for WIX 4 in CMake. In this discussion I found a hint that it could be enabled by setting the CMake variable CPACK_WIX_VERSION to 4, which would then enable the use of both WIX 4 and WIX 5

However, when I downloaded a current ParaView 5.13.2 superbuild from gitlab, then run it without further adaptations - and with CMake version 3.30 - it will failed during the last step, because of missing “candle”. Which only was the starting point of my research about WIX versions.

So maybe it would now even be possible to just add that above mentioned CMake variable to the superbuild of ParaView 5.13 to solve that problem in a second. But before I even found that hint above, I had managed to install the old version 3.11 of WIX, and with this I was able to build and install the superbuild successfully.

Knowing that these superbuilds are rather tricky animals, where many effects are working only over many complex layers to achieve their goal, I did not spend time trying to do the latter.

This because after getting a successful superbuild of ParaView 5.15, I want to achieve my primary goal, which is the generation of an installation package for my own ParaView based software. And I am sure that for this purpose I am looking foward to still spending many hours of code and internet research within the extremely complex (but of course also extremely powerful) code jungle of the superbuilds!

I can confirm now: Just adding CPACK_WIX_VERSION to the setup of the superbuild manually and setting the value to 4, plus installing the latest version of WiX (which is 5) with the following command (and disabling version 3.11 by renaming the C:/Program Files (x86)/WiX Toolset v3.11 folder):

dotnet tool install --global wix

does NOT generate a MSI installer for the latest ParaView version, but terminates with the message “Could not find the WiX candle executable”. The used CMake version is 3.30.2.

From which I conclude: Although CMake may support now WiX version 4 (or higher), this feature does not seem to be integrated by now into the superbuild code for ParaView.

For me this is not a problem: I can work with WiX 3.11. I write it only in order to make these findings accessible to others with possibly the same problem - or even for myself: It would not be the first time that I would run into a problem, do an internet search - and finally hit my own “discourse” monologues from 2 years ago when I already solved that same problem once :slight_smile: