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 McDermott
Subject: Re: [Discuss-gnuradio] Problem with cmake not finding includes
Date: Sat, 24 Aug 2013 14:55:21 -0700 (PDT)

Several people trying to install my out of tree module are reporting this same error
trying to build it. They are both on Ubuntu 12.04....    I do not get this error
when building my own out of tree module, I'm on Ubuntu 13.04.
 

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


-- Tom, N5EG

From: Tom Rondeau <address@hidden>
To: Andrew Davis <address@hidden>
Cc: "address@hidden" <address@hidden>
Sent: Saturday, August 24, 2013 12:15 PM
Subject: Re: [Discuss-gnuradio] Problem with cmake not finding includes

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

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


reply via email to

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