discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Problem with cmake not finding includes


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] Problem with cmake not finding includes
Date: Tue, 27 Aug 2013 16:50:46 -0400

On Tue, Aug 27, 2013 at 4:30 PM,  <address@hidden> wrote:
>
> I can confirm all that is said below - I get the same result. However,
> if I change my last line in gnuradio-runtime.pc to be:
>
>    Cflags: -I${includedir} -Ixxxx
>
> So I now get:
>
>    $ pkg-config gnuradio-runtime --cflags
>    -Ixxx
>
> And now when I cmake an OOT module, I get:
>
> [snip]
>    -- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
>    -- checking for module 'gnuradio-runtime'
>    --   found gnuradio-runtime, version 3.7.0
>    -- Found GNURADIO_RUNTIME: gnuradio-runtime;gnuradio-pmt
>    -- checking for module 'cppunit'
>    --   found cppunit, version 1.13.1
>    -- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so;dl
>    -- Found SWIG: /usr/bin/swig2.0 (found version "2.0.9")
>    -- Found PythonLibs: /usr/lib/python3.2/config/libpython3.2.so (found 
> version "2.7.5+")
> [snip]
>
> So it looks to me like if pkg-config returns nothing, cmake thinks you
> don't have it. So, the question is what version of cmake are you
> using? The version I have on my system is 2.8.11.2. I had a quick look
> on the Debian bug page for that version of cmake and didn't spot
> anything that looked like the issue some of us are seeing.
>
> Anyway, at least that stupid work-around above allows me to compile my
> module again!
>
> Thanks,
>
> Matt

I just pushed a fix for this. I emailed out a patch for everyone to
try yesterday, but just noticed that I somehow dropped the mailing
list from the email recipients.

But I was able to replicate the problem on my own and the patch fixed it for me.

Note that you're going to have to delete your build directory to make
sure there's no cmake caching stuff left over or this update may not
work.


-- 
Tom
Visit us at GRCon13 Oct. 1 - 4
http://www.trondeau.com/grcon13


