<div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Try doing</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"> </div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">  cabal update</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">and then compiling</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 11, 2021 at 5:12 PM David Duke <<a href="mailto:duke.j.david@gmail.com">duke.j.david@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Thanks Dominic George for that. I had env var set. iconv --version gives GNU libiconv 1.16</div><div dir="ltr">I created a clean shell so env vars set other than PATH and installed using the tarball on the link George  provided.<div>It appeared to install okay . However trying to compile throws up:</div><div><p style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85)"><span style="font-variant-ligatures:no-common-ligatures">cannot satisfy -package-id ghc-9.0.1</span></p></div><div>compiling with -v:</div><div><p style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85)"><br></p>
<p style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85)"><span style="font-variant-ligatures:no-common-ligatures">Loaded package environment from /Users/scsdjd/.ghc/x86_64-darwin-9.0.1/environments/default</span></p>
<p style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85)"><span style="font-variant-ligatures:no-common-ligatures">Glasgow Haskell Compiler, Version 9.0.1, stage 2 booted by GHC version 8.8.4</span></p>
<p style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85)"><span style="font-variant-ligatures:no-common-ligatures">*** initializing unit database:</span></p>
<p style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85)"><span style="font-variant-ligatures:no-common-ligatures">There is no package.cache in /usr/local/lib/ghc-9.0.1/package.conf.d, checking if the database is empty</span></p>
<p style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85)"><span style="font-variant-ligatures:no-common-ligatures">There are no .conf files in /usr/local/lib/ghc-9.0.1/package.conf.d, treating package database as empty</span></p>
<p style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85)"><span style="font-variant-ligatures:no-common-ligatures">Using binary package database: /Users/scsdjd/.cabal/store/ghc-9.0.1/package.db/package.cache</span></p>
<p style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:Monaco;color:rgb(242,242,242);background-color:rgba(0,0,0,0.85)"><span style="font-variant-ligatures:no-common-ligatures">package flags [-package-id ghc-9.0.1{unit ghc-9.0.1 True ([])},</span></p></div></div><div><br></div><div>regards,</div><div>David</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 11, 2021 at 3:52 PM George Colpitts <<a href="mailto:george.colpitts@gmail.com" target="_blank">george.colpitts@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:"times new roman",serif;font-size:large">Hi David</div><div style="font-family:"times new roman",serif;font-size:large"><br></div><div style="font-family:"times new roman",serif;font-size:large">I've also used ghc for years on Mac OS and have also never seen this problem. I don't use nix. Currently I am on ghc 9.0.1. and Mac OS 11.6. I installed from  </div><br>    <a href="https://downloads.haskell.org/ghc/9.0.1/" rel="noreferrer" target="_blank">https://downloads.haskell.org/ghc/9.0.1/</a><div><br></div><div><div style="font-family:"times new roman",serif;font-size:large">More specifically <a href="https://downloads.haskell.org/ghc/9.0.1/ghc-9.0.1-x86_64-apple-darwin.tar.xz" style="font-family:Arial,Helvetica,sans-serif;font-size:small" target="_blank">ghc-9.0.1-x86_64-apple-darwin.tar.xz</a> </div><div style="font-family:"times new roman",serif;font-size:large"><br></div><div style="font-family:"times new roman",serif;font-size:large">Are any of the following env variables defined on your system?</div><div style="font-family:"times new roman",serif;font-size:large"><br></div><div style="font-family:"times new roman",serif;font-size:large">       LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, and DYLD_FALLBACK_LIBRARY_PATH</div><div style="font-family:"times new roman",serif;font-size:large"><br></div><div style="font-family:"times new roman",serif;font-size:large">None are defined on my system which I think is normal.</div><div style="font-family:"times new roman",serif;font-size:large"><br></div><div style="font-family:"times new roman",serif;font-size:large">When you type </div><div style="font-family:"times new roman",serif;font-size:large"><br></div><div style="font-family:"times new roman",serif;font-size:large">  iconv --version </div><div style="font-family:"times new roman",serif;font-size:large"><br></div><div style="font-family:"times new roman",serif;font-size:large">What output do you get? I get </div><div style="font-family:"times new roman",serif;font-size:large"><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div style="font-family:"times new roman",serif;font-size:large"> iconv --version</div></div><div><div style="font-family:"times new roman",serif;font-size:large">iconv (GNU libiconv 1.11)</div></div><div><div style="font-family:"times new roman",serif;font-size:large">Copyright (C) 2000-2006 Free Software Foundation, Inc.</div></div><div><div style="font-family:"times new roman",serif;font-size:large">This is free software; see the source for copying conditions.  There is NO</div></div><div><div style="font-family:"times new roman",serif;font-size:large">warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</div></div><div><div style="font-family:"times new roman",serif;font-size:large">Written by Bruno Haible.</div></div></blockquote><div><div style="font-family:"times new roman",serif;font-size:large"><br></div><div style="font-family:"times new roman",serif;font-size:large">Not sure if my questions will help but I think there is something unusual about your system configuration.</div><div style="font-family:"times new roman",serif;font-size:large"><br></div><div style="font-family:"times new roman",serif;font-size:large">Cheers</div><div style="font-family:"times new roman",serif;font-size:large">George</div><div style="font-family:"times new roman",serif;font-size:large"><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 11, 2021 at 9:38 AM Dominic Steinitz <<a href="mailto:dominic@steinitz.org" target="_blank">dominic@steinitz.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi David<div><br></div><div>I am a long time user of ghc on OSX. I have seen that problem but never on native OSX only when using nix (and then I added it explicitly).</div><div><br></div><div>Two things spring to mind:</div><div><ol><li>Add it explicitly on the compile command `-liconv`</li><li>Use nix and then you can control the build environment in a totally controllable and reproducible manner. This is actually easier than it sounds: `curl <a href="https://nixos.org/nix/install" target="_blank">https://nixos.org/nix/install</a> | sh` and `nix-env -I ghc`. If you get the same error with that then we can try adding `iconv` explicitly.</li></ol></div><div><div>
<div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"> Dominic Steinitz<br><a href="mailto:dominic@steinitz.org" target="_blank">dominic@steinitz.org</a><br><a href="http://idontgetoutmuch.org" target="_blank">http://idontgetoutmuch.org</a><br>Twitter: @idontgetoutmuch</div>

