# WinRPM doesn't build: Cannot parse XML file

**URL:** <https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841>\
**Category:** General Usage\
**Created:** [May 22, 2017, 7:17am UTC](https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841 "2017-05-22T07:17:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertdj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/robertdj/32/103_2.png) [@robertdj](https://discourse.julialang.org/u/robertdj)\
**Post date:** [May 22, 2017, 7:17am UTC](https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841/1 "2017-05-22T07:17:43Z")

</div>

Some time ago I successfully installed the [WinRPM](https://github.com/JuliaPackaging/WinRPM.jl).  
I recently ran into trouble with some packages and decided to wipe the package dir `v0.5`. Since then, I cannot install the WinRPM package (which I need for the HDF5 package):

```julia
julia> Pkg.build("WinRPM")
INFO: Building WinRPM
=============================================================================[ERROR: WinRPM]==============================================================================

LoadError: LoadError: InitError: "ErrorException(\"Error parsing document : 0\"), not well-formed (invalid token), 1, 9865, 9865"
during initialization of module WinRPM
while loading C:\Users\<user>\.julia\v0.5\WinRPM\src\WinRPM.jl, in expression starting on line 515
while loading C:\Users\<user>\.julia\v0.5\WinRPM\deps\build.jl, in expression starting on line 1

============================================================================================================================================================================

==============================================================================[BUILD ERRORS]==============================================================================

WARNING: WinRPM had build errors.

 - packages with build errors remain installed in C:\Users\<user>\.julia\v0.5
 - build the package(s) and all dependencies with `Pkg.build("WinRPM")`
 - build a single package by running its `deps/build.jl` script

============================================================================================================================================================================

```

Apparently, the first error occurs when parsing the file [https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE\_42.2/repodata/repomd.xml](https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win64/openSUSE_42.2/repodata/repomd.xml) with `LibExpat.xp_parse`.  
Was this XML file changed recently?

My computer info:

```julia
julia> versioninfo()
Julia Version 0.5.2
Commit f4c6c9d (2017-05-06 16:34 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, broadwell)

```

---

<div class="post-metadata">

**Author:** ![tkelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkelman/32/692_2.png) [@tkelman](https://discourse.julialang.org/u/tkelman)\
**Post date:** [June 1, 2017, 8:09am UTC](https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841/2 "2017-06-01T08:09:29Z")

</div>

When was the last time you ran `Pkg.update()` ? Do you have any local modifications to that package listed in `Pkg.status()` ?

---

<div class="post-metadata">

**Author:** ![robertdj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/robertdj/32/103_2.png) [@robertdj](https://discourse.julialang.org/u/robertdj)\
**Post date:** [June 1, 2017, 8:14am UTC](https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841/3 "2017-06-01T08:14:16Z")

</div>

I’ve just looked at the problem again and realized that you tagged a new version 7 days ago – a few days after my post. I’ll try to update now.

---

<div class="post-metadata">

**Author:** ![tkelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkelman/32/692_2.png) [@tkelman](https://discourse.julialang.org/u/tkelman)\
**Post date:** [June 1, 2017, 8:15am UTC](https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841/4 "2017-06-01T08:15:28Z")

</div>

Ah right, the edit made this show up in the /latest listing as if it were more recent than it actually was.

---

<div class="post-metadata">

**Author:** ![robertdj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/robertdj/32/103_2.png) [@robertdj](https://discourse.julialang.org/u/robertdj)\
**Post date:** [June 1, 2017, 8:21am UTC](https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841/5 "2017-06-01T08:21:22Z")

</div>

Actually, I’m still getting the same error even with the new XML from the updated openSUSE URL

I deleted `~/julia/v0.5` and ran `Pkg.add("WinRPM")` as the first command.

```julia
INFO: Building WinRPM
WARNING: skipping repodata/repomd.xml, not in cache -- call WinRPM.update() to download
WARNING: skipping repodata/repomd.xml, not in cache -- call WinRPM.update() to download
INFO: Downloading https://cache.julialang.org/http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_42.2/repodata/repomd.xml
===================================================[ERROR: WinRPM]====================================================

LoadError: "ErrorException(\"Error parsing document : 0\"), not well-formed (invalid token), 1, 9865, 9865"
while loading C:\Users\robert\.julia\v0.5\WinRPM\deps\build.jl, in expression starting on line 2

========================================================================================================================

====================================================[BUILD ERRORS]====================================================

WARNING: WinRPM had build errors.

 - packages with build errors remain installed in C:\Users\robert\.julia\v0.5
 - build the package(s) and all dependencies with `Pkg.build("WinRPM")`
 - build a single package by running its `deps/build.jl` script

========================================================================================================================
INFO: Package database updated

```

---

<div class="post-metadata">

**Author:** ![robertdj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/robertdj/32/103_2.png) [@robertdj](https://discourse.julialang.org/u/robertdj)\
**Post date:** [June 12, 2017, 6:54am UTC](https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841/6 "2017-06-12T06:54:06Z")

</div>

Anybody experiencing the same problem?  
I get this error even on a computer with a freshly installed Windows where Julia is the first program I install…

---

<div class="post-metadata">

**Author:** ![musm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/musm/32/3675_2.png) [@musm](https://discourse.julialang.org/u/musm)\
**Post date:** [June 12, 2017, 4:02pm UTC](https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841/7 "2017-06-12T16:02:27Z")

</div>

> [@robertdj](#):
>
> Anybody experiencing the same problem?

Yes see [windows 32 (\"Error parsing document : 0\"), no element found, 1, 1, 0" · Issue #104 · JuliaPackaging/WinRPM.jl · GitHub](https://github.com/JuliaPackaging/WinRPM.jl/issues/104)

Do you have reproducible test case that always throws that error? For me it shows up intermittently and thus hard to track the exact source of the problem.

---

<div class="post-metadata">

**Author:** ![robertdj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/robertdj/32/103_2.png) [@robertdj](https://discourse.julialang.org/u/robertdj)\
**Post date:** [June 13, 2017, 6:19pm UTC](https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841/8 "2017-06-13T18:19:41Z")

</div>

It shows up every time for me – ever since I commented on that issue 🙂

---

<div class="post-metadata">

**Author:** ![robertdj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/robertdj/32/103_2.png) [@robertdj](https://discourse.julialang.org/u/robertdj)\
**Post date:** [June 17, 2017, 7:15pm UTC](https://discourse.julialang.org/t/winrpm-doesnt-build-cannot-parse-xml-file/3841/9 "2017-06-17T19:15:47Z")

</div>

I finally resolved the problem by deleting the entire `~\.julia` folder… Just deleting e.g. `~\.julia\v0.5` wasn’t sufficient.
