rpp0/gr-lora

AttributeError: 'module' object has no attribute 'channelizer'

Closed this issue · 9 comments

ty4tw commented

After installation, I tried Testing. but I got error messages as follows:
I checked "Common compile and runtime errors" in wiki.
all yes except site-packages, lora module is in dist-packages.
files in lora directory:

/usr/local/lib/python2.7/dist-packages/lora$ ls
__init__.py   lora_decoder.py   lora_receiver.py   message_wireshark_sink.py
__init__.pyc  lora_decoder.pyc  lora_receiver.pyc  message_wireshark_sink.pyc
__init__.pyo  lora_decoder.pyo  lora_receiver.pyo  message_wireshark_sink.pyo

Error message:

$ ./lora_receive_file.py 
Using Volk machine: avx2_64_mmx_orc
Traceback (most recent call last):
  File "./lora_receive_file.py", line 188, in <module>
    main()
  File "./lora_receive_file.py", line 182, in main
    tb = top_block_cls()
  File "./lora_receive_file.py", line 72, in __init__
    self.lora_lora_receiver_0 = lora.lora_receiver(samp_rate, 868e6, ([868.1e6]), 7, 1000000, 0.01)
  File "/usr/local/lib/python2.7/dist-packages/lora/lora_receiver.py", line 43, in __init__
    self.channelizer = lora.channelizer(in_samp_rate, out_samp_rate, center_freq, channel_list)
AttributeError: 'module' object has no attribute 'channelizer'
rpp0 commented

Hi, thanks for reporting! I presume that something went wrong during the installation of the library. I tried reinstalling on a clean VM and didn't encounter your issue. Could you post your build log if possible?

ty4tw commented

Hi,
Thank you for the quick response.

Is this enough for checking.

$ cmake ../
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not specified: defaulting to release.
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'cppunit'
--   Found cppunit, version 1.13.2
-- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so;dl  
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
Checking for GNU Radio Module: RUNTIME
-- Checking for module 'gnuradio-runtime'
--   Found gnuradio-runtime, version 3.7.12git
 * INCLUDES=/usr/local/include
 * LIBS=/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
-- Found GNURADIO_RUNTIME: /usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so  
GNURADIO_RUNTIME_FOUND = TRUE
Checking for GNU Radio Module: FILTER
-- Checking for module 'gnuradio-filter'
--   Found gnuradio-filter, version 3.7.12git
 * INCLUDES=/usr/local/include
 * LIBS=/usr/local/lib/libgnuradio-filter.so;/usr/local/lib/libgnuradio-fft.so;/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
-- Found GNURADIO_FILTER: /usr/local/lib/libgnuradio-filter.so;/usr/local/lib/libgnuradio-fft.so;/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so  
GNURADIO_FILTER_FOUND = TRUE
CMake Warning (dev) at /usr/local/lib/cmake/gnuradio/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-lora".  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:85 (GR_ADD_TEST)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- 
-- Checking for module SWIG
-- Disabling SWIG because version check failed.
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.12", minimum required is "2") 
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.12", minimum required is "2") 
CMake Warning (dev) at /usr/local/lib/cmake/gnuradio/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-lora".  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:53 (GR_ADD_TEST)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/lib/cmake/gnuradio/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 "/usr/bin/python2".
Call Stack (most recent call first):
  python/CMakeLists.txt:53 (GR_ADD_TEST)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/lib/cmake/gnuradio/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
  "/home/tomoaki/tmp/work/gr-lora/python/qa_receiver.py".
Call Stack (most recent call first):
  python/CMakeLists.txt:53 (GR_ADD_TEST)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/lib/cmake/gnuradio/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-lora".  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:55 (GR_ADD_TEST)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/lib/cmake/gnuradio/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 "/usr/bin/python2".
Call Stack (most recent call first):
  python/CMakeLists.txt:55 (GR_ADD_TEST)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/local/lib/cmake/gnuradio/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
  "/home/tomoaki/tmp/work/gr-lora/python/qa_BasicTest_XML.py".
