0

我通过 macports 安装了 gnuradio。我已经能够通过 macports 安装大多数其他块,但是我想开始使用 DECT 并且该块没有在 macports 上列出。所以我手动去通过以下git位置安装它:https ://github.com/pavelyazev/gr-dect2

当我使用标准安装进行安装时,gnuradio 根本没有看到该块。经过研究,我发现其他人通过修改下面的 cmake 调用取得了成功。

cd gr-dect2/
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/opt/local ..
make
sudo make install

然后我能够在 gnuradio 中看到 dect2 块,但是当我运行示例 dect2.grc 项目时,我收到以下消息:

Traceback (most recent call last):
  File "/Users/krotovd/gr-dect2/grc/top_block.py", line 32, in <module>
    import dect2
ImportError: No module named dect2

所以我找到了其他模块的安装位置,删除了构建目录并调用了原始的构建/安装命令,并对 cmake 进行了修改,如下所示。

cmake -DCMAKE_INSTALL_PREFIX=/opt/local/Library/Frameworks/Python.framework/Versions/2.7 

现在,当我打开 gnuradio-companion 并继续打开 detc2.grc 项目时,它会因标题中的错误而崩溃:

Loading: "/Users/krotovd/gr-dect2/grc/dect2.grc"
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

有没有人能够在 Mac 中成功地为 gnuradio 安装 dec2 块?似乎这个问题已经有一段时间了。有人对我如何解决这个问题有任何想法吗?

以下是我的错误报告的摘录。由于尺寸的原因,我插入了 except,但我相信应该列出重要的内容。

Process:               Python [1753]
Path:                  /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier:            Python
Version:               2.7.13 (2.7.13)
Code Type:             X86-64 (Native)
Parent Process:        bash [546]
Responsible:           Python [1753]
User ID:               501

Date/Time:             2017-01-23 20:38:31.511 -0500
OS Version:            Mac OS X 10.12.2 (16C68)
Report Version:        12
Anonymous UUID:        E0592F8C-772E-3B7D-EAF2-2AB68A3171B3


