1

我刚从 Kickstarter 获得了我的 ne HackRF。在 Windows 上与 SDR# 配合使用效果很好,因此产品还可以。为了真正使用它,我尝试让 GNURadio 在我的 Mac 上工作,遵循这个官方教程:https ://github.com/robotastic/homebrew-hackrf

但是,编译后运行 gnuradio 失败:

Bella:~ feejai$ gnuradio-companion

/usr/local/bin/gnuradio-companion:70: GtkWarning: Das Symbol »gnuradio-grc« konnte
nicht gefunden werden, ebenso wenig wie das Thema »hicolor«. Möglicherweise müssen Sie
es installieren.
Sie können sich eine Kopie herunterladen unter:
    http://icon-theme.freedesktop.org/releases
  try: gtk.window_set_default_icon(gtk.IconTheme().load_icon('gnuradio-grc', 256, 0))
Warning: Block with key "analog_agc2_xx" already exists.
    Ignoring: /usr/local/Cellar/gnuradio/3.6.5.1/share/gnuradio/grc/blocks/analog_agc2_xx.xml
Warning: Block with key "analog_agc_xx" already exists.
    Ignoring: /usr/local/Cellar/gnuradio/3.6.5.1/share/gnuradio/grc/blocks/analog_agc_xx.xml
Warning: Block with key "analog_cpfsk_bc" already exists.
    Ignoring: /usr/local/Cellar/gnuradio/3.6.5.1/share/gnuradio/grc/blocks/analog_cpfsk_bc.xml
Warning: Block with key "analog_ctcss_squelch_ff" already exists.
    Ignoring: /usr/local/Cellar/gnuradio/3.6.5.1/share/gnuradio/grc/blocks/analog_ctcss_squelch_ff.xml
Warning: Block with key "analog_dpll_bb" already exists.

....

Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

我什至不知道为什么第一条错误消息是德语,我的操作系统和所有环境变量都设置为英语。

这可能是 python 和 xquartz 的问题,在 gtk+ 上搜索时看到了类似的错误消息 - 但还没有解决方案。

4

2 回答 2

5
Fatal Python error: PyThreadState_Get: no current thread

如果 GNU Radio 编译的 Python 版本与运行时使用的 Python 版本不同,则可能会发生此错误。

在我自己的情况下,我从源代码编译 GNU Radio,并从 MacPorts 安装了 Python;-DPYTHON_LIBRARY=/opt/local/lib/libpython2.7.dylib解决方案是在配置 GNU Radio 时在命令中包含该选项cmake(请注意,该/opt/local/lib部分特定于 MacPorts Python)。我在这篇博文中找到了这个建议。

我不能肯定这个特定的改变会起作用,因为你可能还有其他不匹配的地方,但我希望这有助于弄清楚发生了什么。

(如果您愿意尝试使用 MacPorts 而不是 Homebrew,我可以说 HackRF 的 gnuradio 和 gr-osmosdr 包“开箱即用”可以正常工作。)

于 2014-09-04T01:19:21.483 回答
0

由于我是新人,我无法“投票”凯文的回复,但这就是问题的要旨:不匹配的 Python 可执行文件和库链接。

笔记:

  • 如果您尚未订阅 GNU Radio 用户讨论列表,您会发现它是解决此类问题的绝佳资源。 https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

  • MacPorts 提供了一个“hackrf”端口,我与他们的 GIT 大师保持同步。您通常可以使用它而不是手动从源安装(“sudo port install hackrf”)。MacPorts 还提供了 GNU Radio 和 UHD 的版本(“sudo port install gnuradio”、“sudo port install uhd”)以及开发版本,我也与它们各自的 GIT 主分支保持同步(“sudo port install gnuradio-devel ", "sudo 端口安装 uhd-devel")。

于 2014-10-01T15:42:29.330 回答