</div>
<div><br><blockquote type="cite"><div><div><br>I have a conundrum on which advice would be appreciate. Does<br>anyone know how to successfully install ghc on OSX<br>I've tried various binary instalation routes:<br>macports, brew, direct binary downloads from <a href="http://haskel.org" target="_blank">haskel.org</a><br>All have the same result. when I try to compile a basic hello world program<br>I get<br><br>Undefined symbols for architecture x86_64:<br>  "_iconv", referenced from:<br><br><br>I've triedgiong  through ghcup<br><br>8.8.4<br>8.6.5.<br>8.10.2<br>8.10.7<br>9.0.1<br><br>all have the same problem.<br>I'd be happy to build from source. Small problem: what Haskell compiler do<br>I use?<br><br>Any advice on installs that works along with any changes to paths to avoid<br>the iconv problems would be appreciated as currently my Haskell-related<br>activities have come to a grinding halt. Switchig to a different OS would<br>be nice but its not a<br>feasible option a at present.Writing a compiler is starting to look<br>attractive..<br><br>thanks<br>David<br><br>-- <br>David Duke<br>Emeritus Professor of Computer Science<br>School of Computing University of Leeds UK<br>E:<a href="mailto:duke.j.david@gmail.com" target="_blank">duke.j.david@gmail.com</a><br>W:<a href="https://engineering.leeds.ac.uk/staff/334/Professor_David_Duke" target="_blank">https://engineering.leeds.ac.uk/staff/334/Professor_David_Duke</a><br></div></div></blockquote></div><br></div></div>_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org" target="_blank">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users</a><br>
</blockquote></div>
_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org" target="_blank">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>David Duke</div><div>Emeritus Professor of Computer Science</div><div>School of Computing University of Leeds UK</div><div><a href="mailto:E%3Aduke.j.david@gmail.com" target="_blank">E:duke.j.david@gmail.com</a></div><div>W:<a href="https://engineering.leeds.ac.uk/staff/334/Professor_David_Duke" target="_blank">https://engineering.leeds.ac.uk/staff/334/Professor_David_Duke</a></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>