Try this

  cd $HOME/gr-customModule
  rm -fr build
  mkdir build
  cd build
  cmake --debug-output .. >& build.log

The first couple of lines should have entries which look something like:

  /usr/share/cmake-3.18/Modules

Also, if you

cd $HOME/gr-customModule/build
  grep ROOT CMakeCache.txt

this will tell you where your cmake ROOT is located.

There are also 2 other log files in

$HOME/gr-customModule/build/CMakeFiles
     CMakeError.log
     CMakeOutput.log

-- Cinaed


On 10/17/22 20:56, Michael Matthews wrote:

Hi Cinaed,

Yes, sorry that was a typo. The flag I have been using is:

-DCMAKE_FIND_ROOT_PATH=/usr          (not =usr/)

Running

cmake ..

from

$HOME/gr-customModule/build

without that flag still results in the error.

I am unsure what you mean by remove CMAKE_FIND_ROOT_PATH, are you saying you believe I need to alter my cmake installation for this to work without the flag?

Doing some more digging through the wiki, I did find that I could check my gnuradio configuration information using gnuradio-config-info. If I run

gnuradio-config-info –prefix

I get:

/usr/

If this is related to the cmake root path, it seems to be set correctly by default when I installed gnuradio through the ppa.

I also tried upgrading my version of cmake to see if that would help. I removed the old version using apt (3.16.3) and installed the one managed through snap (3.24.2). This however did not solve the issue.

I am going to try uninstalling gnuradio with apt again, but will build gnuradio from source instead, and see if there have been any changes that may have fixed this. If not, and if there are no objections, I am inclined to submit an issue ticket since there seems to be problems with the cmake imported targets

  * gnuradio::gnuradio-runtime
  * Boost::date_time

When building an OOT using gr_modtool on fresh installs of v3.10.4.0 and Ubuntu 20.04.

Thank you,

Michael Matthews
Graduate Software Engineer
Mobile: +1 847 714 4809

        
Micro-X <https://micro-x.com>

855 South 192nd St, Suite 600
SeaTac, WA, 98148, United States
*www.micro-x.com <https://micro-x.com>*

*From:*Cinaed Simson <cinaed.sim...@gmail.com>
*Sent:* Monday, October 17, 2022 4:41 PM
*To:* Michael Matthews <mmatth...@micro-x.com>; GNURadio Discussion List <discuss-gnuradio@gnu.org>
*Subject:* Re: Problems with gr-modtool on Ubuntu 20.04 (gnuradio 3.10.4)

The cmake flag

-DCMAKE_FIND_ROOT_PATH=usr/

has an incorrect root element - it's root element.

Make sure the CMAKE_FIND_ROOT_PATH defined by you has been removed.

Then start a new build:

  cd $HOME/gr-customModule
   rm -fr build
   mkdir bulid
   cd build
   cmake ..

-- Cinaed

On 10/17/22 11:43, Michael Matthews wrote:

    Hi Cinaed,

    I took your suggestion of making the customModule with gr-modtool
    at the $HOME directory, in case this may be required. The tutorial
    implied this was not necessary, but I gave it a shot anyway.
    Invoking cmake from

    $HOME/gr-customModule/build

    as

    cmake ..

    resulted in no change and the error is still present if I do not
    use the flag:

    -DCMAKE_FIND_ROOT_PATH=usr/

    When you mention there are 9 CMakeLists.txt files in your
    directory, I believe those are the same as I listed. Could you
    clarify if you have any outside those specific paths I mentioned?

    I also wanted to follow up on your suggestion that I should not be
    seeing the line
       -- Using install prefix: /usr/local

    in my cmake output. It seems that that is printed from
    $HOME/gr-customModule/lib/CMakeLists.txt line 47 (in the print
    summary section). It prints CMAKE_INSTALL_PREFIX, which is
    /usr/local by default on UNIX systems according to cmake
    documentation. Could you also clarify what I should be seeing instead?

    You also mention that if invoking cmake doesn’t work, it most
    likely operator error. Again, I am new to gnuradio and I am unsure
    what that error would be. I followed the tutorials verbatim. I am
    running gnuradio 3.10.4, cmake 3.16.3, and Ubuntu 20.04.

    I have tested this now on two clean VM installs of Ubuntu 20.04
    and gnuradio 3.10.4 (through the apt PPA) and am still seeing this
    error.

    I appreciate the help! Cheers,

    Michael Matthews
    Graduate Software Engineer
    Mobile: +1 847 714 4809

        

    Micro-X
    
