Package: libghc6-cabal-dev
Severity: normal

From: Arthur Baars
Subject: Cabal: GHC package on Mac OSX
To: [EMAIL PROTECTED]

Hi Isaac,

I have been experimenting with Haskell Cabal today. Really neat stuff!

I ran into a problem with the generated library archive:

> ld: archive: /usr/local/lib/uust-1.0/libHSuust-1.0.a has no table of
> contents,
>  add one with ranlib(1) (can't load from it)

If I do as "ld" suggests and call ranlib on the thing, it works.

I guess this is a Mac OSX specific problem. Maybe you can fix it in
Cabal.

Cheers,

Arthur
------------------------------------------------------------
> Is this an error that happens when cabal is linking the archive?
No. The generated GHCi package works fine.

> Is this with GHC 6.4?
Yes:
> ghc --make Main -o prog
> Chasing modules from: Test
> Compiling  Main             ( Test.hs, Test.o )
> Linking ...
> ld: archive: /usr/local/lib/uust-1.0/libHSuust-1.0.a has no table of
> contents, add one with ranlib(1) (can't load from it)

>  Is it a warning, or just an error?
It is an error, no output file ("prog") is generated.

> Can you show me how you run ranlib?

That's easy:
  ranlib /usr/local/lib/uust-1.0/libHSuust-1.0.a

> Any idea why OS X needs this index?

I have no idea. Maybe you can ask Wolgang
Thaller([EMAIL PROTECTED]), he's the Mac OS wizard.

> I have ranlib on my Linux machine, and it sounds like it's just an
> optimization.
> Does the .a file work even if you don't run ranlib on it?
No.
Well, it is good enough for creating the GHCi library. But "ld"
refuses to link, when building an executable.

Arthur



-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.21
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to