Call Stack (most recent call first):
  python/CMakeLists.txt:55 (GR_ADD_TEST)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tomoaki/tmp/work/gr-lora/build

$ make
Scanning dependencies of target gnuradio-lora
[  8%] Building CXX object lib/CMakeFiles/gnuradio-lora.dir/decoder_impl.cc.o
[ 16%] Building CXX object lib/CMakeFiles/gnuradio-lora.dir/message_file_sink_impl.cc.o
[ 25%] Building CXX object lib/CMakeFiles/gnuradio-lora.dir/message_socket_sink_impl.cc.o
/home/tomoaki/tmp/work/gr-lora/lib/message_socket_sink_impl.cc:685:0: warning: "NDEBUG" redefined
 #define NDEBUG            /// Debug printing
 ^
<command-line>:0:0: note: this is the location of the previous definition
[ 33%] Building CXX object lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o
[ 41%] Building CXX object lib/CMakeFiles/gnuradio-lora.dir/controller_impl.cc.o
[ 50%] Linking CXX shared library libgnuradio-lora.so
[ 50%] Built target gnuradio-lora
Scanning dependencies of target test-lora
[ 58%] Building CXX object lib/CMakeFiles/test-lora.dir/test_lora.cc.o
[ 66%] Building CXX object lib/CMakeFiles/test-lora.dir/qa_lora.cc.o
[ 75%] Building CXX object lib/CMakeFiles/test-lora.dir/qa_message_socket_sink.cc.o
[ 83%] Linking CXX executable test-lora
[ 83%] Built target test-lora
Scanning dependencies of target pygen_python_2c915
[ 91%] Generating __init__.pyc, lora_decoder.pyc, lora_receiver.pyc, message_wireshark_sink.pyc
[100%] Generating __init__.pyo, lora_decoder.pyo, lora_receiver.pyo, message_wireshark_sink.pyo
[100%] Built target pygen_python_2c915
Scanning dependencies of target pygen_apps_9a6dd
[100%] Built target pygen_apps_9a6dd

$ sudo make install
[ 50%] Built target gnuradio-lora
[ 83%] Built target test-lora
[100%] Built target pygen_python_2c915
[100%] Built target pygen_apps_9a6dd
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/cmake/lora/loraConfig.cmake
-- Installing: /usr/local/include/lora/api.h
-- Installing: /usr/local/include/lora/decoder.h
-- Installing: /usr/local/include/lora/message_file_sink.h
-- Installing: /usr/local/include/lora/message_socket_sink.h
-- Installing: /usr/local/include/lora/channelizer.h
-- Installing: /usr/local/include/lora/controller.h
-- Installing: /usr/local/lib/libgnuradio-lora.so
-- Set runtime path of "/usr/local/lib/libgnuradio-lora.so" to ""
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/__init__.py
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/lora_decoder.py
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/lora_receiver.py
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/message_wireshark_sink.py
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/__init__.pyc
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/lora_decoder.pyc
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/lora_receiver.pyc
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/message_wireshark_sink.pyc
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/__init__.pyo
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/lora_decoder.pyo
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/lora_receiver.pyo
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/message_wireshark_sink.pyo
-- Installing: /usr/local/share/gnuradio/grc/blocks/lora_receiver.xml
-- Installing: /usr/local/share/gnuradio/grc/blocks/lora_message_file_sink.xml
-- Installing: /usr/local/share/gnuradio/grc/blocks/lora_message_wireshark_sink.xml
-- Installing: /usr/local/share/gnuradio/grc/blocks/lora_message_socket_sink.xml


$ make test
Running tests...
Test project /home/tomoaki/tmp/work/gr-lora/build
    Start 1: test_lora
1/3 Test #1: test_lora ........................   Passed    0.00 sec
    Start 2: qa_receiver
2/3 Test #2: qa_receiver ......................***Failed    0.25 sec
    Start 3: qa_BasicTest_XML