<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicro-x.com%2F&data=05%7C01%7Cmmatthews%40micro-x.com%7C287cb7d25ae24c04f20a08dab098ef66%7Cad206e7b8a5d4d9aabf6ab3a9fd2c934%7C0%7C0%7C638016468167854213%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vgFUEsxxOnxgHAJR4AtreU1EuzZAUn34IaggxushrDA%3D&reserved=0>

    855 South 192nd St, Suite 600
    SeaTac, WA, 98148, United States
    *www.micro-x.com
    
<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicro-x.com%2F&data=05%7C01%7Cmmatthews%40micro-x.com%7C287cb7d25ae24c04f20a08dab098ef66%7Cad206e7b8a5d4d9aabf6ab3a9fd2c934%7C0%7C0%7C638016468167854213%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vgFUEsxxOnxgHAJR4AtreU1EuzZAUn34IaggxushrDA%3D&reserved=0>*

        

    *From:*Cinaed Simson <cinaed.sim...@gmail.com>
    <mailto:cinaed.sim...@gmail.com>
    *Sent:* Thursday, October 13, 2022 8:57 PM
    *To:* Michael Matthews <mmatth...@micro-x.com>
    <mailto:mmatth...@micro-x.com>
    *Subject:* Re: Problems with gr-modtool on Ubuntu 20.04 (gnuradio
    3.10.4)

    The tool

    gr-modtool

    creates the directories and the files needed by cmake in

      $HOME/gr-customModule

    There are 9 CMakeLists.txt in my directory - ones for grc, python,
    etc.

    Then cmake creates the Makefiles needed by make to perform the
    install on the system.

    You should be able to create a build directory

       $HOME/gr-customModule/build

    and if you

      cd $HOME/gr-customModule/build

    then type

      cmake ..

    it should work.

    If it doesn't then it's most likely operator error.

    Further, you're not required to follow the procedure in the
    tutorial but then you're on your own.

    I'm running

       gnuradio 3.10.4

    and

       cmake 3.18.4-2

    -- Cinaed

    On 10/8/22 18:56, Michael Matthews wrote:

        Hi Cinead,

        I should clarify that I am following the tutorial for Creating
        C++ OOT with gr-modtool.

        Cmake was invoked from ./build with as

        $ cmake ..

        and it resulted in the error I listed previously.

        I also tried invoking cmake from . as

        $ cmake -S . -B build/

        This also resulted in the same error.

        Vasil did give me a solution that did seem to work, which was
        to invoke cmake from ./build as

        $ cmake -DCMAKE_FIND_ROOT_PATH=/usr ..

        After cmake worked, I used

        $ make

        $ sudo make install

        and that worked as intended.

        I should also mention that from my experience with gnuradio
        3.10.4, lib/CMakeLists.txt was already created prior to
        invoking cmake for the first time.

        $ gr_modtool newmod customModule

        from .. seemed to create all the CMakeLists.txt files in the
        following directories:

        .

        ./apps

        ./docs

        ./docs/doxygen

        ./grc

        ./include/gnuradio/customModule

        ./lib

        ./python/customModule

        ./python/customModule/bindings

        Using

        $ gr_modtool add multDivSelect

        from . added no new CMakeLists.txt files and only edited
        ./grc/CMakeLists.txt (according to what the tool printed to
        the terminal)

        I should also mention that I installed gnuradio 3.10.4 on
        Ubuntu 20.04 from the ppa using:

        $ sudo add-apt-repository ppa:gnuradio/gnuradio-releases

        $ sudo apt-get update

        $ sudo apt-get install gnuradio

        $ sudo apt-get install gnuradio-dev \

        libiio-dev \

        libad9361-dev \

        libspdlog-dev \

        python3-packaging \

        python3-jsonschema \

        cmake \

        doxygen \

        clang-format

        This set of commands was taken from the InstallGR
        
