Opened 9 years ago

Closed 9 years ago

#5114 closed bug (fixed)

-with-rtsopts, ghc_rts_opts not honoured

Reported by: guest Owned by:
Priority: normal Milestone: 7.2.1
Component: Runtime System Version: 7.0.3
Keywords: Cc: trebla@…
Operating System: Linux Architecture: x86
Type of failure: Incorrect result at runtime Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

using -with-rtsopts or ghc_rts_opts to build a program, the program subsequently aborts with "Most RTS options are disabled. Link with -rtsopts to enable them." I don't have the environment variable GHCRTS.

$ echo 'main = print (foldl1 (+) [1..100000])' > main.hs
$ ghc --make -with-rtsopts='-K1m' main.hs
$ ./main
main: Most RTS options are disabled. Link with -rtsopts to enable them.
$ rm main main.hi main.o
$ echo 'char *ghc_rts_opts = "-K1m";' > ro.c
$ ghc --make main.hs ro.c
$ ./main
main: Most RTS options are disabled. Link with -rtsopts to enable them.

I obtained ghc from the generic binary tarball for linux x86 32-bit.

This is present in both 7.0.2 and 7.0.3. I don't know about 7.0.1.

Change History (2)

comment:1 Changed 9 years ago by maeder

Does compiling as follows work?

ghc --make -rtsopts main.hs
./main ++RTS -K1m

comment:2 Changed 9 years ago by simonmar

Component: CompilerRuntime System
Milestone: 7.2.1
Resolution: fixed
Status: newclosed

I fixed this recently: changeset:5463b55b7dadc1e9918edb2d8666bf3ed195bc61

I'll push a test shortly.

Note: See TracTickets for help on using tickets.