3/3 Test #3: qa_BasicTest_XML .................***Failed    0.40 sec

33% tests passed, 2 tests failed out of 3

Total Test time (real) =   0.66 sec

The following tests FAILED:
	  2 - qa_receiver (Failed)
	  3 - qa_BasicTest_XML (Failed)
Errors while running CTest
Makefile:127: ターゲット 'test' のレシピで失敗しました
make: *** [test] エラー 8

Files in gr-lora/build/lib/CMakeFiles/gnuradio-lora.dir are

-rw-rw-r-- 1 tomoaki tomoaki   7422  7月 30 07:10 CXX.includecache
-rw-rw-r-- 1 tomoaki tomoaki   1313  7月 30 07:00 DependInfo.cmake
-rw-rw-r-- 1 tomoaki tomoaki  15376  7月 30 07:00 build.make
-rw-rw-r-- 1 tomoaki tomoaki 157208  7月 30 07:11 channelizer_impl.cc.o
-rw-rw-r-- 1 tomoaki tomoaki    515  7月 30 07:00 cmake_clean.cmake
-rw-rw-r-- 1 tomoaki tomoaki 152264  7月 30 07:11 controller_impl.cc.o
-rw-rw-r-- 1 tomoaki tomoaki 218672  7月 30 07:10 decoder_impl.cc.o
-rw-rw-r-- 1 tomoaki tomoaki   8851  7月 30 07:10 depend.internal
-rw-rw-r-- 1 tomoaki tomoaki  19053  7月 30 07:10 depend.make
-rw-rw-r-- 1 tomoaki tomoaki    441  7月 30 07:00 flags.make
-rw-rw-r-- 1 tomoaki tomoaki    575  7月 30 07:00 link.txt
-rw-rw-r-- 1 tomoaki tomoaki 156112  7月 30 07:10 message_file_sink_impl.cc.o
-rw-rw-r-- 1 tomoaki tomoaki 153576  7月 30 07:11 message_socket_sink_impl.cc.o
-rw-rw-r-- 1 tomoaki tomoaki    127  7月 30 07:00 progress.make

channelizer part in build.make file:

lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o: lib/CMakeFiles/gnuradio-lora.dir/flags.make
lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o: ../lib/channelizer_impl.cc
	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/tomoaki/tmp/work/gr-lora/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o"
	cd /home/tomoaki/tmp/work/gr-lora/build/lib && /usr/bin/c++   $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o -c /home/tomoaki/tmp/work/gr-lora/lib/channelizer_impl.cc

lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.i: cmake_force
	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.i"
	cd /home/tomoaki/tmp/work/gr-lora/build/lib && /usr/bin/c++  $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/tomoaki/tmp/work/gr-lora/lib/channelizer_impl.cc > CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.i

lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.s: cmake_force
	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.s"
	cd /home/tomoaki/tmp/work/gr-lora/build/lib && /usr/bin/c++  $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/tomoaki/tmp/work/gr-lora/lib/channelizer_impl.cc -o CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.s

lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o.requires:

.PHONY : lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o.requires

lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o.provides: lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o.requires
	$(MAKE) -f lib/CMakeFiles/gnuradio-lora.dir/build.make lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o.provides.build
.PHONY : lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o.provides

lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o.provides.build: lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o
# Object files for target gnuradio-lora
gnuradio__lora_OBJECTS = \
"CMakeFiles/gnuradio-lora.dir/decoder_impl.cc.o" \
"CMakeFiles/gnuradio-lora.dir/message_file_sink_impl.cc.o" \
"CMakeFiles/gnuradio-lora.dir/message_socket_sink_impl.cc.o" \
"CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o" \
"CMakeFiles/gnuradio-lora.dir/controller_impl.cc.o"

# External object files for target gnuradio-lora
gnuradio__lora_EXTERNAL_OBJECTS =

