title: Haskell package persistent-sqlite fails to install in Windows with ld error
body: <p>Trying either one of the following commands in my Win7 system fails.</p>
  
  <pre><code>$ stack install persistent-sqlite
  $ cabal install persistent-sqlite
  </code></pre>
  
  <p>The error is some rather opaque <code>ld</code> related thing.</p>
  
  <pre><code>Resolving dependencies...
  Configuring persistent-sqlite-2.2...
  Building persistent-sqlite-2.2...
  Failed to install persistent-sqlite-2.2
  Build log ( C:\Users\TR@FI_02\AppData\Roaming\cabal\logs\persistent-sqlite-2.2.log ):
  Building persistent-sqlite-2.2...
  Preprocessing library persistent-sqlite-2.2...
  [1 of 2] Compiling Database.Sqlite  ( Database\Sqlite.hs, dist\build\Database\Sqlite.o )
  C:\Users\TR@FI_02\AppData\Local\Temp\ghc4324_0\ghc4324_9.ldscript: file not recognized: File format not recognized
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p>I have no clue what a possible cause might be. Can anyone reproduce this on their system? Where could I start looking to fix this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>The log mentioned in the output contains the same information:</p>
  
  <pre><code>Building persistent-sqlite-2.2...
  Preprocessing library persistent-sqlite-2.2...
  [1 of 2] Compiling Database.Sqlite  ( Database\Sqlite.hs, dist\build\Database\Sqlite.o )
  C:\Users\TR@FI_02\AppData\Local\Temp\ghc4324_0\ghc4324_9.ldscript: file not recognized: File format not recognized
  collect2: ld returned 1 exit status
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>This is potentially a rare bug limited to two win7 installations on two PCs I have here. I was not able to consistently reproduce the failure on <em>every</em> win7 system.</p>