Forum: GNU Radio gr-qtgui configuring?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Michael D. (Guest)
on 2007-05-06 03:47
(Received via mailing list)
I'm trying to get gr-qtgui to configure for compilation.  I've
installed libqt-mt, thinking that that would be the better way to go
(MT generally is, IMHO).  I've set "QWT_CFLAGS" correctly to point to
"/usr/include/qwt", but I still can't get ./configure to allow the
compilation.  Any pointers would be welcomed! - MLD

Here's the relevant output:

checking for qt >= 3.3... gr-qtgui requires libqt or libqt-mt, libqt
not found. Checking for libqt-mt
checking for qt-mt >= 3.3... yes
checking QT_CFLAGS... -DQT_SHARED -DQT_TABLET_SUPPORT -
DQT_THREAD_SUPPORT -D_REENTRANT -I/usr/include/qt3
checking QT_LIBS... -L/usr/X11R6/lib -lqt-mt -laudio -lXt -ljpeg -
lpng -lz -lXi -lXrender -lXrandr -lXcursor -lXinerama -lXft -
lfreetype -lfontconfig -lXext -lX11 -lm -lSM -lICE -ldl -lpthread
checking QT_INCLUDEDIR... /usr/include/qt3
checking QWT_CFLAGS... -I/usr/include/qwt
checking qwt.h usability... yes
checking qwt.h presence... yes
checking for qwt.h... yes
checking QWT_LIBS...  -lqwt
unable to link QWT library
Berndt Josef W. (Guest)
on 2007-05-06 06:03
(Received via mailing list)
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< ---------------------------
Michael D. (Guest)
on 2007-05-06 06:26
(Received via mailing list)
My bad ... RTF Readme file that goes along with gr-qtgui!  Requires
qwt >= 5.0.0 !  Ububtu Edgy can install QWT 4.2, but no greater ... doh!

Can we check for this in the m4 file somehow (the QT version is
already checked for, so why not also QWT?)?

QWT version is found in the file qwt_global.h, under the name
QWT_VERSION.  Looks like there's no pkgconfig file for qwt installed
by default, but there is one at <http://n4hy.org/Qwt/qwt.pc> that
could be copied in separately.  If we want to require the
installation of 'qwt.pc', then something can be added to the
"grc_gr_qtgui.m4" script along the lines of:

     PKG_CHECK_MODULES(QWT, qwt >= 5.0.0,[],
     [passed=no;AC_MSG_RESULT([gr-qtgui requires libqwt >= 5.0.0.])])

If not using 'qwt.pc', then I'd suggest adding to the "gr_qwt.m4"
script something along the lines of:

     AC_TRY_LINK([#include <qwt_global.h>],
                 [#if QWT_VERSION < 0x050000 foo #endif],
                 [],
                 [libqwt_ok=no;AC_MSG_RESULT([QWT library version
must be at least 5.0.0])]
     )

Or maybe trying both (along the lines of first searching for libqt,
then libqt-mt) ... with the PKG_CHECK first trying as written, then a
backup to trying the "gr_qwt.m4" with the addition above.  I don't
have time to try these out tonight, but can do so tomorrow or Monday
unless someone else wants to. - MLD
Eric B. (Guest)
on 2007-05-06 07:12
(Received via mailing list)
On Sat, May 05, 2007 at 10:25:38PM -0400, Michael D. wrote:
> installation of 'qwt.pc', then something can be added to the
>                 [],
>                 [libqwt_ok=no;AC_MSG_RESULT([QWT library version
> must be at least 5.0.0])]
>     )
>
> Or maybe trying both (along the lines of first searching for libqt,
> then libqt-mt) ... with the PKG_CHECK first trying as written, then a
> backup to trying the "gr_qwt.m4" with the addition above.  I don't
> have time to try these out tonight, but can do so tomorrow or Monday
> unless someone else wants to. - MLD

Unless the upstream guys produce and ship the .pc file I don't want to
check for it with pkgconfig.  The second seems OK.

Eric
Michael D. (Guest)
on 2007-05-07 06:37
(Received via mailing list)
On May 5, 2007, at 11:18 PM, Eric B. wrote:
> On Sat, May 05, 2007 at 10:25:38PM -0400, Michael D. wrote:
>> Looks like there's no pkgconfig file for qwt installed
>> by default, but there is one at <http://n4hy.org/Qwt/qwt.pc> that
>> could be copied in separately.

> Unless the upstream guys produce and ship the .pc file I don't want to
> check for it with pkgconfig.  The second seems OK.

Looks like the SF download site's tarball doesn't host the .pc file;
the one I found was referenced in the file gr-qtgui/README ;) at a
non-standard source area http://n4hy.org/Qwt/ ...  Thus, the second
solution is better.  I will try that solution out soon (tomorrow?
hopefully) to verify that it works correctly, at least on Ubuntu (now
that I've gotten qwt 5.0.1 to install; I also updated the Ubuntu
install page on the Wiki).

I'm having difficulties getting Qt/QWT the compile and install on OSX
using MacPorts, so I'll have to believe that the M4 script change is
portable (should be); while I can do it by hand, I'd prefer to have a
MP script / portfile that can be submitted to the MP project. - MLD
Bob McGwier (Guest)
on 2007-05-07 17:30
(Received via mailing list)
Eric B. wrote:
>> by default, but there is one at <http://n4hy.org/Qwt/qwt.pc> that
>>     AC_TRY_LINK([#include <qwt_global.h>],
>> unless someone else wants to. - MLD
>>
>
> Unless the upstream guys produce and ship the .pc file I don't want to
> check for it with pkgconfig.  The second seems OK.
>
> Eric
>
>

I agree with this and we have repeatedly asked, pleaded, begged,
demanded they do this.  These widgets are extremely useful, many done
specifically for radio work, and for that reason, along with the speed,
I view them as useful enough to put up with the current shortcomings.

Bob

--
Robert W. McGwier, Ph.D.
Center for Communications Research
805 Bunn Drive
Princeton, NJ 08540
(609)-924-4600
(sig required by employer)
This topic is locked and can not be replied to.