lib/libgnuradio-lora.so: lib/CMakeFiles/gnuradio-lora.dir/decoder_impl.cc.o
lib/libgnuradio-lora.so: lib/CMakeFiles/gnuradio-lora.dir/message_file_sink_impl.cc.o
lib/libgnuradio-lora.so: lib/CMakeFiles/gnuradio-lora.dir/message_socket_sink_impl.cc.o
lib/libgnuradio-lora.so: lib/CMakeFiles/gnuradio-lora.dir/channelizer_impl.cc.o
lib/libgnuradio-lora.so: lib/CMakeFiles/gnuradio-lora.dir/controller_impl.cc.o
lib/libgnuradio-lora.so: lib/CMakeFiles/gnuradio-lora.dir/build.make
lib/libgnuradio-lora.so: /usr/lib/x86_64-linux-gnu/libboost_filesystem.so
lib/libgnuradio-lora.so: /usr/lib/x86_64-linux-gnu/libboost_system.so
lib/libgnuradio-lora.so: /usr/local/lib/libgnuradio-runtime.so
lib/libgnuradio-lora.so: /usr/local/lib/libgnuradio-pmt.so
lib/libgnuradio-lora.so: /usr/local/lib/libgnuradio-filter.so
lib/libgnuradio-lora.so: /usr/local/lib/libgnuradio-fft.so
lib/libgnuradio-lora.so: lib/CMakeFiles/gnuradio-lora.dir/link.txt
	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/tomoaki/tmp/work/gr-lora/build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Linking CXX shared library libgnuradio-lora.so"
	cd /home/tomoaki/tmp/work/gr-lora/build/lib && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/gnuradio-lora.dir/link.txt --verbose=$(VERBOSE)



Files in gr-lora/build/lib/CMakeFiles/gnuradio-lora.dir:

-rw-rw-r-- 1 tomoaki tomoaki   7422  7月 30 12:02 CXX.includecache
-rw-rw-r-- 1 tomoaki tomoaki   1313  7月 30 11:38 DependInfo.cmake
-rw-rw-r-- 1 tomoaki tomoaki  15376  7月 30 11:38 build.make
-rw-rw-r-- 1 tomoaki tomoaki 157208  7月 30 12:03 channelizer_impl.cc.o
-rw-rw-r-- 1 tomoaki tomoaki    515  7月 30 11:38 cmake_clean.cmake
-rw-rw-r-- 1 tomoaki tomoaki 152264  7月 30 12:03 controller_impl.cc.o
-rw-rw-r-- 1 tomoaki tomoaki 218672  7月 30 12:02 decoder_impl.cc.o
-rw-rw-r-- 1 tomoaki tomoaki   8851  7月 30 12:02 depend.internal
-rw-rw-r-- 1 tomoaki tomoaki  19053  7月 30 12:02 depend.make
-rw-rw-r-- 1 tomoaki tomoaki    441  7月 30 11:38 flags.make
-rw-rw-r-- 1 tomoaki tomoaki    575  7月 30 11:38 link.txt
-rw-rw-r-- 1 tomoaki tomoaki 156112  7月 30 12:03 message_file_sink_impl.cc.o
-rw-rw-r-- 1 tomoaki tomoaki 153576  7月 30 12:03 message_socket_sink_impl.cc.o
-rw-rw-r-- 1 tomoaki tomoaki    127  7月 30 11:38 progress.make

If you need more info, let me know. Thank you again.

rpp0 commented

Looks like your Python libraries might be installed in /usr/lib, while gr-lora was installed in /usr/local/lib. You can try running cmake ../ -DCMAKE_INSTALL_PREFIX=/usr followed by make and sudo make install.

Alternatively, you can add the directory to which the gr-lora Python modules were installed to your PYTHONPATH enviroment variable.

ty4tw commented

Hi,
Thank you for your quick response.

I tried cmake ../ -DCMAKE_INSTALL_PREFIX=/usr , make, make install and sudo ldconfig.
But, nothing changed except modules were installed in /usr/lib directory.

which directory should channelizer related module be ?
could you teach me the name of channelizer related modules?
I think something wrong with swig related portions in my case.

