pkgsrc-Bugs archive

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

Re: pkg/59348: ham/gr-osmosdr 2025Q1 does not work





El 23/4/25 a las 19:50, ea1abz%gmail.com@localhost escribió:
Number:         59348
Category:       pkg
Synopsis:       ham/gr-osmosdr 2025Q1 does not work
Confidential:   no
Severity:       serious
Priority:       medium
Responsible:    pkg-manager
State:          open
Class:          sw-bug
Submitter-Id:   net
Arrival-Date:   Wed Apr 23 17:50:00 +0000 2025
Originator:     Ramiro Aceves
Release:        NetBSD-10.1
Organization:
Environment:
NetBSD netbsd-raspa4 10.1 NetBSD 10.1 (GENERIC64) #0: Mon Dec 16 13:08:11 UTC 2024  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm
Description:

when importing osmosdr python module it errors this way:

netbsd-raspa4$ python3.12
Python 3.12.9 (main, Apr  9 2025, 22:07:35) [GCC 10.5.0] on netbsd10
Type "help", "copyright", "credits" or "license" for more information.
import osmosdr
Traceback (most recent call last):
   File "/usr/pkg/lib/python3.12/site-packages/osmosdr/__init__.py", line 17, in <module>
     from .osmosdr_python import *
ImportError: generic_type: type "sink" referenced unknown base type "gr::hier_block2"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/pkg/lib/python3.12/site-packages/osmosdr/__init__.py", line 21, in <module>
     from .osmosdr_python import *
ImportError: generic_type: type "sink" referenced unknown base type "gr::hier_block2"

netbsd-raspa4$

netbsd-raspa4$ pkgin list|grep gr-osmosdr
gr-osmosdr-0.2.6nb5  SDR Hardware support for OsmoSDR and so many more


2024Q4 worked fine.Same issue in amd64 systems.


How-To-Repeat:
import osmosdr under python3.12
Fix:

Hello,

I have been struggling with this for days. Sorry for my lack of understanding or if I say someting stupid.

I downloaded gr-osmosdr manually:

git clone https://github.com/osmocom/gr-osmosdr.git
cd gr-osmosdr
mkdir build && cd build


export LDFLAGS="-L/usr/pkg/lib"
export CPPFLAGS="-I/usr/pkg/include"
export LD_LIBRARY_PATH="/usr/pkg/lib:$LD_LIBRARY_PATH"
export LIBRARY_PATH="/usr/pkg/lib:$LIBRARY_PATH"


cmake .. \
  -DCMAKE_INSTALL_PREFIX=/usr/pkg \
  -DPYTHON_EXECUTABLE=/usr/pkg/bin/python3.12 \
  -DENABLE_PYTHON=ON \
-Dpybind11_DIR=/usr/pkg/lib/python3.12/site-packages/pybind11/share/cmake/pybind11

Then build:

make -j4

sudo make install


And failed same way. I also compiled full gnuradio from source without any changes.


Desperated, I discovered googgling around that someone said to fix it by changing to gcc compiler 11 version (2022 post).

I changed to gcc12 adding the following before cmake

export CC=/usr/pkg/gcc12/bin/gcc
export CXX=/usr/pkg/gcc12/bin/g++

And it works perfect when importing osmosdr module under python, no error. Gnuradio-companion also works fine with my Afedri-Net receiver.

Thanks.
Ramiro.












Home | Main Index | Thread Index | Old Index