Time Awake Since Boot: 2800 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fffd3291dd6 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fffd337d787 pthread_kill + 90
2   libsystem_c.dylib               0x00007fffd31f7420 abort + 129
3   org.python.python               0x00000001280ff8ee Py_FatalError + 49
4   org.python.python               0x00000001280fede8 PyThreadState_Get + 28
5   org.python.python               0x00000001280fbce2 Py_InitModule4_64 + 62
6   _dect2_swig.so                  0x0000000128002bb0 init_dect2_swig + 800
7   org.python.python               0x000000010f5372ec _PyImport_LoadDynamicModule + 140
8   org.python.python               0x000000010f535cef import_submodule + 271
9   org.python.python               0x000000010f535778 load_next + 280
10  org.python.python               0x000000010f53480e PyImport_ImportModuleLevel + 1230
11  org.python.python               0x000000010f50d7c7 builtin___import__ + 135
12  org.python.python               0x000000010f519f91 PyEval_EvalFrameEx + 29441
13  org.python.python               0x000000010f512947 PyEval_EvalCodeEx + 2119
14  org.python.python               0x000000010f51ed46 fast_function + 118
15  org.python.python               0x000000010f519e87 PyEval_EvalFrameEx + 29175
16  org.python.python               0x000000010f51ee22 fast_function + 338
17  org.python.python               0x000000010f519e87 PyEval_EvalFrameEx + 29175
18  org.python.python               0x000000010f512947 PyEval_EvalCodeEx + 2119
19  org.python.python               0x000000010f5120f6 PyEval_EvalCode + 54
20  org.python.python               0x000000010f5331a1 PyImport_ExecCodeModuleEx + 241
21  org.python.python               0x000000010f536273 load_source_module + 1059
22  org.python.python               0x000000010f535cef import_submodule + 271
23  org.python.python               0x000000010f535778 load_next + 280
24  org.python.python               0x000000010f5347b2 PyImport_ImportModuleLevel + 1138
25  org.python.python               0x000000010f50d7c7 builtin___import__ + 135
26  org.python.python               0x000000010f46f203 PyObject_Call + 99
27  org.python.python               0x000000010f518429 PyEval_EvalFrameEx + 22425
28  org.python.python               0x000000010f512947 PyEval_EvalCodeEx + 2119
29  org.python.python               0x000000010f5120f6 PyEval_EvalCode + 54
30  org.python.python               0x000000010f5331a1 PyImport_ExecCodeModuleEx + 241
31  org.python.python               0x000000010f536273 load_source_module + 1059
32  org.python.python               0x000000010f5365ef load_package + 303
33  org.python.python               0x000000010f535cef import_submodule + 271
34  org.python.python               0x000000010f535778 load_next + 280
35  org.python.python               0x000000010f5347b2 PyImport_ImportModuleLevel + 1138
36  org.python.python               0x000000010f50d7c7 builtin___import__ + 135
37  org.python.python               0x000000010f46f203 PyObject_Call + 99
38  org.python.python               0x000000010f518429 PyEval_EvalFrameEx + 22425
39  org.python.python               0x000000010f512947 PyEval_EvalCodeEx + 2119
40  org.python.python               0x000000010f5120f6 PyEval_EvalCode + 54
41  org.python.python               0x000000010f5419df PyRun_StringFlags + 127
42  org.python.python               0x000000010f51303a PyEval_EvalFrameEx + 938
43  org.python.python               0x000000010f512947 PyEval_EvalCodeEx + 2119
44  org.python.python               0x000000010f51ed46 fast_function + 118
45  org.python.python               0x000000010f519e87 PyEval_EvalFrameEx + 29175
46  org.python.python               0x000000010f51ee22 fast_function + 338
47  org.python.python               0x000000010f519e87 PyEval_EvalFrameEx + 29175
48  org.python.python               0x000000010f51ee22 fast_function + 338
49  org.python.python               0x000000010f519e87 PyEval_EvalFrameEx + 29175
50  org.python.python               0x000000010f512947 PyEval_EvalCodeEx + 2119
51  org.python.python               0x000000010f4965bb function_call + 363
52  org.python.python               0x000000010f46f203 PyObject_Call + 99
53  org.python.python               0x000000010f47d3a6 instancemethod_call + 182
54  org.python.python               0x000000010f46f203 PyObject_Call + 99
55  org.python.python               0x000000010f4ce90f slot_tp_init + 175
56  org.python.python               0x000000010f4caadb type_call + 347
57  org.python.python               0x000000010f46f203 PyObject_Call + 99
58  org.python.python               0x000000010f51a19d PyEval_EvalFrameEx + 29965
59  org.python.python               0x000000010f512947 PyEval_EvalCodeEx + 2119
60  org.python.python               0x000000010f51ed46 fast_function + 118
61  org.python.python               0x000000010f519e87 PyEval_EvalFrameEx + 29175
62  org.python.python               0x000000010f512947 PyEval_EvalCodeEx + 2119
63  org.python.python               0x000000010f51ed46 fast_function + 118
64  org.python.python               0x000000010f519e87 PyEval_EvalFrameEx + 29175
65  org.python.python               0x000000010f512947 PyEval_EvalCodeEx + 2119
66  org.python.python               0x000000010f4965bb function_call + 363
67  org.python.python               0x000000010f46f203 PyObject_Call + 99
68  org.python.python               0x000000010f47d3a6 instancemethod_call + 182
69  org.python.python               0x000000010f46f203 PyObject_Call + 99
70  org.python.python               0x000000010f51e7c5 PyEval_CallObjectWithKeywords + 165
71  _gobject.so                     0x0000000112dfe5cf pyg_closure_marshal + 212
72  libgobject-2.0.0.dylib          0x0000000112bd3a0d g_closure_invoke + 258
73  libgobject-2.0.0.dylib          0x0000000112be6f6a signal_emit_unlocked_R + 1768
74  libgobject-2.0.0.dylib          0x0000000112be7cb0 g_signal_emit_valist + 2028
75  libgobject-2.0.0.dylib          0x0000000112be8362 g_signal_emit + 134
76  libgtk-x11-2.0.0.dylib          0x000000011327595f gtk_widget_activate + 73
77  libgtk-x11-2.0.0.dylib          0x000000011318a275 gtk_menu_shell_activate_item + 241
78  libgtk-x11-2.0.0.dylib          0x000000011318ae1f gtk_menu_shell_button_release + 576
79  libgtk-x11-2.0.0.dylib          0x000000011317aa48 _gtk_marshal_BOOLEAN__BOXED + 95
80  libgobject-2.0.0.dylib          0x0000000112bd3a0d g_closure_invoke + 258
81  libgobject-2.0.0.dylib          0x0000000112be70d8 signal_emit_unlocked_R + 2134
82  libgobject-2.0.0.dylib          0x0000000112be7d0c g_signal_emit_valist + 2120
83  libgobject-2.0.0.dylib          0x0000000112be8362 g_signal_emit + 134
84  libgtk-x11-2.0.0.dylib          0x000000011327576f gtk_widget_event_internal + 573
85  libgtk-x11-2.0.0.dylib          0x0000000113178d4c gtk_propagate_event + 316
86  libgtk-x11-2.0.0.dylib          0x0000000113178961 gtk_main_do_event + 784
87  libgdk-x11-2.0.0.dylib          0x00000001134b3e02 gdk_event_dispatch + 81
88  libglib-2.0.0.dylib             0x0000000112c4248e g_main_context_dispatch + 279
89  libglib-2.0.0.dylib             0x0000000112c4277d g_main_context_iterate + 413
90  libglib-2.0.0.dylib             0x0000000112c429d3 g_main_loop_run + 207
91  libgtk-x11-2.0.0.dylib          0x00000001131783b2 gtk_main + 180
92  _gtk.so                         0x0000000112e6b00b _wrap_gtk_main + 243
93  org.python.python               0x000000010f519fc3 PyEval_EvalFrameEx + 29491
94  org.python.python               0x000000010f51ee22 fast_function + 338
95  org.python.python               0x000000010f519e87 PyEval_EvalFrameEx + 29175
96  org.python.python               0x000000010f51ee22 fast_function + 338
97  org.python.python               0x000000010f519e87 PyEval_EvalFrameEx + 29175
98  org.python.python               0x000000010f512947 PyEval_EvalCodeEx + 2119
99  org.python.python               0x000000010f5120f6 PyEval_EvalCode + 54
100 org.python.python               0x000000010f541824 PyRun_FileExFlags + 164
101 org.python.python               0x000000010f54135e PyRun_SimpleFileExFlags + 702
102 org.python.python               0x000000010f557b1d Py_Main + 2925
103 libdyld.dylib                   0x00007fffd3163255 start + 1