<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.gnuradio.org%2Findex.php%3Ftitle%3DInstallingGR&data=05%7C01%7Cmmatthews%40micro-x.com%7C287cb7d25ae24c04f20a08dab098ef66%7Cad206e7b8a5d4d9aabf6ab3a9fd2c934%7C0%7C0%7C638016468167854213%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cYf2DtyY9grutBoJ4tLNMFuzdVqFt5zgzU9P0I6%2FhkQ%3D&reserved=0>
        tutorial, UbuntuInstall
        
<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.gnuradio.org%2Findex.php%3Ftitle%3DUbuntuInstall&data=05%7C01%7Cmmatthews%40micro-x.com%7C287cb7d25ae24c04f20a08dab098ef66%7Cad206e7b8a5d4d9aabf6ab3a9fd2c934%7C0%7C0%7C638016468168010443%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DBvOCJwp1oDrhOMGj50sJJxRKPJlucB33QXiUrpLZwk%3D&reserved=0>
        tutorial, and the Creating C++ OOT with gr-modtool
        
<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.gnuradio.org%2Findex.php%3Ftitle%3DCreating_c%252B%252B_OOT_with_gr-modtool&data=05%7C01%7Cmmatthews%40micro-x.com%7C287cb7d25ae24c04f20a08dab098ef66%7Cad206e7b8a5d4d9aabf6ab3a9fd2c934%7C0%7C0%7C638016468168010443%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RpV%2BaPwj4iP3j%2BsZB2xvcuwF3X%2Fs3%2Be%2FsmH2Y2ePTlQ%3D&reserved=0>
        tutorial.

        I hope this helps clarify my issue.

        Thank you,

        Michael Matthews
        Graduate Software Engineer
        Mobile: +1 847 714 4809

                

        Micro-X
        
<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicro-x.com%2F&data=05%7C01%7Cmmatthews%40micro-x.com%7C287cb7d25ae24c04f20a08dab098ef66%7Cad206e7b8a5d4d9aabf6ab3a9fd2c934%7C0%7C0%7C638016468168010443%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zBOqAIyldfkypb941Np2M7wRbt%2FZ%2BU3FNhRw4EILELI%3D&reserved=0>

        855 South 192nd St, Suite 600
        SeaTac, WA, 98148, United States
        *www.micro-x.com
        
<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicro-x.com%2F&data=05%7C01%7Cmmatthews%40micro-x.com%7C287cb7d25ae24c04f20a08dab098ef66%7Cad206e7b8a5d4d9aabf6ab3a9fd2c934%7C0%7C0%7C638016468168010443%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zBOqAIyldfkypb941Np2M7wRbt%2FZ%2BU3FNhRw4EILELI%3D&reserved=0>*

                

        *From:*Discuss-gnuradio
        <discuss-gnuradio-bounces+mmatthews=micro-x....@gnu.org>
        <mailto:discuss-gnuradio-bounces+mmatthews=micro-x....@gnu.org>
        *On Behalf Of *Cinaed Simson
        *Sent:* Saturday, October 8, 2022 5:44 PM
        *To:* discuss-gnuradio@gnu.org
        *Subject:* Re: Problems with gr-modtool on Ubuntu 20.04
        (gnuradio 3.10.4)

        Oops - you should only be invoking cmake once - not twice - as
        I implied in my reply.

        It's cmake then make.

        -- Cinaed



        On 10/8/22 16:28, Cinaed Simson wrote:

            Hi Michael - you really need to show where and how you're
            invoking cmake.

            The first time you invoke cmake in the ./build directory
            it should be as

              cmake ..

            so it can create the

               lib/CMakeLists.txt

            which incidentally, it can't find.

            Also, you should NOT be seeing this entry

               -- Using install prefix: /usr/local

            the first time you invoke cmake.

            Otherwise, my guess is you're just invoking cmake incorrectly.

            If you have an alias for cmake try using

              \cmake ..

            the first time you run cmake which will override the alias.

            -- Cinaed



            On 10/2/22 22:21, Michael Matthews wrote:

                Hello,

                I am new to gnuradio and have been going through the
                tutorials. I have been specifically interested in
                Creating C++  OOT with gr-modtool
                
