2016-09-08 3 views
2

J'essaie d'installer un bloc propre pour gnuradio. Je passe par ce tutoriel (http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorial_GNU_Radio_in_C++). Mais à l'étape 5, Installation, j'ai des problèmes.Crash Gnuradio après l'installation de son propre bloc

Je l'ai installé, mais je n'ai pas vu le bloc dans gnuradio-companion. Je ajouté le chemin:

export PYTHONPATH =/usr/local/lib/python2.7/site-packages/

export GRC_BLOCKS_PATH =/usr/local/share/gnuradio/grc/blocs/

Maintenant, je peux voir le bloc: Mais si je veux l'utiliser, le crash gnuradio-compagnon.

^[[A^[[BFatal Python error: PyThreadState_Get: no current thread 
Abort trap: 6 

gnuradio Version: 3.7.10.1

OS: OS X El Capitan

Quel pourrait être le problème? Chemin incorrect/manquant? Erreur dans le programme?

/Edit2: Pour ajouter un bloc, écrit en python fonctionne très bien (avec le tutoriel: http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorial_GNU_Radio_in_Python)

/edit: Quand je l'installe, je reçois beaucoup d'avertissements quand j'utilise CMake:

-- Build type not specified: defaulting to release. 
-- Boost version: 1.59.0 
-- Found the following Boost libraries: 
-- filesystem 
-- system 
Checking for GNU Radio Module: RUNTIME 
* INCLUDES=/opt/local/include 
* LIBS=/opt/local/lib/libgnuradio-runtime.dylib;/opt/local/lib/libgnuradio-pmt.dylib 
GNURADIO_RUNTIME_FOUND = TRUE 
CMake Warning (dev) at cmake/Modules/GrTest.cmake:45 (get_target_property): 
    Policy CMP0026 is not set: Disallow use of the LOCATION target property. 
    Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy 
    command to set the policy and suppress this warning. 

    The LOCATION property should not be read from target "test-tutorialCPP". 
    Use the target name directly with add_custom_command, or use the generator 
    expression $<TARGET_FILE>, as appropriate. 

Call Stack (most recent call first): 
    lib/CMakeLists.txt:77 (GR_ADD_TEST) 
This warning is for project developers. Use -Wno-dev to suppress it. 

-- Using install prefix: /usr/local 
-- Building for version: v1.0-compat-xxx-xunknown/1.0.0git 
-- 
-- Checking for module SWIG 
-- Found SWIG version 3.0.10. 
CMake Warning (dev) at cmake/Modules/GrTest.cmake:45 (get_target_property): 
    Policy CMP0026 is not set: Disallow use of the LOCATION target property. 
    Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy 
    command to set the policy and suppress this warning. 

    The LOCATION property should not be read from target 
    "gnuradio-tutorialCPP". Use the target name directly with 
    add_custom_command, or use the generator expression $<TARGET_FILE>, as 
    appropriate. 

Call Stack (most recent call first): 
    python/CMakeLists.txt:44 (GR_ADD_TEST) 
This warning is for project developers. Use -Wno-dev to suppress it. 

CMake Warning (dev) at cmake/Modules/GrTest.cmake:45 (get_target_property): 
    Policy CMP0045 is not set: Error on non-existent target in 
    get_target_property. Run "cmake --help-policy CMP0045" for policy details. 
    Use the cmake_policy command to set the policy and suppress this warning. 

    get_target_property() called with non-existent target 
    "/opt/local/bin/python2.7". 
Call Stack (most recent call first): 
    python/CMakeLists.txt:44 (GR_ADD_TEST) 
This warning is for project developers. Use -Wno-dev to suppress it. 

CMake Warning (dev) at cmake/Modules/GrTest.cmake:45 (get_target_property): 
    Policy CMP0045 is not set: Error on non-existent target in 
    get_target_property. Run "cmake --help-policy CMP0045" for policy details. 
    Use the cmake_policy command to set the policy and suppress this warning. 

    get_target_property() called with non-existent target 
    "/Users/abc/dev/gnuradio/modul/gr-tutorialCPP/python/qa_my_qpsk_demod_cb.py". 
Call Stack (most recent call first): 
    python/CMakeLists.txt:44 (GR_ADD_TEST) 
This warning is for project developers. Use -Wno-dev to suppress it. 

-- Configuring done 
-- Generating done 
-- Build files have been written to: /Users/abc/dev/gnuradio/modul/gr-tutorialCPP/build 
+0

Les questions sur le matériel informatique général et les logiciels sont hors-sujet pour Stack Overflow à moins qu'elles ne concernent directement des outils utilisés principalement pour la programmation. Vous pourrez peut-être obtenir de l'aide sur [Super User] (http://superuser.com/). –

Répondre

1

Cela se produit lorsque GNU Radio et votre module sont liés à différentes bibliothèques Python.

Sous OSX, il y a généralement une installation système et une autre de Homebrew ou MacPorts. Essayez de tout relier aux bibliothèques Homebrew/MacPorts. Vous semblez avoir une installation Python dans /opt/local. Utilisez cmake pour reconfigurer votre module et pointez PYTHON_LIBRARY et PYTHON_INCLUDE_DIR sur l'installation dans/opt.

+0

Merci pour votre réponse! J'ai trouvé ceci dans CMakeCache.txt: // Chemin vers un programme. PYTHON_EXECUTABLE: FILEPATH =/opt/local/bin/python2.7 // Chemin d'accès à un fichier. PYTHON_INCLUDE_DIR: PATH =/usr/include/python2.7 // Chemin d'accès à une bibliothèque. PYTHON_LIBRARY: FILEPATH =/usr/lib/libpython2.7.dylib Alors, je dois changer le chemin? Mais je n'ai aucune idée, comment faire cela. – knuut

+0

Je reçois aussi le même avertissement avec cmake, quand j'écris un nouveau bloc en python - mais ça marche bien. – knuut

+1

Le problème consiste à lier différentes bibliothèques Python dans un exécutable. C'est un problème de C++ qui, bien sûr, ne se produit pas avec des blocs uniquement Python. Plusieurs interfaces facilitent la reconfiguration des projets cmake. Vous pouvez rechercher cmake-gui, cmake-qt-gui, ccmake, etc. – bastibl