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: sumit kumar
Subject: Re: [Discuss-gnuradio] undefined reference to `pthread_create' while pybombs installation
Date: Wed, 25 Sep 2019 21:52:03 +0200

Ok I managed to fix it but exporting the python path to dist-packages of python 3.6 (I never needed to do this when I used pybombs), 
But now I see a new thing
When I open GNU Radio companion and try to make an example
I see "ID "default" is blacklisted." Figure attached. 
So many new things today! 



On Wed, 25 Sep 2019 at 21:41, sumit kumar <address@hidden> wrote:
Hi Vasil, 
Thanks for detailed info. I did that straight away as you suggested. Installation was smooth, but now I am getting "Cannot import gnuradio" error! when I start gnuradio-companion.
I have attached the screenshot and logs

ubadmin@ub-exotic02:~$ cd prefix/
ubadmin@ub-exotic02:~/prefix$ source setup_env.sh
ubadmin@ub-exotic02:~/prefix$ gnuradio-companion
Gtk-Message: 21:39:40.832: GtkDialog mapped without a transient parent. This is discouraged.
ubadmin@ub-exotic02:~/prefix$ echo $LD_LIBRARY_PATH
/home/ubadmin/prefix/lib:/home/ubadmin/prefix/lib64/:
ubadmin@ub-exotic02:~/prefix$ 




On Wed, 25 Sep 2019 at 21:15, Vasil Velichkov <address@hidden> wrote:
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


--
Sumit Kumar




--
Sumit Kumar


Attachment: Screenshot from 2019-09-25 21-51-00.png
Description: PNG image


reply via email to

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