Thread 1:
0   libsystem_kernel.dylib          0x00007fffd32924e2 __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fffd337a5fe _pthread_wqthread + 1023
2   libsystem_pthread.dylib         0x00007fffd337a1ed start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000006  rcx: 0x00007fff5079f2d8  rdx: 0x0000000000000000
  rdi: 0x0000000000000307  rsi: 0x0000000000000006  rbp: 0x00007fff5079f300  rsp: 0x00007fff5079f2d8
   r8: 0x0000000000000040   r9: 0x00007fffdbf8f040  r10: 0x0000000008000000  r11: 0x0000000000000206
  r12: 0x00007f8052f7aa00  r13: 0x0000000128031a10  r14: 0x00007fffdbfab3c0  r15: 0x000000010f5f4bd8
  rip: 0x00007fffd3291dd6  rfl: 0x0000000000000206  cr2: 0x00007fffdbf8d128

Logical CPU:     0
Error Code:      0x02000148
Trap Number:     133


Binary Images:
       0x10f45c000 -        0x10f45dff3 +org.python.python (2.7.13 - 2.7.13) <4031A4B2-CD49-3FB0-9724-9F0C756687F4> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
       0x10f460000 -        0x10f59bfff +org.python.python (2.7.13, [c] 2001-2016 Python Software Foundation. - 2.7.13) <38C706B7-56D9-3A4D-A882-E7CB1BD22812> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python
       0x10f822000 -        0x10f824fff +_locale.so (0) <48641A39-37F1-3CE1-84E2-D7B84805CDFE> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
       0x10f828000 -        0x10f830ff3 +libintl.8.dylib (0) <34C7A792-8F97-3B47-BE05-892044CF0A65> /opt/local/lib/libintl.8.dylib

