[ghci] unknown symbol in base-unicode-symbols-0.2.1.2 ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[ghci] unknown symbol in base-unicode-symbols-0.2.1.2 ...

John Obbele
Hi everyone !

I'm having a problem in GHCi when loading modules relying on the
base-unicode-symbols package. My prompt gives me the following
message:


>> ghci $
GHCi, version 7.0.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m +System.USB
Prelude System.USB> newCtx
Loading package array-0.3.0.2 ... linking ... done.
Loading package containers-0.4.0.0 ... linking ... done.
Loading package deepseq-1.1.0.2 ... linking ... done.
Loading package bytestring-0.9.1.10 ... linking ... done.
Loading package text-0.11.0.5 ... linking ... done.
Loading package base-unicode-symbols-0.2.1.2 ... linking ... <interactive>: /home/john/.cabal/lib/base-unicode-symbols-0.2.1.2/ghc-7.0.2/HSbase-unicode-symbols-0.2.1.2.o: unknown symbol `__stginit_basezmunicodezmsymbolszm0zi2zi1zi2_ControlziCategoryziUnicode_'
ghc: unable to load package `base-unicode-symbols-0.2.1.2'
Prelude System.USB>


I thought this was due to me screwing around cabal/ghc-pkg caches
but after a fresh install of Fedora15-alpha / cabal update /
cabal install usb I'm still getting the same error.

Moreover, a quick `nm HSbase-unicode-symbols-*.o | grep
ControlziCategoryziUnicode` give me the following output.


>> nm HSbase-unicode-symbols-0.2.1.2.o | grep -C 4 'ControlziCategoryziUnicode_'
0000000000000070 T __stginit_basezmunicodezmsymbolszm0zi2zi1zi2_ControlziApplicativeziUnicode
0000000000000040 T __stginit_basezmunicodezmsymbolszm0zi2zi1zi2_ControlziApplicativeziUnicode_
0000000000000120 T __stginit_basezmunicodezmsymbolszm0zi2zi1zi2_ControlziArrowziUnicode
00000000000000d8 T __stginit_basezmunicodezmsymbolszm0zi2zi1zi2_ControlziArrowziUnicode_
                 U __stginit_basezmunicodezmsymbolszm0zi2zi1zi2_ControlziCategoryziUnicode_
00000000000001b8 T __stginit_basezmunicodezmsymbolszm0zi2zi1zi2_ControlziMonadziUnicode
0000000000000188 T __stginit_basezmunicodezmsymbolszm0zi2zi1zi2_ControlziMonadziUnicode_
0000000000000250 T __stginit_basezmunicodezmsymbolszm0zi2zi1zi2_DataziBoolziUnicode
0000000000000220 T __stginit_basezmunicodezmsymbolszm0zi2zi1zi2_DataziBoolziUnicode_


Could someone please explain to me what's happening ?

regards,
/John

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: [ghci] unknown symbol in base-unicode-symbols-0.2.1.2 ...

John Obbele
On Wed, Mar 30, 2011 at 10:37:47PM +0200, John Obbele wrote:
> I'm having a problem in GHCi when loading modules relying on the
> base-unicode-symbols package. My prompt gives me the following
> message:
>
> >> ghci $
> Loading package base-unicode-symbols-0.2.1.2 ... linking ... <interactive>: /home/john/.cabal/lib/base-unicode-symbols-0.2.1.2/ghc-7.0.2/HSbase-unicode-symbols-0.2.1.2.o: unknown symbol `__stginit_basezmunicodezmsymbolszm0zi2zi1zi2_ControlziCategoryziUnicode_'
> ghc: unable to load package `base-unicode-symbols-0.2.1.2'


Oki, so I'm answering to myself: the base-unicode-symbols cabal
file introduces a quirk concerning 'base' version which hides the
symbols in Control.Category.Unicode.

>> base-unicode-symbols.cabal -- line 42-46
  if !flag(old-base)
    build-depends: base >= 3.0 && < 4.4
  else
    build-depends: base >= 3.0.3.1 && < 4.4
    exposed-modules: Control.Category.Unicode

I should contact the maintainer about this …

regards,
/john

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: [ghci] unknown symbol in base-unicode-symbols-0.2.1.2 ...

Roel van Dijk-3
I can reproduce the problem on my system with GHC-7.0.3.

The flag old-base is meant for base libraries before 3.0.3.1 which
didn't export a Control.Category module. It looks like I accidentally
inverted the logic of the flag. What is weird is that is still builds
okay on my system. I would expect that, given the inverted flag logic,
Control.Category.Unicode would be missing from the installed package's
exposed module list.

I fixed the logic of the flag and the bug appears to be gone. I
uploaded the fixed version 0.2.1.3.

Thanks for the bug report!


On 31 March 2011 00:05, John Obbele <[hidden email]> wrote:

> On Wed, Mar 30, 2011 at 10:37:47PM +0200, John Obbele wrote:
>> I'm having a problem in GHCi when loading modules relying on the
>> base-unicode-symbols package. My prompt gives me the following
>> message:
>>
>> >> ghci $
>> Loading package base-unicode-symbols-0.2.1.2 ... linking ... <interactive>: /home/john/.cabal/lib/base-unicode-symbols-0.2.1.2/ghc-7.0.2/HSbase-unicode-symbols-0.2.1.2.o: unknown symbol `__stginit_basezmunicodezmsymbolszm0zi2zi1zi2_ControlziCategoryziUnicode_'
>> ghc: unable to load package `base-unicode-symbols-0.2.1.2'
>
>
> Oki, so I'm answering to myself: the base-unicode-symbols cabal
> file introduces a quirk concerning 'base' version which hides the
> symbols in Control.Category.Unicode.
>
>>> base-unicode-symbols.cabal -- line 42-46
>  if !flag(old-base)
>    build-depends: base >= 3.0 && < 4.4
>  else
>    build-depends: base >= 3.0.3.1 && < 4.4
>    exposed-modules: Control.Category.Unicode
>
> I should contact the maintainer about this …

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe