Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Compilation fails with Data.Numbers.Primes (Graham Enos)
2. Re: Compilation fails with Data.Numbers.Primes (Daniel Fischer)
----------------------------------------------------------------------
Message: 1
Date: Fri, 07 Jan 2011 11:51:32 -0500
From: Graham Enos <[email protected]>
Subject: [Haskell-beginners] Compilation fails with
Data.Numbers.Primes
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
Hi all,
I'm having trouble compiling (with GHC) a program that uses the
Data.Numbers.Primes package (newest, 0.2.0.0) on Mac OS X, 10.6. Any
help would be greatly appreciated!
It gets to the linking stage, and then complains of undefined symbols:
ghc -O2 counting_primes_200.hs
Undefined symbols:
"_primeszm0zi2zi0zi0_DataziNumbersziPrimes_primeFactorszuprimes1_closure",
referenced from:
_s1bm_info in counting_primes_200.o
_s1bv_info in counting_primes_200.o
_Main_main5_info in counting_primes_200.o
_Main_main2_srt in counting_primes_200.o
_Main_main5_srt in counting_primes_200.o
"___stginit_primeszm0zi2zi0zi0_DataziNumbersziPrimes_", referenced from:
___stginit_Main_ in counting_primes_200.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
It's probably not a problem with the program I'm trying to compile,
because runhaskell and ghci handle it fine (though I'd be happy to send
along the source to anyone interested). It's also not necessarily a
broken compiler, since GHC will compile simple throwaway stuff still and
I've installed the newest Haskell environment; this problem happened on
both my previous GHC installation and the newest. I was wondering if
anyone else was having linking problems with the primes package, and
what I could do to compile/link correctly. Thanks very much!
Best,
Graham
------------------------------
Message: 2
Date: Fri, 7 Jan 2011 18:01:11 +0100
From: Daniel Fischer <[email protected]>
Subject: Re: [Haskell-beginners] Compilation fails with
Data.Numbers.Primes
To: [email protected]
Cc: Graham Enos <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
On Friday 07 January 2011 17:51:32, Graham Enos wrote:
> Hi all,
>
> I'm having trouble compiling (with GHC) a program that uses the
> Data.Numbers.Primes package (newest, 0.2.0.0) on Mac OS X, 10.6. Any
> help would be greatly appreciated!
>
> It gets to the linking stage, and then complains of undefined symbols:
>
> ghc -O2 counting_primes_200.hs
Unless you're using GHC-7, you need the --make flag:
$ ghc -O2 --make counting_primes_200.hs
(or you can specify the used packages directly with the -package flag, but
--make is far more convenient).
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 31, Issue 5
****************************************