On Tue, Sep 20, 2005 at 07:31:52PM -0500, LRK wrote:
> On Tue, Sep 20, 2005 at 10:21:57AM -0700, Eric Blossom wrote:
> > > 
> > > Just to be sure things are right, I blew away the GnuRadio installed files
> > > and re-built from CVS. Amazingly, one problem in the gnuradio-core build
> > > seems to have disappeared but a new problem appeared in the audio-oss 
> > > build.
> > 
> > A couple of basic comments:
> > 
> > I assume that you know that the modules have to be built in a
> > particular order to satisfy dependencies among themselves.  
> > The easiest way to handle this is to use:
> > 
> >   $ cd gr-build
> >   $ ./for-all-dirs ../buildit  2>&1 | tee make.log
>  
> Yep, it does that. I run a script which does it the same way as before.
> 
>  
> > > One more bug to hunt down to get back where I was:
> > 
> > > Traceback (most recent call last):
> > >   File "./qa_oss.py", line 24, in ?
> > >     import audio_oss
> > >   File "/usr/gr/gr-build/gr-audio-oss/src/audio_oss.py", line 5, in ?
> > >     import _audio_oss
> > > ImportError: /usr/gr/gr-build/gr-audio-oss/src/.libs/_audio_oss.so: 
> > > Undefined symbol "_ZN8gr_block5startEv"
> > > FAIL: run_tests
> > 
> > Did you "make install" gnuradio-core prior to trying to build audio_oss?
> > (If you ../buildit in gnuradio-core, it would have done this for you.)
> 
> Yep, the gnuradio-core was built, checked, and installed. Unlike the previous
> CVS download, the gnuradio-core make check no longer fails. Not sure if that
> is a clue. (I was having to do make install and then make check worked).
> 
>  
> > It could be that you have an old installed version of the
> > gnuradio-core library sitting in /usr/local/lib that is being
> > referenced when running the gr-audio-oss tests.
> 
> Indeed there was a /usr/local/lib/gnuradio-core.so.0, probably left from
> some time ago when the 'prefix' got accidentally munged. I deleted that
> and a link to it as well as looking around for any other pieces of GR there.
> 
> So now the above error says it can't find gnuradio-core.so.0 which is in
> fact installed in /usr/gr/local/lib. Looks like the ./configure sets the 
> '-L' variable to search that library.
> 
> 
> I had set CPPFLAGS and LDFLAGS to add the /usr/local path to get the usrp 
> code to build but backing all that out doesn't recover.
> 
> PYTHONPATH has not been changed. LD_LIBRARY_PATH has not been changed.
> 
> Still looking....

All the modules that depend on gnuradio-core use pkg-config to
locate the gnuradio-core library and includes at configure time.
Which one it finds is dependent on the setting of the PKG_CONFIG_PATH
environment variable.

If you're installing gnuradio-core in /usr/gr/local, then you'll find
that it installs a file: /usr/gr/local/lib/pkgconfig/gnuradio-core.pc

The other gr-* packages need a way to find that file.  They do that
through the PKG_CONFIG_PATH environment variable.  It wants to contain
the path to that directory, and perhaps /usr/local/lib/pkgconfig too (or
whereever fftw3f.pc was installed.)

On one of my systems (x86 Mandrake 10.1 Official):

  $ echo $PKG_CONFIG_PATH
  /usr/local/lib/pkgconfig

  $ ls -l /usr/local/lib/pkgconfig/
  total 48
  -rw-rw-r--  1 root root  220 Jan 21  2005 fftw3.pc
  -rw-rw-r--  1 root root  221 Mar  7  2004 fftw3f.pc
  -rw-r--r--  1 eb   wheel 291 Sep 17 13:07 gnuradio-core.pc
  -rw-rw-r--  1 root root  290 Jan 19  2004 jack.pc
  -rw-rw-r--  1 root root  517 Jul 30  2004 libgeda.pc
  -rw-rw-r--  1 root root  283 May 28  2003 libxine.pc
  -rw-rw-r--  1 root root  250 Jan 20  2004 lrdf.pc
  -rw-rw-r--  1 root root  256 Jan 20  2004 raptor.pc
  -rw-rw-r--  1 root root  273 Jan 20  2004 samplerate.pc
  -rw-rw-r--  1 root root  249 Jan 19  2004 sndfile.pc
  -rw-r--r--  1 eb   wheel 238 Aug 28 17:59 usrp.pc
  -rw-r--r--  1 eb   wheel 377 Jul 17 21:27 valgrind.pc

On another (x86_64 SuSE 9.3 Professional):

  $ echo $PKG_CONFIG_PATH
  /usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/opt/gnome/lib64/pkgconfig

  $ ls -l /usr/local/lib64/pkgconfig
  total 8
  -rw-r--r--  1 eb eb 289 2005-08-28 18:50 gnuradio-core.pc
  -rw-r--r--  1 eb eb 240 2005-09-20 01:20 usrp.pc
  
  $ ls -l /usr/lib64/pkgconfig
  total 292
  -rw-r--r--  1 root root  382 2005-06-10 18:43 alsa.pc
  -rw-r--r--  1 root root  176 2005-03-23 09:45 art-sharp.pc
  -rw-r--r--  1 root root  204 2005-03-19 12:35 audiofile.pc
  [... big snip ...]
  -r--r--r--  1 root root  299 2005-03-22 09:25 xfixes.pc
  -r--r--r--  1 root root  472 2005-03-22 09:25 xft.pc
  -r--r--r--  1 root root  237 2005-03-22 09:25 xrender.pc
  
  $ ls -l /opt/gnome/lib64/pkgconfig
  total 372
  -rw-r--r--  1 root root 258 2005-03-22 09:57 atk.pc
  -rw-r--r--  1 root root 382 2005-03-22 10:49 bonobo-activation-2.0.pc
  -rw-r--r--  1 root root 331 2005-03-22 11:45 cspi-1.0.pc
  [... big snip ...]
  -rw-r--r--  1 root root 280 2005-03-22 09:59 pangox.pc
  -rw-r--r--  1 root root 174 2005-03-23 07:59 rhythmbox.pc
  -rw-r--r--  1 root root 170 2005-03-23 09:57 xml2po.pc

The great thing about pkg-config is that it keeps you from having to
guess about what -I, -L and -l options you need to use to compile
and link a tool that uses a given package.

Note: for some reason, the command is called pkg-config, but the RPM,
library path and distribution tarball is called pkgconfig.

Eric


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

Reply via email to