.....

    0x7fffd3364000 -     0x7fffd336dff3  libsystem_notify.dylib (165.20.1) <E7FD3A7C-DD07-36E2-9FA4-7561F9F114DA> /usr/lib/system/libsystem_notify.dylib
    0x7fffd336e000 -     0x7fffd3376fe7  libsystem_platform.dylib (126.1.2) <3CA06D4E-C00A-36DE-AA65-3A390097D1F6> /usr/lib/system/libsystem_platform.dylib
    0x7fffd3377000 -     0x7fffd3381ff7  libsystem_pthread.dylib (218.30.1) <C869ED7C-BE29-3532-8E69-3A8DA1447EDC> /usr/lib/system/libsystem_pthread.dylib
    0x7fffd3382000 -     0x7fffd3385ff7  libsystem_sandbox.dylib (592.31.1) <7BBFDF96-293F-3DD9-B3A4-7C168280B441> /usr/lib/system/libsystem_sandbox.dylib
    0x7fffd3386000 -     0x7fffd3387fff  libsystem_secinit.dylib (24) <5C1F1E47-0F7D-3E25-8DEB-D9DB1F902281> /usr/lib/system/libsystem_secinit.dylib
    0x7fffd3388000 -     0x7fffd338ffff  libsystem_symptoms.dylib (532.30.6) <5D990CF5-B58F-39F7-B375-99B4EC62CFBD> /usr/lib/system/libsystem_symptoms.dylib
    0x7fffd3390000 -     0x7fffd33b0ff7  libsystem_trace.dylib (518.30.7) <5BD4ECD4-75CA-38EA-AF5C-B481C15955F8> /usr/lib/system/libsystem_trace.dylib
    0x7fffd33b1000 -     0x7fffd33b6ffb  libunwind.dylib (35.3) <9F7C2AD8-A9A7-3DE4-828D-B0F0F166AAA0> /usr/lib/system/libunwind.dylib
    0x7fffd33b7000 -     0x7fffd33e0ff7  libxpc.dylib (972.30.7) <65E41BB6-EBD5-3D93-B0BE-B190CEE4DD93> /usr/lib/system/libxpc.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 1427
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=485.7M resident=0K(0%) swapped_out_or_unallocated=485.7M(100%)
Writable regions: Total=265.2M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=265.2M(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        2 
Dispatch continuations            16.0M        2 
Kernel Alloc Once                    8K        2 
MALLOC                           123.4M       43 
MALLOC guard page                   32K        7 
STACK GUARD                       56.0M        3 
Stack                             8712K        3 
VM_ALLOCATE                       88.5M      113 
__DATA                            61.6M      476 
__IMAGE                            528K        2 
__LINKEDIT                       162.3M      222 
__TEXT                           323.3M      425 
__UNICODE                          556K        2 
mapped file                       27.2M        4 
shared memory                      336K        8 
===========                     =======  ======= 
TOTAL                            868.5M     1299 

Model: MacBookPro10,1, BootROM MBP101.00EE.B0B, 4 processors, Intel Core i7, 2.7 GHz, 16 GB, SMC 2.3f36
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In
Graphics: NVIDIA GeForce GT 650M, NVIDIA GeForce GT 650M, PCIe, 1024 MB
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xEF), Broadcom BCM43xx 1.0 (7.21.171.68.1a4)
Bluetooth: Version 5.0.2f4, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SD512E, 500.28 GB
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: FaceTime HD Camera (Built-in)
USB Device: USB 2.0 Bus
USB Device: Hub
USB Device: Hub
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
USB Device: USB 3.0 Bus
Thunderbolt Bus: MacBook Pro, Apple Inc., 23.4
4

1 回答 1

0

试试我的 cmake 别名,它总是对我有用

别名 cm='cmake -DPYTHON_EXECUTABLE=/opt/local/bin/python2.7 -DPYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Headers -DPYTHON_LIBRARY=/opt/local/Library/Frameworks /Python.framework/Versions/2.7/Python -DGR_PYTHON_DIR=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH ="/opt/local;/usr" -DCMAKE_INSTALL_PREFIX=/opt/local'

于 2017-02-04T12:36:22.507 回答