Glasgow-haskell-users Digest, Vol 212, Issue 5

George Colpitts george.colpitts at gmail.com
Tue Oct 12 12:35:21 UTC 2021


Try doing

  cabal update

and then compiling



On Mon, Oct 11, 2021 at 5:12 PM David Duke <duke.j.david at gmail.com> wrote:

> Thanks Dominic George for that. I had env var set. iconv --version gives
> GNU libiconv 1.16
> I created a clean shell so env vars set other than PATH and installed
> using the tarball on the link George  provided.
> It appeared to install okay . However trying to compile throws up:
>
> cannot satisfy -package-id ghc-9.0.1
> compiling with -v:
>
>
> Loaded package environment from
> /Users/scsdjd/.ghc/x86_64-darwin-9.0.1/environments/default
>
> Glasgow Haskell Compiler, Version 9.0.1, stage 2 booted by GHC version
> 8.8.4
>
> *** initializing unit database:
>
> There is no package.cache in /usr/local/lib/ghc-9.0.1/package.conf.d,
> checking if the database is empty
>
> There are no .conf files in /usr/local/lib/ghc-9.0.1/package.conf.d,
> treating package database as empty
>
> Using binary package database:
> /Users/scsdjd/.cabal/store/ghc-9.0.1/package.db/package.cache
>
> package flags [-package-id ghc-9.0.1{unit ghc-9.0.1 True ([])},
>
> regards,
> David
>
> On Mon, Oct 11, 2021 at 3:52 PM George Colpitts <george.colpitts at gmail.com>
> wrote:
>
>> Hi David
>>
>> 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
>>
>>     https://downloads.haskell.org/ghc/9.0.1/
>>
>> More specifically ghc-9.0.1-x86_64-apple-darwin.tar.xz
>> <https://downloads.haskell.org/ghc/9.0.1/ghc-9.0.1-x86_64-apple-darwin.tar.xz>
>>
>>
>> Are any of the following env variables defined on your system?
>>
>>        LD_LIBRARY_PATH, DYLD_LIBRARY_PATH, and DYLD_FALLBACK_LIBRARY_PATH
>>
>> None are defined on my system which I think is normal.
>>
>> When you type
>>
>>   iconv --version
>>
>> What output do you get? I get
>>
>>  iconv --version
>> iconv (GNU libiconv 1.11)
>> Copyright (C) 2000-2006 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE.
>> Written by Bruno Haible.
>>
>>
>> Not sure if my questions will help but I think there is something unusual
>> about your system configuration.
>>
>> Cheers
>> George
>>
>>
>>
>> On Mon, Oct 11, 2021 at 9:38 AM Dominic Steinitz <dominic at steinitz.org>
>> wrote:
>>
>>> Hi David
>>>
>>> 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).
>>>
>>> Two things spring to mind:
>>>
>>>    1. Add it explicitly on the compile command `-liconv`
>>>    2. 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 https://nixos.org/nix/install | sh` and `nix-env -I
>>>    ghc`. If you get the same error with that then we can try adding `iconv`
>>>    explicitly.
>>>
>>>  Dominic Steinitz
>>> dominic at steinitz.org
>>> http://idontgetoutmuch.org
>>> Twitter: @idontgetoutmuch
>>>
>>>
>>> I have a conundrum on which advice would be appreciate. Does
>>> anyone know how to successfully install ghc on OSX
>>> I've tried various binary instalation routes:
>>> macports, brew, direct binary downloads from haskel.org
>>> All have the same result. when I try to compile a basic hello world
>>> program
>>> I get
>>>
>>> Undefined symbols for architecture x86_64:
>>>  "_iconv", referenced from:
>>>
>>>
>>> I've triedgiong  through ghcup
>>>
>>> 8.8.4
>>> 8.6.5.
>>> 8.10.2
>>> 8.10.7
>>> 9.0.1
>>>
>>> all have the same problem.
>>> I'd be happy to build from source. Small problem: what Haskell compiler
>>> do
>>> I use?
>>>
>>> Any advice on installs that works along with any changes to paths to
>>> avoid
>>> the iconv problems would be appreciated as currently my Haskell-related
>>> activities have come to a grinding halt. Switchig to a different OS would
>>> be nice but its not a
>>> feasible option a at present.Writing a compiler is starting to look
>>> attractive..
>>>
>>> thanks
>>> David
>>>
>>> --
>>> David Duke
>>> Emeritus Professor of Computer Science
>>> School of Computing University of Leeds UK
>>> E:duke.j.david at gmail.com
>>> W:https://engineering.leeds.ac.uk/staff/334/Professor_David_Duke
>>>
>>>
>>> _______________________________________________
>>> Glasgow-haskell-users mailing list
>>> Glasgow-haskell-users at haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
>>>
>> _______________________________________________
>> Glasgow-haskell-users mailing list
>> Glasgow-haskell-users at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
>>
>
>
> --
> David Duke
> Emeritus Professor of Computer Science
> School of Computing University of Leeds UK
> E:duke.j.david at gmail.com
> W:https://engineering.leeds.ac.uk/staff/334/Professor_David_Duke
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20211012/2f5396ad/attachment.html>


More information about the Glasgow-haskell-users mailing list