Slicer custom app build error

Hello,

I am trying to build a custom app following the instructions here: https://www.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/

When building, I get the following error:

Could not find a package configuration file provided by "ITK" (requested
version 4.3) with any of the following names:

    ITKConfig.cmake
    itk-config.cmake
Could not find a package configuration file provided by "VTK" with any of
 the following names:

    VTKConfig.cmake
    vtk-config.cmake

I was under the impression that superbuild would take care of VTK and ITK dependencies.

In one of the forum posts I found that adding:

set(Slicer_VTK_VERSION_MAJOR 9 CACHE STRING "VTK major version (8 or 9)" FORCE)
mark_as_superbuild(Slicer_VTK_VERSION_MAJOR)

to the CMakeLists.txt solved the issue for the person. It didnt however solve anything for me. Still get the same error.

Any help would be appreciated. Thank you!

So, it should take care of that.

In the top-level folder, is there an ITK-build and a VTK-build folder with build artifacts in it?

It would also be helpful to check if there are build errors earlier in the log that prevented ITK and VTK from building.

@Sam_Horvath
First to answer your questions, the ITK-build folder has some artifacts, but the VTK-build folder does not.

Instead of building ALL_BUILD, I built just the VTK project, and this is the error I got.

22>Cloning into 'F:/GP_rel/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m'...
22>Downloading data/README.md (643 B)
22>Error downloading object: data/README.md (b30a14a): Smudge error: Error downloading data/README.md (b30a14a308f64c6fc2969e2b959d79dacdc5affda1d1c0e24f8e176304147146): batch response: Post "https://gitlab.kitware.com/vtk/vtk-m.git/info/lfs/objects/batch": x509: certificate signed by unknown authority
22>
22>Errors logged to F:\GP_rel\VTK\.git\modules\VTK-m\lfs\logs\20230227T152310.7229115.log

The log file contained:

git-lfs/2.13.3 (GitHub; windows amd64; go 1.16.2; git a5e65851)
git version 2.32.0.windows.2

$ git-lfs.exe filter-process
Error downloading object: data/README.md (b30a14a): Smudge error: Error downloading data/README.md (b30a14a308f64c6fc2969e2b959d79dacdc5affda1d1c0e24f8e176304147146): batch response: Post "https://gitlab.kitware.com/vtk/vtk-m.git/info/lfs/objects/batch": x509: certificate signed by unknown authority

Post "https://gitlab.kitware.com/vtk/vtk-m.git/info/lfs/objects/batch": x509: certificate signed by unknown authority
batch response
github.com/git-lfs/git-lfs/errors.newWrappedError
	D:/a/git-lfs/git-lfs/errors/types.go:198
github.com/git-lfs/git-lfs/errors.Wrap
	D:/a/git-lfs/git-lfs/errors/errors.go:74
github.com/git-lfs/git-lfs/tq.(*tqClient).Batch
	D:/a/git-lfs/git-lfs/tq/api.go:77
github.com/git-lfs/git-lfs/tq.Batch
	D:/a/git-lfs/git-lfs/tq/api.go:40
github.com/git-lfs/git-lfs/tq.(*TransferQueue).enqueueAndCollectRetriesFor
	D:/a/git-lfs/git-lfs/tq/transfer_queue.go:559
github.com/git-lfs/git-lfs/tq.(*TransferQueue).collectBatches.func1
	D:/a/git-lfs/git-lfs/tq/transfer_queue.go:453
runtime.goexit
	go/src/runtime/asm_amd64.s:1371
Error downloading data/README.md (b30a14a308f64c6fc2969e2b959d79dacdc5affda1d1c0e24f8e176304147146)
github.com/git-lfs/git-lfs/errors.newWrappedError
	D:/a/git-lfs/git-lfs/errors/types.go:198
github.com/git-lfs/git-lfs/errors.Wrapf
	D:/a/git-lfs/git-lfs/errors/errors.go:85
github.com/git-lfs/git-lfs/lfs.(*GitFilter).downloadFile
	D:/a/git-lfs/git-lfs/lfs/gitfilter_smudge.go:115
github.com/git-lfs/git-lfs/lfs.(*GitFilter).Smudge
	D:/a/git-lfs/git-lfs/lfs/gitfilter_smudge.go:76
github.com/git-lfs/git-lfs/commands.smudge
	D:/a/git-lfs/git-lfs/commands/command_smudge.go:127
github.com/git-lfs/git-lfs/commands.filterCommand
	D:/a/git-lfs/git-lfs/commands/command_filter_process.go:120
github.com/spf13/cobra.(*Command).execute
	go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766
github.com/spf13/cobra.(*Command).ExecuteC
	go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852
github.com/spf13/cobra.(*Command).Execute
	go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
github.com/git-lfs/git-lfs/commands.Run
	D:/a/git-lfs/git-lfs/commands/run.go:105
main.main
	D:/a/git-lfs/git-lfs/git-lfs.go:33
runtime.main
	go/src/runtime/proc.go:225
runtime.goexit
	go/src/runtime/asm_amd64.s:1371
Smudge error
github.com/git-lfs/git-lfs/errors.newWrappedError
	D:/a/git-lfs/git-lfs/errors/types.go:198
