Re: [Haskell-beginners] -with-rtsopts ignored at compile time

On Mon, Oct 21, 2013 at 8:01 AM, Kees Bleijenberg < k.bleijenberg@lijbrandt.nl> wrote:
When I run my program, I get a stack overflow message (current stacksize is 8388608 bytes) and the advice to use +RTS –Ksize -RTS****
The Haskell code creates a Windows dll, so no command line. That’s why I want to change the stack size at compile time.
I think the default RTS options are only settable in a compile that produces an executable; otherwise there would have to be a chunk of code that retrieved all the rtsopts from every Haskell-compiled DLL and somehow reconciled any conflicts between them. Also note that if the main program is in C, you don't get -with-rtsopts processing at all; see http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#using-o... how you set RTS options in this case. (See at "To use +RTS flags with hs_init()".) In this particular case you may be better off just using the %GHCRTS% environment variable. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

I understand the problem. I’ve set the GHCRTS environment variable and when I run the program I get : <unknown>: Most RTS options are disabled. Link with –rtsopts to enable them.
Then I added rtsopts to the command line: ghc -shared -rtsopts -O2 -o TBGlas.dll TBGlasDll.hs
and I get the same errormessage again: Most RTS options are…… What is the problem?
I’am using GHC version 7.4.2 in Windows.
Greetings,
Kees
Van: Beginners [mailto:beginners-bounces@haskell.org] Namens Brandon Allbery
Verzonden: maandag 21 oktober 2013 14:53
Aan: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell
Onderwerp: Re: [Haskell-beginners] -with-rtsopts ignored at compile time
On Mon, Oct 21, 2013 at 8:01 AM, Kees Bleijenberg
participants (2)
-
Brandon Allbery
-
Kees Bleijenberg