[ 50%] Built target gnuradio-lora
[ 83%] Built target test-lora
[100%] Built target pygen_python_2c915
[100%] Built target pygen_apps_9a6dd
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /usr/lib/cmake/lora/loraConfig.cmake
-- Up-to-date: /usr/include/lora/api.h
-- Up-to-date: /usr/include/lora/decoder.h
-- Up-to-date: /usr/include/lora/message_file_sink.h
-- Up-to-date: /usr/include/lora/message_socket_sink.h
-- Up-to-date: /usr/include/lora/channelizer.h
-- Up-to-date: /usr/include/lora/controller.h
-- Installing: /usr/lib/libgnuradio-lora.so
-- Set runtime path of "/usr/lib/libgnuradio-lora.so" to ""
-- Up-to-date: /usr/lib/python2.7/dist-packages/lora/__init__.py
-- Up-to-date: /usr/lib/python2.7/dist-packages/lora/lora_decoder.py
-- Up-to-date: /usr/lib/python2.7/dist-packages/lora/lora_receiver.py
-- Up-to-date: /usr/lib/python2.7/dist-packages/lora/message_wireshark_sink.py
-- Installing: /usr/lib/python2.7/dist-packages/lora/__init__.pyc
-- Installing: /usr/lib/python2.7/dist-packages/lora/lora_decoder.pyc
-- Installing: /usr/lib/python2.7/dist-packages/lora/lora_receiver.pyc
-- Installing: /usr/lib/python2.7/dist-packages/lora/message_wireshark_sink.pyc
-- Installing: /usr/lib/python2.7/dist-packages/lora/__init__.pyo
-- Installing: /usr/lib/python2.7/dist-packages/lora/lora_decoder.pyo
-- Installing: /usr/lib/python2.7/dist-packages/lora/lora_receiver.pyo
-- Installing: /usr/lib/python2.7/dist-packages/lora/message_wireshark_sink.pyo
-- Up-to-date: /usr/share/gnuradio/grc/blocks/lora_receiver.xml
-- Up-to-date: /usr/share/gnuradio/grc/blocks/lora_message_file_sink.xml
-- Up-to-date: /usr/share/gnuradio/grc/blocks/lora_message_wireshark_sink.xml
-- Up-to-date: /usr/share/gnuradio/grc/blocks/lora_message_socket_sink.xml

 make test
Running tests...
Test project /home/tomoaki/tmp/work/gr-lora/build
    Start 1: test_lora
1/3 Test #1: test_lora ........................   Passed    0.00 sec
    Start 2: qa_receiver
2/3 Test #2: qa_receiver ......................***Failed    0.16 sec
    Start 3: qa_BasicTest_XML
3/3 Test #3: qa_BasicTest_XML .................***Failed    0.31 sec

33% tests passed, 2 tests failed out of 3

Total Test time (real) =   0.47 sec

The following tests FAILED:
	  2 - qa_receiver (Failed)
	  3 - qa_BasicTest_XML (Failed)
Errors while running CTest
Makefile:127: ターゲット 'test' のレシピで失敗しました
make: *** [test] エラー 8

current PATH is

