EttusResearch / uhd

The USRP™ Hardware Driver Repository
http://uhd.ettus.com
Other
999 stars 666 forks source link

Drop FindPythonInterp for cmake #804

Open eddsalkield opened 2 weeks ago

eddsalkield commented 2 weeks ago

Issue Description

The build fails in CMake version 3.27 because the FindPythonInterp and FindPythonLibs modules are removed.

Setup Details

    cmake -B build-host -G Ninja \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=lib \
        -DENABLE_PYTHON_API=ON \
        -DCMAKE_BUILD_TYPE=MinSizeRel \
        -DNEON_SIMD_ENABLE=$neon \
        -DUHD_VERSION=$pkgver \
        host
    cmake --build build-host

Actual Behaviour

...
CMake Warning (dev) at cmake/Modules/UHDPython.cmake:314 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  cmake/Modules/UHDVersion.cmake:9 (include)
  cmake/Modules/UHDPackage.cmake:9 (include)
  CMakeLists.txt:107 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.
...
uhd/src/uhd-4.7.0.0/host/python/pyuhd.cpp:13:10: fatal error: numpy/arrayobject.h: No such file or directory
   13 | #include <numpy/arrayobject.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: subcommand failed
joergho commented 1 week ago

Thanks @eddsalkield for reporting. Can you give more information on your environment? Which Linux distribution and version are you using and what is the output of the first cmake command?