Project

General

Profile

Actions

Bug #4653

open

cannot import name 'fosphor'

Added by systemd almost 4 years ago. Updated almost 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/05/2020
Due date:
% Done:

0%

Resolution:
Spec Reference:

Description

I am using Linux Mint 19.3 with a NVIDIA Corporation GM107GL [Quadro K620] (rev a2), runnin GNU Radio 3.8.

I followed the instructions on the installation page (https://osmocom.org/projects/sdr/wiki/fosphor) but I receive an error when I try to use fosphor. The error says "from gnuradio import fosphor
ImportError: cannot import name 'fosphor'"

my installation went as

First installed GLFW3 and it did install great.

then, sudo apt-get install nvidia-opencl-dev opencl-headers and sudo apt-get install nvidia-modprobe

Afterwards, gr-fosphor which too installed correctly.

Would someone be nice enough to advice what solutions I may try?

Actions #1

Updated by tnt almost 4 years ago

How did you build/install gnuradio ?

You cannot mixed a packaged gnuradio and a manually built fosphor, they need to be in the same prefix.

Actions #2

Updated by systemd almost 4 years ago

tnt wrote:

How did you build/install gnuradio ?

You cannot mixed a packaged gnuradio and a manually built fosphor, they need to be in the same prefix.

I first installed both gr-fosphor and GNU Radio using the package manager. It did not work. Then, I tried to compile gr-fosphor by source. Anyway, I understand that remedying my existing situation would be very difficult.

However, do you think there is a page that advices on how we can get gr-fosphor to work on the major distributions?
Perhaps you can list out a distribution name and version in which we can simply install GNU Radio and fosphor using package manager.

Actions #3

Updated by tnt almost 4 years ago

AFAIK if there is a package it should work ... if it doesn't it should be reported to the package maintainer.

I don't use any of the package and I don't maintain any of them, this is all done by third party. But if there is a package and it doesn't work, it should be reported to the distribution bug tracker / to the package maintainer. They will in turn decide if that's a packaging bug they need to take care of, or if it's something that needs to be reported upstream.

Actions #4

Updated by systemd almost 4 years ago

tnt wrote:

AFAIK if there is a package it should work ... if it doesn't it should be reported to the package maintainer.

I don't use any of the package and I don't maintain any of them, this is all done by third party. But if there is a package and it doesn't work, it should be reported to the distribution bug tracker / to the package maintainer. They will in turn decide if that's a packaging bug they need to take care of, or if it's something that needs to be reported upstream.

Hi, thanks for your time.

I did get it to work. But not on the same PC. Here is what I did. I installed Ubuntu 20 (latest at the time of writing) to my thinkpad X220. A fresh install. Then I simply installed gnuradio and gr-fosphot using apt. However it still did not work.

Then I installed the opencl drivers

$ mkdir $HOME/tmp
$ cd $HOME/tmp
$ wget http://registrationcenter.intel.com/irc_nas/4181/opencl_runtime_14.2_x64_4.5.0.8.tgz
$ tar xf opencl_runtime_14.2_x64_4.5.0.8.tgz
$ cd pset_opencl_runtime_14.1_x64_4.5.0.8/rpm
$ alien --to-tgz opencl-1.2-base-pset-4.5.0.8-1.noarch.rpm
$ tar xf opencl-1.2-base-4.5.0.8.tgz
$ sudo mv /opt/intel /opt
$ rm -rf opt
$ alien --to-tgz opencl-1.2-intel-cpu-4.5.0.8-1.x86_64.rpm
$ tar xf opencl-1.2-intel-cpu-4.5.0.8.tgz
$ sudo mkdir -p /etc/OpenCL/vendors
$ sudo mv opt/intel/opencl-1.2-4.5.0.8/etc/intel64.icd /etc/OpenCL/vendors/
$ sudo mv opt/intel/opencl-1.2-4.5.0.8/lib64/* /opt/intel/opencl-1.2-4.5.0.8/lib64/
$ rm -rf opt

I also noticed an error in the advises. the first '/' should not be there in sudo mv /opt/intel /opt . I understand I am using an old intel driver but it works. Thats the most important part about it. It now works!

I would also like to say a word. This effort of getting gr-fosphor to work has taught me that I have no absolute idea about how libraries work in the unix system. I have questions such as once I installed the driver for an nvidia gpu, can I go back to using intel opencl? If so, how do I tell GNU Radio which driver to use when gr-fosphor is rendering? I understand that this is none of the business of the developers of this library but I would be thrilled if there were a beginer frindly tutorial on how gr-fosphor is working inside the unix system. Just so we could undertand and debug issues when this really amazing library doesn't work. A tutorial that explains how this library links with GNU Radio and other GPU drivers and what we really need to do to get this to work would be nicer than mere command based instructions.

Thanks for maintaining this library. It helps a lot to see the seeable.

Actions #5

Updated by systemd almost 4 years ago

tnt wrote:

AFAIK if there is a package it should work ... if it doesn't it should be reported to the package maintainer.
I don't use any of the package and I don't maintain any of them, this is all done by third party. But if there is a package and it doesn't work, it should be reported to the distribution bug tracker / to the package maintainer. They will in turn decide if that's a packaging bug they need to take care of, or if it's something that needs to be reported upstream.

Hi, thanks for your time.

I did get it to work. But not on the same PC. Here is what I did. I installed Ubuntu 20 (latest at the time of writing) to my thinkpad X220. A fresh install. Then I simply installed gnuradio and gr-fosphot using apt. However it still did not work.

Then I installed the opencl drivers

$ mkdir $HOME/tmp
$ cd $HOME/tmp
$ wget http://registrationcenter.intel.com/irc_nas/4181/opencl_runtime_14.2_x64_4.5.0.8.tgz
$ tar xf opencl_runtime_14.2_x64_4.5.0.8.tgz
$ cd pset_opencl_runtime_14.1_x64_4.5.0.8/rpm
$ alien --to-tgz opencl-1.2-base-pset-4.5.0.8-1.noarch.rpm
$ tar xf opencl-1.2-base-4.5.0.8.tgz
$ sudo mv /opt/intel /opt
$ rm -rf opt
$ alien --to-tgz opencl-1.2-intel-cpu-4.5.0.8-1.x86_64.rpm
$ tar xf opencl-1.2-intel-cpu-4.5.0.8.tgz
$ sudo mkdir -p /etc/OpenCL/vendors
$ sudo mv opt/intel/opencl-1.2-4.5.0.8/etc/intel64.icd /etc/OpenCL/vendors/
$ sudo mv opt/intel/opencl-1.2-4.5.0.8/lib64/* /opt/intel/opencl-1.2-4.5.0.8/lib64/
$ rm -rf opt

I also noticed an error in the advises. the first '/' should not be there in sudo mv /opt/intel /opt . I understand I am using an old intel driver but it works. Thats the most important part about it. It now works!

I would also like to say a word. This effort of getting gr-fosphor to work has taught me that I have no absolute idea about how libraries work in the unix system. I have questions such as once I installed the driver for an nvidia gpu, can I go back to using intel opencl? If so, how do I tell GNU Radio which driver to use when gr-fosphor is rendering? I understand that this is none of the business of the developers of this library but I would be thrilled if there were a beginer frindly tutorial on how gr-fosphor is working inside the unix system. Just so we could undertand and debug issues when this really amazing library doesn't work. A tutorial that explains how this library links with GNU Radio and other GPU drivers and what we really need to do to get this to work would be nicer than mere command based instructions.

Thanks for maintaining this library. It helps a lot to see the unseeable.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)