<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-mailStijl17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=NL link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Tamar,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> I installed Haskell Platform 8.0.1. Now I can’t install snap any more. I want to use postgresql in snap.  Grrr.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If I get something working I’ll let you know.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Kees<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Van:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Phyx [mailto:lonetiger@gmail.com] <br><b>Ve</b></span><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>rzonden:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> donderdag 16 juni 2016 13:49<br><b>Aan:</b> K.Bleijenberg@lijbrandt.nl<br><b>CC:</b> haskell-cafe@haskell.org<br><b>Onderwerp:</b> partial solved problem installing postgreSQL-libpq on Windows?<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Hi Kees,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Would It be possible for you to try with GHC 7.10.3 or 8.0.1?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>A bunch of things have changed with the linker in these two versions which should make<o:p></o:p></p></div><div><p class=MsoNormal>linking against packages easier.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal> <command line>: can't load .so/.DLL for:<br> d:/PROGRA~2/POSTGR~1/9.3/lib\libpq.dll (addDLL: could not load DLL)<o:p></o:p></p></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal> ghc.exe: d:/PROGRA~2/POSTGR~1/9.3/lib\libpq: %1 is not a valid Win32<br> application.<o:p></o:p></p></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>This seems to be coming from the runtime linker, if indeed d:/PROGRA~2/POSTGR~1/9.3/lib\libpq.dll<o:p></o:p></p></div><div><p class=MsoNormal>can be found then either it's the wrong bitness/image type or libpq.dll has dependencies on other dlls.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>7.10.1 is not able to load these then as the search path won't be correct. To test this you can add<o:p></o:p></p></div><div><p class=MsoNormal>d:/PROGRA~2/POSTGR~1/9.3/lib\ to your path and try loading it again.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If that doesn't work and you want to know what's really going on, you can enable loader snaps<o:p></o:p></p></div><div><p class=MsoNormal>in gflags for GHC.exe and GHCi.exe (or runHaskell, what ever it is you're using) and attach a debugger like gdb<o:p></o:p></p></div><div><p class=MsoNormal>or windbg. <a href="https://msdn.microsoft.com/en-us/library/windows/hardware/ff556886(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/windows/hardware/ff556886(v=vs.85).aspx</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>You'll then be able to see the OS's trace messages for the loader and it should tell you exactly what's wrong.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal> >From the msys prompt: pexports "d:\program<br> files\postgreSQL\9.3\bin\libpq.dll" > libpq.def<o:p></o:p></p></blockquote><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal> >From the msys prompt: dlltool  -d libpq.def -l libpq.a<o:p></o:p></p></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> Import libraries are supported by the GHC but not ghci or any other interpreted mode (until 8.0.2)<o:p></o:p></p></div><div><p class=MsoNormal>So this would only work for the compiled program without Template Haskell.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Regards,<o:p></o:p></p></div><div><p class=MsoNormal>Tamar<o:p></o:p></p></div></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Geen virus gevonden in dit bericht.<br>Gecontroleerd door AVG - <a href="http://www.avg.com">www.avg.com</a><br>Versie: 2016.0.7640 / Virusdatabase: 4604/12430 - datum van uitgifte: 06/16/16<o:p></o:p></p></div></body></html>