> Tom Rondeau writes:
>  > On Sat, Aug 24, 2013 at 1:48 PM, Andrew Davis <address@hidden> wrote:
>  > > No only things from my new install, I deleted everything Gnuradio in
>  > > /usr/lib/pkgconfig and reinstalled them.
>  > >
>  > > I did notice something strange though,
>  > > /usr/lib/pkgconfig/gnuradio-runtime.pc contains:
>  > >
>  > > prefix=/usr
>  > > exec_prefix=${prefix}
>  > > libdir=${exec_prefix}/lib
>  > > includedir=${prefix}/include
>  > >
>  > > Name: DRI2Proto
>  > > Description: DRI2 extension headers
>  > > Version: 2.8
>  > > Cflags: -I${includedir}
>  > >
>  > > And when I do the following I get:
>  > >
>  > > address@hidden:~$ pkg-config --modversion gnuradio-runtime
>  > > 3.7.1git
>  > > address@hidden:~$ pkg-config --libs gnuradio-runtime
>  > > -lgnuradio-runtime -lgnuradio-pmt
>  > > address@hidden:~$ pkg-config --cflags gnuradio-runtime
>  > >
>  > > address@hidden:~$
>  > >
>  > > As you can see --cflags returns nothing, it does this now for all 
> packages
>  > > on my system, I think this might be a pkg-config bug?
>  > >
>  > > Andrew
>  >
>  > Unfortunately, I can't replicate this bug. Must be a difference with
>  > something on under Ubuntu.
>  >
>  > But, Andrew, I think pkg-config is doing the right thing here. Because
>  > you're prefix is /usr, the compiler /should/ automatically assume that
>  > /usr/include is in your include path. Instead of having every program
>  > return -I/usr/include, it simply returns an empty string. Either way
>  > should be harmless, but this would make the compile command simpler
>  > and remove lots of possible duplication.
>  >
>  > The GnuradioConfig.cmake script specifies /usr/include when looking
>  > for the right include directories, too, and this is hard-coded into
>  > the module. If your prefix is /usr, it should always find the header
>  > file (which is gnuradio/top_block.h).
>  >
>  > In other words, it looks to me like we're doing everything correctly
>  > and I haven't been able to duplicate the problem. I'm going to need
>  > some more debugging help from those of you out there with this
>  > problem.
>  >
>  > --
>  > Tom
>  > Visit us at GRCon13 Oct. 1 - 4
>  > http://www.trondeau.com/grcon13
>  >
>  >
>  > > On Sat, Aug 24, 2013 at 1:22 PM, Marcus Müller <address@hidden> wrote:
>  > >>
>  > >> Perhaps it's a lingering pkgconfig file from another installation?
>  > >> Does
>  > >> find /usr/lib*/pkgconfig /usr/local/lib*/pkgconfig /lib*/pkgconfig 
> -iname
>  > >> 'gnuradio*pc'
>  > >> yield anything that does not belong to your current installation?
>  > >>
>  > >>
>  > >>
>  > >> On 08/24/2013 06:45 PM, Andrew Davis wrote:
>  > >>
>  > >> I don't think this is a modtool specific problem ether, I can no longer
>  > >> build ANY out of tree project now, even ones that compiled just fine 
> before,
>  > >> it can't find the headers for any Gnuradio components (
>  > >> GNURADIO_BLOCKS_INCLUDE_DIRS, GNURADIO_UHD_INCLUDE_DIRS, etc.. ).
>  > >>
>  > >> Andrew
>  > >>
>  > >>
>  > >> On Sat, Aug 24, 2013 at 12:39 PM, Andrew Davis <address@hidden>
>  > >> wrote:
>  > >>>
>  > >>> OK, rebuild and reinstalled Gnuradio after revoking that commit, then
>  > >>> build a new module with modtool and still had the same problem:
>  > >>>
>  > >>> checking for module 'gnuradio-runtime'
>  > >>>
>  > >>> found gnuradio-runtime, version 3.7.1git
>  > >>>
>  > >>> Could NOT find GNURADIO_RUNTIME (missing: 
> GNURADIO_RUNTIME_INCLUDE_DIRS)
>  > >>>
>  > >>> checking for module 'cppunit'
>  > >>>
>  > >>> found cppunit, version 1.12.1
>  > >>>
>  > >>> Found CPPUNIT: /usr/lib/libcppunit.so;dl
>  > >>>
>  > >>> CMake Error at CMakeLists.txt:98 (message):
>  > >>>
>  > >>> GnuRadio Runtime required to compile howto
>  > >>>
>  > >>>
>  > >>> It looks like it finds gnuradio-runtime, but not the headers...
>  > >>>
>  > >>>
>  > >>> Andrew
>  > >>>
>  > >>>
>  > >>>
>  > >>> On Sat, Aug 24, 2013 at 6:38 AM, <address@hidden> wrote:
>  > >>>>
>  > >>>> Tom Rondeau writes:
>  > >>>>  > On Fri, Aug 23, 2013 at 10:51 AM,  <address@hidden> wrote:
>  > >>>>  > > Tom Rondeau writes:
>  > >>>>  > >  > On Fri, Aug 23, 2013 at 6:11 AM,  <address@hidden>
>  > >>>> wrote:
>  > >>>>  > >  > >
>  > >>>>  > >  > > Hi,
>  > >>>>  > >  > >
>  > >>>>  > >  > > I'm porting my real time Doppler correction block from 3.6 
> to
>  > >>>> 3.7 but
>  > >>>>  > >  > > have come across an issue that when I try to cmake it, I get
>  > >>>> an error
>  > >>>>  > >  > > saying it cannot find the runtime includes. To replicate 
> this
>  > >>>> I
>  > >>>>  > >  > > created a new block ('howto') and tried to cmake that and 
> got
>  > >>>> the same
>  > >>>>  > >  > > error:
>  > >>>>  > >  > >
>  > >>>>  > >  > > # gr_modtool newmod howto
>  > >>>>  > >  > > Creating out-of-tree module in ./gr-howto... Done.
>  > >>>>  > >  > > Use 'gr_modtool add' to add a new block to this currently
>  > >>>> empty module.
>  > >>>>  > >  > >
>  > >>>>  > >  > > # cd gr-howto
>  > >>>>  > >  > >
>  > >>>>  > >  > > # ls
>  > >>>>  > >  > > apps  cmake  CMakeLists.txt  docs  grc  include  lib  python
>  > >>>> swig
>  > >>>>  > >  > >
>  > >>>>  > >  > > # mkdir build
>  > >>>>  > >  > > # cd build/
>  > >>>>  > >  > > # cmake ../
>  > >>>>  > >  > > -- The CXX compiler identification is GNU 4.8.1
>  > >>>>  > >  > > -- The C compiler identification is GNU 4.8.1
>  > >>>>  > >  > > -- Check for working CXX compiler: /usr/bin/c++
>  > >>>>  > >  > > -- Check for working CXX compiler: /usr/bin/c++ -- works
>  > >>>>  > >  > > -- Detecting CXX compiler ABI info
>  > >>>>  > >  > > -- Detecting CXX compiler ABI info - done
>  > >>>>  > >  > > -- Check for working C compiler: /usr/bin/cc
>  > >>>>  > >  > > -- Check for working C compiler: /usr/bin/cc -- works
>  > >>>>  > >  > > -- Detecting C compiler ABI info
>  > >>>>  > >  > > -- Detecting C compiler ABI info - done
>  > >>>>  > >  > > -- Build type not specified: defaulting to release.
>  > >>>>  > >  > > -- Boost version: 1.54.0
>  > >>>>  > >  > > -- Found the following Boost libraries:
>  > >>>>  > >  > > --   filesystem
>  > >>>>  > >  > > --   system
>  > >>>>  > >  > > -- Found PkgConfig: /usr/bin/pkg-config (found version 
> "0.26")
>  > >>>>  > >  > > -- checking for module 'gnuradio-runtime'
>  > >>>>  > >  > > --   found gnuradio-runtime, version 3.7.0
>  > >>>>  > >  > > -- Could NOT find GNURADIO_RUNTIME (missing:
>  > >>>> GNURADIO_RUNTIME_INCLUDE_DIRS)
>  > >>>>  > >  > > -- checking for module 'cppunit'
>  > >>>>  > >  > > --   found cppunit, version 1.13.1
>  > >>>>  > >  > > -- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so;dl
>  > >>>>  > >  > > CMake Error at CMakeLists.txt:98 (message):
>  > >>>>  > >  > >   GnuRadio Runtime required to compile howto
>  > >>>>  > >  > >
>  > >>>>  > >  > >
>  > >>>>  > >  > > -- Configuring incomplete, errors occurred!
>  > >>>>  > >  > >
>  > >>>>  > >  > >
>  > >>>>  > >  > > I've tried to figure out what cmake is actually looking for,
>  > >>>> but
>  > >>>>  > >  > > quickly ran out of enthusiasm for trying to debug cmake
>  > >>>>  > >  > > (--debug-output is of very limited help, and my usual method
>  > >>>> of
>  > >>>>  > >  > > 'strace' to see what files a process is actually looking for
>  > >>>> is
>  > >>>>  > >  > > thwarted due to the use of pipes/subprocesses). If I look in
>  > >>>>  > >  > > /usr/lib/cmake/gnuradio/GnuradioConfig.cmake I see that 
> there
>  > >>>> is a
>  > >>>>  > >  > > line:
>  > >>>>  > >  > > GR_MODULE(RUNTIME gnuradio-runtime gnuradio/top_block.h
>  > >>>> gnuradio-runtime)
>  > >>>>  > >  > > which to me implies that it might be looking for top_block.h
>  > >>>> to check
>  > >>>>  > >  > > that runtime include are installed. If I do:
>  > >>>>  > >  > >
>  > >>>>  > >  > > # ls -l /usr/include/gnuradio/top_block.h
>  > >>>>  > >  > >
>  > >>>>  > >  > > -rw-r--r-- 1 root root 4822 Jun  9 20:44
>  > >>>> /usr/include/gnuradio/top_block.h
>  > >>>>  > >  > >
>  > >>>>  > >  > >
>  > >>>>  > >  > > I'm running debian unstable on amd64 with gnuradio-dev
>  > >>>> (3.7.0-5)
>  > >>>>  > >  > > installed.
>  > >>>>  > >  > >
>  > >>>>  > >  > > Any suggestions as to how to fix or debug this issue would 
> be
>  > >>>>  > >  > > gratefully received!
>  > >>>>  > >  > >
>  > >>>>  > >  > > Thanks,
>  > >>>>  > >  > >
>  > >>>>  > >  > > Matt
>  > >>>>  > >  >
>  > >>>>  > >  >
>  > >>>>  > >  > Matt,
>  > >>>>  > >  >
>  > >>>>  > >  > If you run 'pkg-config --modversion gnuradio-runtime' does it
>  > >>>> return
>  > >>>>  > >  > the correct version number? If pkg-config can't find it,
>  > >>>> something
>  > >>>>  > >  > either didn't get installed correctly or pkg-config is
>  > >>>> misconfigured
>  > >>>>  > >  > (because it looks like you've installed into /usr, and
>  > >>>> pkg-config
>  > >>>>  > >  > should look in /usr/lib/pkgconfig by default).
>  > >>>>  > >  >
>  > >>>>  > >  > --
>  > >>>>  > >  > Tom
>  > >>>>  > >  > Visit us at GRCon13 Oct. 1 - 4
>  > >>>>  > >  > http://www.trondeau.com/grcon13
>  > >>>>  > >
>  > >>>>  > > Tom,
>  > >>>>  > >
>  > >>>>  > > 'pkg-config --modversion gnuradio-runtime' returns '3.7.0'.
>  > >>>>  > >
>  > >>>>  > > These are the debian (unstable) packages, I'm not sure how they
>  > >>>> were
>  > >>>>  > > configured. If its only me that has this problem, I'll raise a 
> bug
>  > >>>>  > > against the debian packages.
>  > >>>>  > >
>  > >>>>  > > Thanks,
>  > >>>>  > >
>  > >>>>  > > Matt
>  > >>>>  >
>  > >>>>  > You have to have the dev packages installed as well or you don't 
> have
>  > >>>>  > any of the header files. Make sure you have /usr/include/gnuradio.
>  > >>>>  >
>  > >>>>  > --
>  > >>>>  > Tom
>  > >>>>  > Visit us at GRCon13 Oct. 1 - 4
>  > >>>>  > http://www.trondeau.com/grcon13
>  > >>>>
>  > >>>>
>  > >>>> Hi,
>  > >>>>
>  > >>>> As I said in my original email, I'm using gnuradio-dev version 
> 3.7.0-5.
>  > >>>>
>  > >>>> As I also state in my original email, top_block.h exists in
>  > >>>> /usr/include/gnuradio. (There are also a whole bunch of other includes
>  > >>>> & dirs in there as well).
>  > >>>>
>  > >>>> It isn't clear to me at the moment what are the git commits which have
>  > >>>> been merged into the debian package. Looking at the changelog I see
>  > >>>> this:
>  > >>>>
>  > >>>>    gnuradio (3.7.0-4) experimental; urgency=low
>  > >>>>
>  > >>>>       * Include upstream maint branch fixes - but not
>  > >>>>         Applying-hidapi-patch-from-Hans-de-Goede
>  > >>>>          - conflicts with Debian BSD kernel patches
>  > >>>>
>  > >>>>     -- A. Maitland Bottoms <address@hidden>  Sun, 11 Aug 2013
>  > >>>> 18:11:24 -0400
>  > >>>>
>  > >>>> So it obviously is the official 3.7.0 package + additional fixes - but
>  > >>>> the actual commits are stated which makes it difficult for me to
>  > >>>> isolate the problem commit. Hopefully Andrew will have more luck!
>  > >>>>
>  > >>>> Thanks,
>  > >>>>
>  > >>>> Matt



reply via email to

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