Ron,

Yes, that looks right on target with my results... A little baffling to me
though... linking against OOTs seems like a fairly standard use case but
maybe it's less common than I thought. It's definitely needed for rfnoc
though.


Mohamed Yaaseen,

The change that worked for me was to update GR_CMAKE_DIR in gr-ettus to
${CMAKE_MODULES_DIR)/gnuradio-ettus. Then I rebuilt and installed gr-ettus,
and my OOT could then call find_package(gnuradio-ettus) and link against
gnuradio-ettus.

But I'm really not a cmake expert in any way, so I don't know if this is
the "right" answer. Personally I'm satisfied with the GR_CMAKE_DIR change,
but it does change the package name for downstream users...

I guess the broader question is then... What is "desired" behavior provided
by default from gr_modtool for finding and linking OOTs?

EJ

On Tue, Jun 30, 2020, 10:53 AM Mohamed Yaaseen <mdyaaseen1...@gmail.com>
wrote:

> Hello EJ Kreinar,
>
> I just came across this situation. I was trying to create a rfnoc gain
> tutorial oot module using rfnomodtools. But, when I was doing cmake I got
> some errors with respect to find_package(ettus).
> I was just fiddling around with cmakefiles as I am not familiar with cmake
> and stuff.
>
> But, I found a problem with the gr-ettus module itself. In the gr-ettus
> module ettutsConfig.cmake file, there is a line
> *include("${CMAKE_CURRENT_LIST_DIR}/ettusTarget.cmake"). *
> This is the file that rfnoc OOT searches in order to find the
> package ettus. But, while make && make install gr-ettus module installs 
> *gnuradio-ettusTargets.cmake
> *file at the location. Hence, rfnoc OOT module throws an error message
> during cmake.
>
> When I corrected the line in gr-ettus and reinstalled it, my OOT module
> was able to compile  successfully.
>
> But, I am now facing errors during the make process.
>
> I believe the rfnocmodtools template code present inside gr-ettus has not
> been migrated for 3.8 even though gr-ettus is migrated.
>
> In the meantime I will also try to fix the error which is thrown during
> make process. And update you in this thread if I have any success
>
> If you are able to get past the make process also and install it in gr
> 3.8. It would be really great...!!!
>
> Regards,
> Mohamed Yaaseen
>
> On Tue, 30 Jun 2020 at 16:01, EJ Kreinar via USRP-users <
> usrp-us...@lists.ettus.com> wrote:
>
>> Hi gnuradio and usrp-users,
>>
>> I'm trying to update rfnoc OOT modules for gnuradio 3.8 (gasp).
>>
>> But I'm having trouble finding and linking to gr-ettus specifically, and
>> I wonder how we're supposed to call find_package(<OOT>) and then link to
>> OOT modules in general with the updated cmake workflow... Trying to find
>> and link gr-ettus, I've tried a few things...
>>
>> 1) find_package(ettus)
>>
>> I believe this worked against gnuradio-3.7. Now, I get the following
>> error during cmake configure...
>>
>> ```
>> --   No package 'ettus' found
>> CMake Error at /usr/local/lib/cmake/ettus/ettusConfig.cmake:41 (include):
>>   include could not find load file:
>>     /usr/local/lib/cmake/ettus/ettusTarget.cmake
>> ```
>>
>> 2) find_package(gnuradio-ettus)
>>
>> This seems more promising, since GR_LIBRARY_FOO seems to
>> install gnuradio-ettus cmake files into the lib/cmake/ettus install
>> location. This fails in cmake configure with the following error:
>>
>> ```
>> CMake Error at gr-theseus/CMakeLists.txt:84 (find_package):
>>   By not providing "Findgnuradio-ettus.cmake" in CMAKE_MODULE_PATH this
>>   project has asked CMake to find a package configuration file provided by
>>   "gnuradio-ettus", but CMake did not find one.
>>
>>   Could not find a package configuration file provided by "gnuradio-ettus"
>>   with any of the following names:
>>
>>     gnuradio-ettusConfig.cmake
>>     gnuradio-ettus-config.cmake
>>
>>   Add the installation prefix of "gnuradio-ettus" to CMAKE_PREFIX_PATH or
>> set
>>   "gnuradio-ettus_DIR" to a directory containing one of the above files.
>> If
>>   "gnuradio-ettus" provides a separate development package or SDK, be
>> sure it
>>   has been installed.
>> ```
>>
>>
>> Interestingly, if I change the GR_CMAKE_DIR *inside gr-ettus* to point to
>> ${CMAKE_MODULES_DIR)/gnuradio-ettus (
>> https://github.com/EttusResearch/gr-ettus/blob/b69260655e974786ea6e611bd91ab578b13ec72a/CMakeLists.txt#L69),
>> then the gnuradio-ettus cmake modules get installed to
>> lib/cmake/gnuradio-ettus. Then, in my OOT module, calling
>> find_package(gnuradio-ettus) finds gr-ettus, and
>> target_link_libraries(<my-library> gnuradio-ettus) links successfully.
>>
>> So: Is this right? Am I missing something obvious here? Should gnuradio
>> OOT modules set their GR_CMAKE_DIR to gnuradio-<module>?
>>
>> Thanks for the help!
>> EJ
>>
>> _______________________________________________
>> USRP-users mailing list
>> usrp-us...@lists.ettus.com
>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>>
>

Reply via email to