>>> import sys
>>> sys.path
['', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/wx-3.0-gtk2']
rpp0 commented

Yes, you are right. The issue appears to be SWIG related as your log file reads -- Disabling SWIG because version check failed. Could you please post the output of $ swig -version?

ty4tw commented

2 swig packages were found swig and swig. but not installed.
so, did $ sudo apt install swig
swig version is version 3.0.8.

retry but another error occcured.

Scanning dependencies of target lora_swig_swig_2d0df
[ 54%] Building CXX object swig/CMakeFiles/lora_swig_swig_2d0df.dir/lora_swig_swig_2d0df.cpp.o
[ 59%] Linking CXX executable lora_swig_swig_2d0df
Swig source
/home/tomoaki/tmp/work/gr-lora/swig/lora_swig.i:5: Error: Unable to find 'gnuradio.i'
swig/CMakeFiles/lora_swig_swig_2d0df.dir/build.make:105: recipe for target swig/lora_swig_swig_2d0df' failed
make[2]: *** [swig/lora_swig_swig_2d0df] Error 1
make[2]: *** delete  'swig/lora_swig_swig_2d0df' 

the file is in /usr/include/gnuradio/swig

rpp0 commented

Not sure what the issue is here. Perhaps you don't have gnuradio-dev installed? On a clean Ubuntu (Trusty) machine, you can perform the following steps to install gr-lora:

    sudo apt-get update
    sudo apt-get install g++-4.8
    export CXX="g++-4.8"
    export CC="gcc-4.8"
    sudo pip install scipy
    sudo apt-get install swig
    sudo apt-get install libcppunit-dev
    sudo apt-get install fftw3 fftw-dev libfftw3-dev
    sudo apt-get install libboost1.55-all-dev
    sudo apt-get install gnuradio
    sudo apt-get install gnuradio-dev
    sudo apt-get install liblog4cpp5
    sudo apt-get install liblog4cpp5-dev
    sudo ldconfig
    git clone https://github.com/jgaeddert/liquid-dsp.git
    cd liquid-dsp/
    sudo sh ./bootstrap.sh
    sh ./configure
    make && sudo make install
    sudo ldconfig
    cd ../
    cd gr-lora
    mkdir build && cd build
    cmake ../
    make
    sudo make install

If you have a version older than Trusty, gr-lora is not supported unfortunately.

ty4tw commented

Thank you for your support. I made it.
I uninstalled gnuradio related modules and installed again.
Every thing works fine. I think that the installation process of gnuradion had problems.
I did as follows: ( add --recursive option this time)

git clone --recursive http://git.gnuradio.org/git/gnuradio.git
 sudo install cheetah
cd gnuradio
 mkdir build
 cd build/
 cmake ../
 make
 make test
 sudo make install
 sudo ldconfig

 cd ../../
 sudo apt-get remove gr-osmosdr
 sudo apt-get update
 sudo apt-get install gr-osmosdr
 git clone git://git.osmocom.org/gr-osmosdr
 cd gr-osmosdr/
 mkdir build
 cd build/
 cmake ../
 make
 sudo make install
 sudo ldconfig

 
cd ../../
git clone https://github.com/rpp0/gr-lora.git
cd gr-lora
mkdir build
cd build
cmake ../
make
sudo make install
make test
sudo make install
sudo ldconfig

I

HTRK commented

Not sure what the issue is here. Perhaps you don't have gnuradio-dev installed? On a clean Ubuntu (Trusty) machine, you can perform the following steps to install gr-lora:

    sudo apt-get update
    sudo apt-get install g++-4.8
    export CXX="g++-4.8"
    export CC="gcc-4.8"
    sudo pip install scipy
    sudo apt-get install swig
    sudo apt-get install libcppunit-dev
    sudo apt-get install fftw3 fftw-dev libfftw3-dev
    sudo apt-get install libboost1.55-all-dev
    sudo apt-get install gnuradio
    sudo apt-get install gnuradio-dev
    sudo apt-get install liblog4cpp5
    sudo apt-get install liblog4cpp5-dev
    sudo ldconfig
    git clone https://github.com/jgaeddert/liquid-dsp.git
    cd liquid-dsp/
    sudo sh ./bootstrap.sh
    sh ./configure
    make && sudo make install
    sudo ldconfig
    cd ../
    cd gr-lora
    mkdir build && cd build
    cmake ../
    make
    sudo make install

If you have a version older than Trusty, gr-lora is not supported unfortunately.

@rpp0
I followed those installation steps on a clean Trusty VM , knowing that the available gnuradio version is 3.7.2 . But when i run the python test script lora_receive_file_nogui.py , i get the following error :
error lora gnuradio3 7 2 - copie

And according to the discussion in issue #14 : to avoid this error we need at least GNU Radio version 3.7.9 .