Kevin Nowaczyk - 2014-04-28

I've spent a few hours trying to get xoscope working on my MacBook Pro and I thought I'd share my experience. It compiles, but currently Segfaults.

First I ran ./configure and was told that I needed GTK. I installed Homebrew:

ruby -e "$(curl -fsSL"
And installed two packages:
brew install pkg-config
brew install gtk+

Then ./configure told me that xcv-shm was missing. I resolved that with:
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig

That fixed all the configure issues. I ran make and received a few problems with GTK. The first was resolved by editing:
vi gtkdatabox-
and deleting line 199 '-DGTK_DISABLE_DEPRECATED\'

Next I was given issues with a missing soundcard.h file. I downloaded the source to liboss, compiled and installed that. However, to get it to compile, I had to comment out the close function in liboss-0.0.1/lib/ossins.c

Still no go, so I:
cp liboss-0.0.1/include/liboss/soundcard.h /usr/include/sys/
I don't know why make install did not place the file there, or why ./configure didn't find the alternative header file that liboss DID provide.
I also had to comment out several ifndef blocks; LIBOSS_IOCTL, LIBOSS_OPEN, LIBOSS_CLOSE, and LIBOSS_WRITE to get the replacement sound card.h to work.

Finally I had to make a few changes to sc_unix.c.
I changed termio.h to termios.h in the includes.

-struct termio stbuf, svbuf; / termios: svbuf=saved, stbuf=set /
+struct termios stbuf, svbuf; / termios: svbuf=saved, stbuf=set /

I changed every instance of one function (forgot what it was) to tcsetattr(fd, TCSANOW, &svbuf). For example,
cleanup_serial(int fd)
if (fd > 0) {
if (tcsetattr(fd, TCSANOW, &svbuf) < 0) {
/ sprintf(serial_error, "Can't ioctl set device %s", device); /
/ perror(error); /

I changed the function call to tcsaetattr, and changed the parameter to TCSANOW. There were several instances of this. It then compiled with a bunch of warnings. I ran Quartz, the OSX X11 app, ran xoscope and received the following:
No valid data sources found... exiting
Segmentation fault: 11

I'm not surprised with the SegFault due to all the changes I made to source files with little knowledge of what these changes actually do (thanks google). If anyone has any advice, let me know,
Kevin Nowaczyk

Last edit: Kevin Nowaczyk 2014-04-28