Opened 6 years ago

Closed 3 years ago

#5841 closed bug (worksforme)

seg fault in ghci but not ghc when using chart-gtk code

Reported by: carter Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.4.1
Keywords: Cc:
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #5816 Differential Rev(s):
Wiki Page:

Description

I don't know if this is os x lion specific, but when running (attached .hs file) after compiling with (attached .txt) directions, the program compiled with ghc to a binary will work when set to generate either a pdf or a x11 window. In contrast, the same program when run via ghci and set to render to an x11 window, it segfaults. The ghci run when set to output to pdf works fine though. So I think the problem (perhaps, but perhaps not) might be with how the gtk package uses the ffi when run via ghci vs ghc? (so perhaps is a static vs dynamic linking issue).

it does seem like this might in some way related to another linking bug on mac http://hackage.haskell.org/trac/ghc/ticket/5816#comment:4

Attachments (2)

test.hs (1014 bytes) - added by carter 6 years ago.
example chart code -- needs chart-gtk to run
gistfile1.txt (2.2 KB) - added by carter 6 years ago.
directions for gtk building on lion

Download all attachments as: .zip

Change History (10)

Changed 6 years ago by carter

Attachment: test.hs added

example chart code -- needs chart-gtk to run

Changed 6 years ago by carter

Attachment: gistfile1.txt added

directions for gtk building on lion

comment:1 Changed 6 years ago by simonmar

difficulty: Unknown

Note that GHCi is running the program with -threaded, I'm not sure if that has any bearing or not.

comment:2 Changed 5 years ago by pcapriotti

Milestone: 7.6.1

comment:3 Changed 5 years ago by igloo

Milestone: 7.6.17.6.2

comment:4 Changed 4 years ago by carter

has anyone tested this or one of the many other ghci problematical codes against ghci in ghc head yet?

My understanding is that the switch to dylibs for ghci should resolve many of the "funny problems with ghci" bugs people have had over the years.

comment:5 Changed 4 years ago by carter

this issue is probably solved with ghci in head, but someone (perhaps me) needs to test it out!

comment:6 Changed 3 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:7 in reply to:  4 Changed 3 years ago by thomie

Milestone: 7.10.1

Replying to carter:

My understanding is that the switch to dylibs for ghci should resolve many of the "funny problems with ghci" bugs people have had over the years.

Indeed, let's close this.

For anyone reading this in the future: please re-open this ticket or open a new ticket when you have any kind linking problem with GHC on OS X.

comment:8 Changed 3 years ago by thomie

Resolution: worksforme
Status: newclosed

Actually closing.

Note: See TracTickets for help on using tickets.