Giter Site home page Giter Site logo

Comments (14)

pgorczak avatar pgorczak commented on June 28, 2024 2

Good news - I could get it to work on Ubuntu and Debian πŸ˜„

It was definitely SWIG (apt-get install swig) which was missing but required for the Python build to work. Here is the new install output:

These are the lines that were previously missing from the install output

-- Installing: /usr/local/lib/python2.7/dist-packages/lora/_lora_swig.so
-- Set runtime path of "/usr/local/lib/python2.7/dist-packages/lora/_lora_swig.so" to ""
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/lora_swig.py
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/lora_swig.pyc
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/lora_swig.pyo
-- Installing: /usr/local/include/lora/lora/swig/lora_swig.i
-- Installing: /usr/local/include/lora/lora/swig/lora_swig_doc.i

from gr-lora.

matt-knight avatar matt-knight commented on June 28, 2024

Hi @pgorczak,

I'm not sure what the issue is, but I suspect it's related to #12. Can you post your system and GNU Radio configuration so I can attempt to reproduce on my end? OS distro and version, GNU Radio version/git hash, etc.

from gr-lora.

pgorczak avatar pgorczak commented on June 28, 2024

Hi @matt-knight, thanks for your quick response!

I'm running a dockerized Debian GNU/Linux 9.0 (stretch) with GNU Radio 3.7.10.1 from the most recent version of master (0be096f).

You could try my Docker image if you want to reproduce it exactly. I put a Dockerfile up on Gist.

from gr-lora.

matt-knight avatar matt-knight commented on June 28, 2024

@pgorczak Awesome, thanks for the detailed reply! I'll try to reproduce over the next few days. It's possible that with the GNURadio or Debian version bump some things got moved around.

from gr-lora.

pierreduf avatar pierreduf commented on June 28, 2024

Hi,

I've got the exact same issue on Ubuntu 16.04 and GNU Radio v.3.7.9 installed from the official repos.

When I go into my /usr/local/lib/python2.7/ my gr-lora files are in dist-package/lora (not in site-packages like mentionned in issue #12)

When I import the "lora" package in Python prompt, it's working but indeed it has not "mod" attributed (thus the initial error).

What did I missed ? I know the thread is a bit old but have you finally managed to get it work ?

from gr-lora.

pierreduf avatar pierreduf commented on June 28, 2024

I tried the "usrlocal.pth" trick in the #7 but without any success. My build manifest for the gr-lora module is as follows :

I have a lot of less file that in #7 . What could have happen ?

/usr/local/lib/cmake/lora/loraConfig.cmake /usr/local/include/lora/api.h /usr/local/include/lora/demod.h /usr/local/include/lora/decode.h /usr/local/include/lora/mod.h /usr/local/include/lora/encode.h /usr/local/lib/libgnuradio-lora.so /usr/local/lib/python2.7/dist-packages/lora/__init__.py /usr/local/lib/python2.7/dist-packages/lora/__init__.pyc /usr/local/lib/python2.7/dist-packages/lora/__init__.pyo /usr/local/share/gnuradio/grc/blocks/lora_demod.xml /usr/local/share/gnuradio/grc/blocks/lora_decode.xml /usr/local/share/gnuradio/grc/blocks/lora_mod.xml /usr/local/share/gnuradio/grc/blocks/lora_encode.xml

from gr-lora.

pgorczak avatar pgorczak commented on June 28, 2024

Hey @pierreduf, I'm sorry but I didn't get around to do more troubleshooting on this yet.

from gr-lora.

Flamewires avatar Flamewires commented on June 28, 2024

try running sudo ldconfig after running make install. I was getting the exact same error:

Traceback (most recent call last):
  File "/home/USER/git/gr-lora/build/top_block.py", line 131, in 
    main()
  File "/home/USER/git/gr-lora/build/top_block.py", line 119, in main
    tb = top_block_cls()
  File "/home/USER/git/gr-lora/build/top_block.py", line 87, in __init__
    self.lora_mod_0 = lora.mod(8, 0x12)
AttributeError: 'module' object has no attribute 'mod'

Assume its just a symptom of the python code not finding the compiled library. Probably stores a reference to it in mod?

from gr-lora.

matt-knight avatar matt-knight commented on June 28, 2024

All,

I'm checking in to note that I haven't been able to reproduce this issue. I just stood up the following in a VM without issues.

Ubuntu 16.04.1
GNU Radio 3.7.11
gr-lora d587169

For starters, please run python -c "import sys; print '\n'.join(sys.path)" and print the result here so we can verify your python path includes the install directories. Share echo $LD_LIBRARY_PATH while you're at it too. I always install to /opt and manually export paths so I'm curious if there's a discrepancy here.

If that's not fruitful, I'll ask you to share your system configuration and versions so I can attempt to reproduce.

Best,
Matt

from gr-lora.

matt-knight avatar matt-knight commented on June 28, 2024

Given that several have had installation issues, I added some build and configuration guidelines to the Wiki: https://github.com/BastilleResearch/gr-lora/wiki/Installation

There are several viable ways to install GNU Radio and related modules, but this is the process I use. If your method isn't working, document it here and I'll see if I can troubleshoot.

from gr-lora.

pgorczak avatar pgorczak commented on June 28, 2024

I got around to trying again. When checking the CMake output, I discovered some suspicious lines:

[...]
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE) 
[...]
-- Checking for module SWIG
-- Disabling SWIG because version check failed.
[...]

I guess no Doxygen is OK but I'll look further into the PkgConfig and SWIG issues.

FWIW, install still works with output

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/demod.h
-- Installing: /usr/local/include/lora/decode.h
-- Installing: /usr/local/include/lora/mod.h
-- Installing: /usr/local/include/lora/encode.h
-- Installing: /usr/local/lib/libgnuradio-lora.so
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/__init__.py
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/__init__.pyc
-- Installing: /usr/local/lib/python2.7/dist-packages/lora/__init__.pyo
-- Installing: /usr/local/share/gnuradio/grc/blocks/lora_demod.xml
-- Installing: /usr/local/share/gnuradio/grc/blocks/lora_decode.xml
-- Installing: /usr/local/share/gnuradio/grc/blocks/lora_mod.xml
-- Installing: /usr/local/share/gnuradio/grc/blocks/lora_encode.xml

from gr-lora.

pierreduf avatar pierreduf commented on June 28, 2024

@Flamewires : I've made the ldconfig but made it again after your comment, unfortunately it doesn't change anything.

@matt-knight : this is the output of the command :

/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
/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

My LD_LIBRARY_PATH variable is empty.

I think I'm gonna follow your updated installation guide : I guess something concerning the paths is messed up. I installed nothing in /opt.

I'll keep you updated.

from gr-lora.

pierreduf avatar pierreduf commented on June 28, 2024

My bad ! After installing SWIG and making a clean install (following the new guide with the correct way to set path environment variables) everything is OK.

I think that missing SWIG was the problem, thanks @pgorczak for the hint !

No more errors now, the flowgraph is compiling and running ! I can't decode LoRa signals yet but that's another story.

Thank you again all for your support.

from gr-lora.

matt-knight avatar matt-knight commented on June 28, 2024

Thanks @pgorczak and @pierreduf for working through this!

from gr-lora.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.