github.com/git-lfs/git-lfs/errors.NewSmudgeError
	D:/a/git-lfs/git-lfs/errors/types.go:284
github.com/git-lfs/git-lfs/lfs.(*GitFilter).Smudge
	D:/a/git-lfs/git-lfs/lfs/gitfilter_smudge.go:85
github.com/git-lfs/git-lfs/commands.smudge
	D:/a/git-lfs/git-lfs/commands/command_smudge.go:127
github.com/git-lfs/git-lfs/commands.filterCommand
	D:/a/git-lfs/git-lfs/commands/command_filter_process.go:120
github.com/spf13/cobra.(*Command).execute
	go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766
github.com/spf13/cobra.(*Command).ExecuteC
	go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852
github.com/spf13/cobra.(*Command).Execute
	go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
github.com/git-lfs/git-lfs/commands.Run
	D:/a/git-lfs/git-lfs/commands/run.go:105
main.main
	D:/a/git-lfs/git-lfs/git-lfs.go:33
runtime.main
	go/src/runtime/proc.go:225
runtime.goexit
	go/src/runtime/asm_amd64.s:1371

Current time in UTC: 
2023-02-27 20:23:10

ENV:
LocalWorkingDir=F:\GP_rel\VTK\ThirdParty\vtkm\vtkvtkm\vtk-m
LocalGitDir=F:\GP_rel\VTK\.git\modules\VTK-m
LocalGitStorageDir=F:\GP_rel\VTK\.git\modules\VTK-m
LocalMediaDir=F:\GP_rel\VTK\.git\modules\VTK-m\lfs\objects
LocalReferenceDirs=
TempDir=F:\GP_rel\VTK\.git\modules\VTK-m\lfs\tmp
ConcurrentTransfers=8
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=F:\GP_rel\VTK\.git\modules\VTK-m\lfs
AccessDownload=none
AccessUpload=none
DownloadTransfers=basic,lfs-standalone-file
UploadTransfers=basic,lfs-standalone-file
GIT_CONFIG_PARAMETERS=
GIT_DIR=F:/GP_rel/VTK/.git/modules/VTK-m
GIT_EXEC_PATH=C:/Program Files/Git/mingw64/libexec/git-core
GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough
GIT_PREFIX=
GIT_PROTOCOL_FROM_USER=0

I tried disabling git ssl verification in the folders. But that did not solve the issue. I am familiar with basic git needed to maintain a repository, but this feels above my level of knowledge.

Thanks for the detailed report.

Few questions to help further understand:

  • What is the version of Slicer specified in the top-level CMakeLists.txt ?

  • What are the global settings specific to git-lfs ?

    git config --global --get-regexp "filter.lfs.*"
    
  • Are you able to run the following command ?

    git clone https://gitlab.kitware.com/vtk/vtk-m.git
    

@jcfr Find reply to your questions.

  1. I do not have a slicer version. But the SHA I am using is 4f3d97c612b417cb8fe1c5688910f71d23a35852 (verified commit from Feb 21st)

  2. I am afraid I am unfamiliar with this. But the command did not return any output.

  3. Yes. I can clone it independently.

I made some progress on my end in the meanwhile. I was able to build VTK project independently in the solution after running the following command git config --global http.sslBackend schannel.

The next error to resolve is from CTK. When I build CTK, this is the error I get.

14>  -- Build files have been written to: F:/GP_rel/CTK-build/PythonQt-build
14>  No build step for 'PythonQt'
14>  Performing install step for 'PythonQt'
14>  CMake Error at cmake_install.cmake:43 (file):
14>    file INSTALL cannot find
14>    "F:/GP_rel/CTK-build/PythonQt-build/Release/PythonQt.dll": No error.

I disabled Slicer_USE_PYTHONQT_WITH_OPENSSL following instructions here, which I don’t think is the issue. I reinstalled Qt with all the components just in case. I am surprised this is giving me issues on Windows, but built without any issues on a Mac along with SlicerIGT extension.

So, this particular error is one that I have been seeing occasionally on windows custom app builds but have not been able to track down the source yet.

Workaround:
In F:/GP_rel/CTK-build/PythonQt-build run this command:
cmake --build . --config Release --target PythonQt

What is happening in that the higher level builds are not correctly triggering the PythonQt build for some reason. The cmake command will specifically build that target and then you can try the CTK build again.

Thank you for this.This built CTK. I still have some issues with pip not being found when I do ALL_BUILD. But that’s only affecting the python interactor. I can open the app and read tracking data now.

I believe the cause for a lot of my issues is the workstation being behind a company proxy. Even with admin privileges it is hard to get rid of network issues.

1 Like

Good to hear. Re: the CTK issue, @jcfr has narrowed it down to a regression with newer CMake version causing PythonQt to not build with the CTK superbuild, so there will be a fix merged for that in the near future.

Regression can be reproduced using the following project.

Waiting this is addressed, using CMake 3.24.3 is expected to work.

As a follow up, the commit introducing the regression in CMake has been reverted, a test case has been added, and the original issue has been re-opened.

A Slicer pull-request has also been created to report an error message if an unsupported CMake version is being used. Waiting CMake 3.25.3 is released, consider using 3.24.3.

See https://github.com/Slicer/Slicer/pull/6852

1 Like