# Slicer custom app build error

**URL:** https://discourse.slicer.org/t/slicer-custom-app-build-error/28026
**Category:** Development
**Tags:** slicercat
**Created:** [February 23, 2023, 9:43pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026 "2023-02-23T21:43:16Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![sm-philips](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sm-philips/32/18269_2.png) [@sm-philips](https://discourse.slicer.org/u/sm-philips)
#### Post date: [February 23, 2023, 9:43pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026/1 "2023-02-23T21:43:16Z")

</div>

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/](https://www.kitware.com/slicercat-creating-custom-applications-based-on-3d-slicer/)

When building, I get the following error:

```auto
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

```

```auto
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:

```auto
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!

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [February 24, 2023, 7:58pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026/2 "2023-02-24T19:58:10Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![sm-philips](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sm-philips/32/18269_2.png) [@sm-philips](https://discourse.slicer.org/u/sm-philips)
#### Post date: [February 27, 2023, 8:28pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026/3 "2023-02-27T20:28:06Z")

</div>

@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.

```auto
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:

```auto
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.

---

<div class="post-metadata">

### Author: ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)
#### Post date: [February 27, 2023, 10:03pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026/4 "2023-02-27T22:03:10Z")

</div>

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` ?

- Are you able to run the following command ?

---

<div class="post-metadata">

### Author: ![sm-philips](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sm-philips/32/18269_2.png) [@sm-philips](https://discourse.slicer.org/u/sm-philips)
#### Post date: [March 1, 2023, 2:39pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026/5 "2023-03-01T14:39:17Z")

</div>

@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.

```auto
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](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/common_errors.html), 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.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [March 1, 2023, 4:17pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026/6 "2023-03-01T16:17:57Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![sm-philips](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sm-philips/32/18269_2.png) [@sm-philips](https://discourse.slicer.org/u/sm-philips)
#### Post date: [March 2, 2023, 2:49pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026/7 "2023-03-02T14:49:39Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)
#### Post date: [March 2, 2023, 3:16pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026/8 "2023-03-02T15:16:21Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)
#### Post date: [March 2, 2023, 5:19pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026/9 "2023-03-02T17:19:44Z")

</div>

Regression can be reproduced using the following project.

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

> **[GitHub - jcfr/cmake-ExternalProject-install-step-regression: Reproduce a...](https://github.com/jcfr/cmake-ExternalProject-install-step-regression)**
>
> Reproduce a regression introduced in CMake v3.25 through kitware/cmake@66b5d51f3 - GitHub - jcfr/cmake-ExternalProject-install-step-regression: Reproduce a regression introduced in CMake v3.25 thro...

---

<div class="post-metadata">

### Author: ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)
#### Post date: [March 2, 2023, 9:34pm UTC](https://discourse.slicer.org/t/slicer-custom-app-build-error/28026/10 "2023-03-02T21:34:04Z")

</div>

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](https://github.com/Slicer/Slicer/pull/6852)
