G'day,

build of svn revision 5249 fails with following error message:

[...]
/bin/ksh ../../../../libtool --tag=CXX   --mode=compile 
g++ -DHAVE_CONFIG_H -I. -I../../../.. -DOMNITHREAD_POSIX=1 
-I../../../../omnithread -I../../../../pmt/src/lib -I../../../../mblock/src/lib 
-I../../../../usrp/host/lib/legacy -I../../../../usrp/host/lib/inband 
-I../../../../usrp/firmware/include  -I/usr/pkg/include  -I/usr/pkg/include -g 
-O2 -Wall -Woverloaded-virtual -pthread -MT 
usrp_server.lo -MD -MP -MF .deps/usrp_server.Tpo -c -o usrp_server.lo 
usrp_server.cc
 
g++ -DHAVE_CONFIG_H -I. -I../../../.. -DOMNITHREAD_POSIX=1 
-I../../../../omnithread -I../../../../pmt/src/lib -I../../../../mblock/src/lib 
-I../../../../usrp/host/lib/legacy -I../../../../usrp/host/lib/inband 
-I../../../../usrp/firmware/include -I/usr/pkg/include -I/usr/pkg/include -g 
-O2 -Wall -Woverloaded-virtual -pthread -MT 
usrp_server.lo -MD -MP -MF .deps/usrp_server.Tpo -c 
usrp_server.cc  -fPIC -DPIC -o .libs/usrp_server.o
../../../../usrp/host/lib/legacy/usrp_bytesex.h:43: error: expected `)' 
before '(' token
usrp_server.cc: In member function 'virtual void 
usrp_server::handle_message(mb_message_sptr)':
[...]

This appears to be due to a typo in usrp_bytesex.h in line 43 where the 
declaration of bswap32 should be bswap_32?

NetBSD does support byte-order swapping functions see excerpt of relevant man 
page below. The GNU Radio configure script checks for byteswap.h to determine 
support for these functions. NetBSD declares these functions in sys/bswap.h 
and an appropriate fix would be to modify config/grc_usrp.m4 and 
usrp/host/lib/legacy/usrp_bytesex.h, see attached diff files.

The source tree built and installed fine after implementing changes described 
above. "make check" fails with errors in mblock module. I will have to 
investigate this further.

sysinfo: NetBSD-i386 4.99.17, gnuradio svn revision 4259

cheerio Berndt

man 3 bswap
----------------------- 8< ---------------------------
NAME
     bswap16, bswap32, bswap64 -- byte-order swapping functions

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <sys/types.h>
     #include <machine/bswap.h>

     uint16_t
     bswap16(uint16_t);

     uint32_t
     bswap32(uint32_t);

     uint64_t
     bswap64(uint64_t);
----------------------- 8< ---------------------------
--- grc_usrp.m4.orig	2007-05-06 10:47:05.000000000 +0930
+++ grc_usrp.m4	2007-05-06 10:58:54.000000000 +0930
@@ -51,7 +51,7 @@
 
     # These checks don't fail
     AC_C_BIGENDIAN
-    AC_CHECK_HEADERS([byteswap.h linux/compiler.h])
+    AC_CHECK_HEADERS([byteswap.h sys/bswap.h linux/compiler.h])
     AC_CHECK_FUNCS([getrusage sched_setscheduler])
     AC_CHECK_FUNCS([sigaction snprintf])
 
--- usrp_bytesex.h.orig	2007-05-06 10:28:04.000000000 +0930
+++ usrp_bytesex.h	2007-05-06 11:10:55.000000000 +0930
@@ -32,6 +32,8 @@
 
 #ifdef HAVE_BYTESWAP_H
 #include <byteswap.h>
+#elif HAVE_SYS_BSWAP_H
+#include <sys/bswap.h>
 #else
 static inline unsigned short int
 bswap_16 (unsigned short int x)
@@ -40,7 +42,7 @@
 }
 
 static inline unsigned int
-bswap32 (unsigned int x)
+bswap_32 (unsigned int x)
 {
   return ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) \
         | (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24));
*********************************************************************
The following GNU Radio components have been successfully configured:

config
omnithread
gnuradio-core
pmt
mblock
usrp
gr-usrp
gr-audio-jack
gr-audio-oss
gr-audio-portaudio
gr-atsc
gr-cvsd-vocoder
gr-gsm-fr-vocoder
gr-pager
gr-radio-astronomy
gr-trellis
gr-video-sdl
gr-qtgui
gr-wxgui
gr-sounder
gnuradio-examples

You my now run the make command to build these components.

*********************************************************************
The following components were skipped either because you asked not
to build them or they didn't pass configuration checks:

gr-audio-alsa
gr-audio-osx
gr-audio-windows
gr-comedi

These components will not be built.

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to