Opened 4 years ago

Closed 9 months 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 Revisions:

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 4 years ago.
example chart code -- needs chart-gtk to run
gistfile1.txt (2.2 KB) - added by carter 4 years ago.
directions for gtk building on lion

Download all attachments as: .zip

Change History (10)

Changed 4 years ago by carter

example chart code -- needs chart-gtk to run

Changed 4 years ago by carter

directions for gtk building on lion

comment:1 Changed 4 years ago by simonmar

  • difficulty set to Unknown

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

comment:2 Changed 3 years ago by pcapriotti

  • Milestone set to 7.6.1

comment:3 Changed 3 years ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:4 follow-up: Changed 2 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 2 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 14 months ago by thoughtpolice

  • Milestone changed from 7.6.2 to 7.10.1

Moving to 7.10.1.

comment:7 in reply to: ↑ 4 Changed 9 months ago by thomie

  • Milestone 7.10.1 deleted

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 9 months ago by thomie

  • Resolution set to worksforme
  • Status changed from new to closed

Actually closing.

Note: See TracTickets for help on using tickets.