discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] undefined reference to `pthread_create' while pyb


From: Vasil Velichkov
Subject: Re: [Discuss-gnuradio] undefined reference to `pthread_create' while pybombs installation
Date: Wed, 25 Sep 2019 22:15:22 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0

Hi Sumit,

On 25/09/2019 21.25, sumit kumar wrote:
> Attaching output of Configuration (which failed)
> 
> On Wed, 25 Sep 2019 at 20:12, sumit kumar <address@hidden> wrote:
> 
>> Hi,
>> I am getting undefined reference to `pthread_create' when I am
>> installing GNU Radio using pybombs. The desktop has fresh install of ubuntu
>> 18.04.
>> Error and Output log files are attached.

The problem is that cmake cannot find numpy.

> -- Python checking for numpy - not found
> -- 
> -- Configuring gnuradio-companion support...
> --   Dependency ENABLE_GNURADIO_RUNTIME = ON
> --   Dependency ENABLE_PYTHON = ON
> --   Dependency PYTHON_MIN_VER_FOUND = TRUE
> --   Dependency PYYAML_FOUND = TRUE
> --   Dependency MAKO_FOUND = TRUE
> --   Dependency PYGI_FOUND = TRUE
> --   Dependency GTK_GI_FOUND = TRUE
> --   Dependency CAIRO_GI_FOUND = TRUE
> --   Dependency PANGOCAIRO_GI_FOUND = TRUE
> --   Dependency NUMPY_FOUND = FALSE
> CMake Error at cmake/Modules/GrComponent.cmake:75 (message):
>   user force-enabled gnuradio-companion but configuration checked failed

It should have been installed by pybombs as the gnuradio recipe contains numpy 
as dependency [1] and numpy recipe contains deb packages for both python2 [2] 
and python3 [3].

> ubadmin@ub-exotic02:~$ pybombs prefix init -a default prefix/default/ -R 
> gnuradio-default
> PyBOMBS.ConfigManager - INFO - Prefix Python version is: 2.7.15

You have used pip to install pybombs and currently in ubuntu 18.04 pip uses 
python2 while pip3 uses python3.

> -- User set python executable /usr/bin/python3.6
> -- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.8", 
> minimum required is "2.7.6") 
> -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found 
> suitable exact version "3.6.8") 
> -- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so (found 
> suitable version "3.6.8", minimum required is "2.7.6") 

When both python3 and python2 are available gnuradio's cmake will choose 
python3 and mixing python2 (the one used by pybombs) with python3 (the one used 
by cmake) could lead to many hard to debug problems.

My advice is to remove the pybombs that is using python2, then install it using 
pip3, remove your prefix directory and ~/.pybombs (or use another directory) 
and start from scratch. It should be something like:

   pip uninstall pybombs
   pip3 install pybombs
   rm -rf prefix/default/
   rm -rf ~/.pybombs
   pybombs auto-config
   pybombs add-defaults
   pybombs prefix init -a default prefix/default/ -R gnuradio-default

An alternative approach could be to modify the gnuradio recipe 
(~/.pybombs/recipes/gr-recipes/gnuradio.lwr) and add 
"-DPYTHON_EXECUTABLE=/usr/bin/python2" at the end of config_opt string

     config_opt: " -DENABLE_DOXYGEN=$builddocs -DENABLE_GR_AUDIO=ON 
-DENABLE_GR_BLOCKS=ON -DENABLE_GR_DIGITAL=ON -DENABLE_GR_FEC=ON 
-DENABLE_GR_FFT=ON -DENABLE_GR_FILTER=ON -DENABLE_GR_QTGUI=ON 
-DENABLE_GR_UHD=ON -DENABLE_PYTHON=ON -DENABLE_VOLK=ON -DENABLE_GRC=ON 
-DPYTHON_EXECUTABLE=/usr/bin/python2"  

[1] https://github.com/gnuradio/gr-recipes/blob/deb170d/gnuradio.lwr#L30
[2] https://github.com/gnuradio/gr-recipes/blob/deb170d/numpy.lwr#L27
[3] https://github.com/gnuradio/gr-recipes/blob/deb170d/numpy.lwr#L34

Regards,
Vasil



reply via email to

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