<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.gnuradio.org%2Findex.php%3Ftitle%3DCreating_c%252B%252B_OOT_with_gr-modtool&data=05%7C01%7Cmmatthews%40micro-x.com%7C287cb7d25ae24c04f20a08dab098ef66%7Cad206e7b8a5d4d9aabf6ab3a9fd2c934%7C0%7C0%7C638016468168010443%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RpV%2BaPwj4iP3j%2BsZB2xvcuwF3X%2Fs3%2Be%2FsmH2Y2ePTlQ%3D&reserved=0>
                but I seem to be getting errors when trying to use
                cmake to create the make files.

                My cmake errors are:

                -- The CXX compiler identification is GNU 9.4.0

                -- The C compiler identification is GNU 9.4.0

                -- Check for working CXX compiler: /bin/c++

                -- Check for working CXX compiler: /bin/c++ -- works

                -- Detecting CXX compiler ABI info

                -- Detecting CXX compiler ABI info - done

                -- Detecting CXX compile features

                -- Detecting CXX compile features - done

                -- Check for working C compiler: /bin/cc

                -- Check for working C compiler: /bin/cc -- works

                -- Detecting C compiler ABI info

                -- Detecting C compiler ABI info - done

                -- Detecting C compile features

                -- Detecting C compile features - done

                -- Looking for pthread.h

                -- Looking for pthread.h - found

                -- Performing Test CMAKE_HAVE_LIBC_PTHREAD

                -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed

                -- Looking for pthread_create in pthreads

                -- Looking for pthread_create in pthreads - not found

                -- Looking for pthread_create in pthread

                -- Looking for pthread_create in pthread - found

                -- Found Threads: TRUE

                -- Found PkgConfig: /bin/pkg-config (found version
                "0.29.1")

                -- Checking for module 'gmp'

                --   Found gmp, version 6.2.0

                -- Found GMP: /usr/lib/x86_64-linux-gnu/libgmpxx.so

                -- Using GMP.

                -- Found MPLIB: /usr/lib/x86_64-linux-gnu/libgmpxx.so

                -- Found Boost:
                /lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake
                (found suitable version "1.71.0", minimum required is
                "1.71.0") found components: date_time program_options
                system regex thread unit_test_framework

                -- Found Volk: Volk::volk

                -- User set python executable /usr/bin/python3

                -- Found PythonInterp: /usr/bin/python3 (found version
                "3.8.10")

                -- Found PythonLibs:
                /usr/lib/x86_64-linux-gnu/libpython3.8.so (found
                suitable exact version "3.8.10")

                -- Check if the system is big endian

                -- Searching 16 bit integer

                -- Looking for sys/types.h

                -- Looking for sys/types.h - found

                -- Looking for stdint.h

                -- Looking for stdint.h - found

                -- Looking for stddef.h

                -- Looking for stddef.h - found

                -- Check size of unsigned short

                -- Check size of unsigned short - done

                -- Using unsigned short

                -- Check if the system is big endian - little endian

                -- Performing Test HAVE_VISIBILITY_HIDDEN

                -- Performing Test HAVE_VISIBILITY_HIDDEN - Success

                -- Performing Test HAVE_WARN_SIGN_COMPARE

                -- Performing Test HAVE_WARN_SIGN_COMPARE - Success

                -- Performing Test HAVE_WARN_ALL

                -- Performing Test HAVE_WARN_ALL - Success

                -- Performing Test HAVE_WARN_NO_UNINITIALIZED

                -- Performing Test HAVE_WARN_NO_UNINITIALIZED - Success

                -- Found Git: /bin/git

                -- Found Doxygen: /usr/local/bin/doxygen (found
                version "1.9.5
                (2f6875a5ca481a69a6f32650c77a667f87d25e88)") found
                components: doxygen missing components: dot

                -- Using install prefix: /usr/local

                -- Building for version: 1.0.0.0 / 1.0.0

                -- No C++ unit tests... skipping

                -- PYTHON and GRC components are enabled

                -- Python checking for pygccxml - found

                -- Found PythonLibs:
                /usr/lib/x86_64-linux-gnu/libpython3.8.so

                -- Performing Test HAS_FLTO

                -- Performing Test HAS_FLTO - Success

                -- LTO enabled

                -- Configuring done

                CMake Error in lib/CMakeLists.txt:

                  Imported target "gnuradio::gnuradio-runtime"
                includes non-existent path

                    "/include"

                  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible
                reasons include:

                  * The path was deleted, renamed, or moved to another
                location.

                  * An install or uninstall procedure did not complete
                successfully.

                  * The installation package was faulty and references
                files it does not

                  provide.

                CMake Error in lib/CMakeLists.txt:

                  Imported target "gnuradio::gnuradio-runtime"
                includes non-existent path

                    "/include"

                  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible
                reasons include:

                  * The path was deleted, renamed, or moved to another
                location.

                  * An install or uninstall procedure did not complete
                successfully.

                  * The installation package was faulty and references
                files it does not

                  provide.

                CMake Error in
                python/customModule/bindings/CMakeLists.txt:

                  Imported target "Boost::date_time" includes
                non-existent path

                    "/include"

                  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible
                reasons include:

                  * The path was deleted, renamed, or moved to another
                location.

                  * An install or uninstall procedure did not complete
                successfully.

                  * The installation package was faulty and references
                files it does not

                  provide.

                CMake Error in
                python/customModule/bindings/CMakeLists.txt:

                  Imported target "Boost::date_time" includes
                non-existent path

                    "/include"

                  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible
                reasons include:

                  * The path was deleted, renamed, or moved to another
                location.

                  * An install or uninstall procedure did not complete
                successfully.

                  * The installation package was faulty and references
                files it does not

                  provide.

                -- Generating done

                CMake Generate step failed. Build files cannot be
                regenerated correctly.

                Has anyone else had this issue before? I have tried
                uninstalling and reinstalling using apt, following the
                instructions from the wiki, but I am unsure where to
                go from there.  Any help solving this would be greatly
                appreciated!

                Thank you,

                Michael Matthews
                Graduate Software Engineer
                Mobile: +1 847 714 4809

                        

                Image removed by sender. Micro-X
                
<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicro-x.com%2F&data=05%7C01%7Cmmatthews%40micro-x.com%7C287cb7d25ae24c04f20a08dab098ef66%7Cad206e7b8a5d4d9aabf6ab3a9fd2c934%7C0%7C0%7C638016468168010443%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zBOqAIyldfkypb941Np2M7wRbt%2FZ%2BU3FNhRw4EILELI%3D&reserved=0>

                855 South 192nd St, Suite 600
                SeaTac, WA, 98148, United States
                *www.micro-x.com*
                
<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmicro-x.com%2F&data=05%7C01%7Cmmatthews%40micro-x.com%7C287cb7d25ae24c04f20a08dab098ef66%7Cad206e7b8a5d4d9aabf6ab3a9fd2c934%7C0%7C0%7C638016468168010443%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zBOqAIyldfkypb941Np2M7wRbt%2FZ%2BU3FNhRw4EILELI%3D&reserved=0>

                        

Reply via email to