[hpsdr] ghpsdr on Fedora

Lars E. Pettersson lars at homer.se
Sun May 10 15:30:36 PDT 2009


Hi all!

Used part of Sunday to get ghpsdr working on my Fedora 10 based computer.

To get it to compile I had to install libusb1 and libusb1-devel using 
yum install, and doing the following changes to Makefile (I use 64-bit 
Fedora):

===================================================================
--- Makefile	(revision 1036)
+++ Makefile	(working copy)
@@ -4,18 +4,21 @@
  CC=gcc
  LINK=gcc
  OPTIONS=-g
-INCLUDES=-I. -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include\
+INCLUDES=-I. -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include\
           -I/usr/include/atk-1.0 -I/usr/include/cairo\
           -I/usr/include/pango-1.0 -I/usr/include/glib-2.0\
-         -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1\
-         -I/usr/include/freetype2 -I/usr/include/libpng12 \
-	 -I/usr/local/include/libusb-1.0
+         -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1\
+         -I/usr/include/freetype2 -I/usr/include/libpng12
+# install libusb1-devel using yum for Fedora
+#\
+#	 -I/usr/local/include/libusb-1.0
  LIBS=-lpthread -lusb-1.0\
       -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 
-lgdk_pixbuf-2.0\
       -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lz\
       -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lusb-1.0

-FFTW=/usr/lib/libfftw3f.a
+#FFTW=/usr/lib64/libfftw3f.a
+FFTW=/usr/lib64/libfftw3f.so
  DTTSP=libDttSP.a
  COMPILE=$(CC) $(INCLUDES)
===================================================================

Doing the above it compiled, but I had problems with it dying rather 
quickly.

I got a couple of "process_ozy_input_buffer: did not find sync" 
(somewhat above 100), followed by a bunch of "ozy_ringbuffer_put: 
space=1 wanted=64" (almost 200 of those). Sometimes it lasted 5-10 
minutes before dying, sometimes it died directly after starting it.

After some reading of the code, and some simple tests, I found a 
solution to the symptoms above, but not a cure for the illness though... 
:-)  The quick and dirty fix was:

===================================================================
--- ozy_ringbuffer.c	(revision 1036)
+++ ozy_ringbuffer.c	(working copy)
@@ -87,6 +87,7 @@
      if(ozy_ringbuffer_space(buffer)<=n) {
  fprintf(stderr,"ozy_ringbuffer_put: space=%d 
wanted=%d\n",ozy_ringbuffer_space(buffer),n);
          bytes=ozy_ringbuffer_space(buffer)-1;
+	return; /* fixes freeze and crash... lars 10/5-2009 */
      }
      ozy_put_bytes+=bytes;
===================================================================

Now I get crashes in the audio (sparkling sound), and dropout in the 
waterfall, showing the same pattern for a couple of scans, from time to 
time, but it stays alive, at least.

I suppose there is some trouble in the code in ozy_ringbuffer_put(), 
I'll take a closer look later this week, or perhaps John Melton has an 
idea on what is going on?

73 de Lars, sm6rpz
-- 
Lars E. Pettersson <lars at homer.se>
http://www.sm6rpz.se/



More information about the Hpsdr mailing list