discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Compiling GnuRadio


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] Compiling GnuRadio
Date: Wed, 11 Sep 2002 14:01:51 -0700
User-agent: Mutt/1.3.25i

On Wed, Sep 11, 2002 at 11:45:15AM -0700, Josh Logan wrote:
> 
> How sucussful are people at compiling the different version of GnuRadio?
> 
> I'm running a debian unstable machine and I am having the worst luck
> having Gnuradio compile.  I have tried both the tarball and the CVS
> versions with no luck.
> 
> The 0.5 tarball had problems with the Chess test directory.  I removed the
> cppunit from the root Makefile.

I've never seen problems with the Chess directory.  Sounds like
removing it should work.  You will however need the rest of cppunit
for the gnuradio build to succeed.

I then get the folloiwing error:
> ++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -DUSE_LIBGXX_INLINES -D_REENTRANT
> -DPARANOID=1 -DCACHESIZE=262144 -I../../../../src/gnu/lib/gr
> -I../../../../src/gnu/lib/grio -I../../../../src/gnu/lib/grgui
> -I../../../../src/gnu/lib/dtv -I../../../../src/pspectra/lib/vr
> -I../../../../src/pspectra/lib/vrp -I../../../../src/pspectra/lib/vrio
> -I../../../../src/pspectra/lib/vrgui -I/usr/include/qt -g -O2 -Wall
> -Woverloaded-virtual -c VrGUI_int.cc -Wp,-MD,.deps/VrGUI_int.TPlo -o
> VrGUI_int.o
> VrGUI_int.cc: In constructor `VrPlot::VrPlot(QWidget*, int, int, char*,
> char*, 
>    bool, double, double, double, double)':
> VrGUI_int.cc:72: declaration of `p' shadows a parameter
> make[6]: *** [VrGUI_int.lo] Error 1

I saw this a couple of days ago after shifting to GCC 3.1.1 from
3.0.4.  I'll get my changes into CVS within an hour or so.

> The CVS version was haing problems with htonl and htons so I upgraded to
> gcc/g++ 3.2, but I now have problems with ./configure and QT.

In retrospect, probably would have been easier to find the problem in
our code, perhaps a wrong include, and submit a patch ;-)

> checking for Qt... configure: error: Qt (>= Qt 2.2.1) (libraries) not
> found. Please check your installation!
> For more details about this problem, look at the end of config.log.
> 
> I have tried both libqt3-dev and libqt2-dev

The problem with QT is more than likely that it has been compiled with
a different version of the G++ than the rest of the system and/or GNU
Radio.  G++ has different ABI's for 2.96, 3.[01] and 3.2
The good news is that 3.2 is supposed to be a stable ABI.  I haven't
tried 3.2 yet.  GDB just got useful with C++ (through vesion 3.1.1) a
couple of months ago (GDB 5.2.1) and I didn't want to push my luck.

Any how, the trick is to rebuild Qt and not install it, just run it
out of where it is built.  I'm currently using Qt 3.0.4.

To get Qt to use the version of the compiler that I want, I had to
manually edit mkspecs/linux-g++/qmake.conf to set which version of gcc
and g++ to use.    

--- qmake.conf~ Sat May  4 15:25:08 2002
+++ qmake.conf  Tue Sep 10 00:46:25 2002
@@ -10,7 +10,7 @@
 QMAKE_INCREMENTAL_STYLE  = sublib
 
-QMAKE_CC               = gcc
+QMAKE_CC               = gcc-3.1.1
 QMAKE_LEX              = flex
 QMAKE_LEXFLAGS         = 
 QMAKE_YACC             = yacc
@@ -26,7 +26,7 @@
 QMAKE_CFLAGS_THREAD    = -D_REENTRANT
 
-QMAKE_CXX              = g++
+QMAKE_CXX              = g++-3.1.1
 QMAKE_CXXFLAGS         = $$QMAKE_CFLAGS
 QMAKE_CXXFLAGS_DEPS    = $$QMAKE_CFLAGS_DEPS
 QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
@@ -48,8 +48,8 @@
 
-QMAKE_LINK             = g++
+QMAKE_LINK             = g++-3.1.1
-QMAKE_LINK_SHLIB       = g++
+QMAKE_LINK_SHLIB       = g++-3.1.1
 QMAKE_LFLAGS           =


I also had to set PATH=$PATH:<path_to_qt_buildtree>/qmake to get
designer.pro to build.  It failed looking for qmake

Start Qt building, and go out and have a meal.  It takes a while...


Add the following to your shell startup scripts.  These will have to
be set for GNU Radio's configure to find the right compiler, library etc,
and for the run time loader to find the shared library.


CC=gcc-3.1.1
CXX=g++-3.1.1
F77=g77-3.1.1
QTDIR=~/build/qt-x11-free-3.0.4-gcc-3.1.1       # edit this
LD_LIBRARY_PATH=$QTDIR/lib
export CC CXX F77 QTDIR LD_LIBRARY_PATH

Once those are set, in the top directory of GNU Radio

   ./reconf
   ./configure
   make


Then run

  make check

[But that may fail because you ripped out the CPPUNIT stuff]

Let me know how it goes.

Eric




reply via email to

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