# Solved: Address build error related to overwritten 'setup.cfg'

**URL:** <https://discourse.slicer.org/t/solved-address-build-error-related-to-overwritten-setup-cfg/1231>\
**Category:** Development\
**Tags:** build\
**Created:** [October 16, 2017, 5:39am UTC](https://discourse.slicer.org/t/solved-address-build-error-related-to-overwritten-setup-cfg/1231 "2017-10-16T05:39:40Z")\
**Posts on this page:** 6\
**Page:** 1

<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:** [October 16, 2017, 5:39am UTC](https://discourse.slicer.org/t/solved-address-build-error-related-to-overwritten-setup-cfg/1231/1 "2017-10-16T05:39:40Z")

</div>

Following [r26470](http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=26470), we update the version of setuptools used in Slicer, as a side effect you may get an error like the one reported below.

To address the problem

```auto
cd Slicer-Superbuild/python-setuptools
git reset --hard HEAD

```

Error:

```auto
error: Your local changes to the following files would be overwritten by checkout:
	setup.cfg
Please, commit your changes or stash them before you can switch branches.
Aborting
CMake Error at /home/jcfr/Projects/Slicer-2-Qt5-VTK8-build/python-setuptools-prefix/tmp/python-setuptools-gitupdate.cmake:147 (message):
  Failed to checkout tag:

```

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 17, 2017, 8:45pm UTC](https://discourse.slicer.org/t/solved-address-build-error-related-to-overwritten-setup-cfg/1231/2 "2017-10-17T20:45:16Z")

</div>

I’m getting this error too frequently and it is quite annoying. Would it be possible to patch the file outside the source tree or somehow suppress this error automatically?

---

<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:** [October 17, 2017, 8:49pm UTC](https://discourse.slicer.org/t/solved-address-build-error-related-to-overwritten-setup-cfg/1231/3 "2017-10-17T20:49:36Z")

</div>

> [@lassoan](#):
>
> I’m getting this error too frequently and it is quite annoying. Would it be possible to patch the file outside the source tree or somehow suppress this error automatically?

We could also make a release and download a zip of the version of setuptools.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 17, 2017, 8:53pm UTC](https://discourse.slicer.org/t/solved-address-build-error-related-to-overwritten-setup-cfg/1231/4 "2017-10-17T20:53:53Z")

</div>

Yes, that would work.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 23, 2017, 5:06pm UTC](https://discourse.slicer.org/t/solved-address-build-error-related-to-overwritten-setup-cfg/1231/5 "2017-10-23T17:06:34Z")

</div>

@jcfr Could you please address this issue? I use scripts for building Slicer and this bug keeps making those fail and require me to go manually and fix the problem. I’ve also added a ticket to track its resolution: [https://issues.slicer.org/view.php?id=4466](https://issues.slicer.org/view.php?id=4466)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 26, 2017, 8:46pm UTC](https://discourse.slicer.org/t/solved-address-build-error-related-to-overwritten-setup-cfg/1231/6 "2017-10-26T20:46:22Z")

</div>

@jcfr has fixed the problem in recent nightly version.
