discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] typeo in usrp_bytesex.h?


From: Berndt Josef Wulf
Subject: [Discuss-gnuradio] typeo in usrp_bytesex.h?
Date: Sun, 6 May 2007 11:33:21 +0930
User-agent: KMail/1.9.6

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< ---------------------------

Attachment: grc_usrp.m4.diff
Description: Text Data

Attachment: usrp_bytesex.h.diff
Description: Text Data

Attachment: built_modules.log
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]