Opened 12 years ago

Last modified 12 years ago

#34470 assigned defect

xgraph segmentation fault — at Version 1

Reported by: jursonovicst@… Owned by: ryandesign@…
Priority: Normal Milestone:
Component: ports Version: 2.1.0
Keywords: Cc:
Port: xgraph

Description (last modified by ryandesign (Ryan Carsten Schmidt))

xgraph -device ps -o test2-ps test.data
Segmentation fault: 11

Could you apply the segmentation fault solution described by http://djconnel.blogspot.de/2012/03/installing-xgraph-on-mac-osx-lion.html, please?

But then I faced a tougher problem: I was getting a persistent segmentation fault when I ran it. gdb wasn't turning up the problem, either.

The clue was in the compiler warnings: xgraph plays fast and loose with casting between addresses and integers. Sometimes that works, sometimes... So in desperation I checked the gcc man page and started reading, looking for an option which treated all integers as longs. I didn't think this would work, because external libraries might not cooperate.

I didn't find it. But what I found instead was the "-m32" option to compile the code in 32-bit mode even on a 64-bit machine. Hmm... seemed promising. I added this to the head of the "CFLAGS" definition in Makefile (Makefile having been generated with "configure", so this isn't the best approach). I tried it and, ding-ding-ding-ding, the code ran. My little victory shout was probably out of place, since I was on Caltrain at the time...

So now it works.

Thank you for fixing the build issue yesterday...

Tamás

Change History (2)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: xgraph.diff added
Note: See TracTickets for help on using tickets.