Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gr-aistx wont work with 3.7 #1

Closed
SOLEROM opened this issue Jan 19, 2016 · 11 comments
Closed

gr-aistx wont work with 3.7 #1

SOLEROM opened this issue Jan 19, 2016 · 11 comments

Comments

@SOLEROM
Copy link

SOLEROM commented Jan 19, 2016

Hello,
Is this tool still supported?

Not working with gnuRadio 3.7

...
-- package 'gruel' not found
...
Gruel and GNURADIO_CORE are both elements of GnuRadio 3.6 that went away in 3.7.
gnuradio-config-info -v
3.7.8.1

@dadopap
Copy link
Contributor

dadopap commented Feb 23, 2016

Hi, I have updated the package and compiled it with gnuradio 3.7, I will issue a pull request

@dadopap
Copy link
Contributor

dadopap commented Feb 23, 2016

Hi I have created a pull request with trendmicro

In the meanwhile you can find the code at https://github.com/dadopap/ais

Please note that the make install installs the new block into /usr/local/share/gnuradio/blocks
I had to manually copy the blocks into /usr/share/gnuradio/blocks to have GRC see them.

@CyberLab85
Copy link

Hi, I have some trouble with "unpacker.c".

When I try to get AIS frame with ./AIVDM_Encoder.py --type=1 --vsize=30x10 | xargs -IA ./unpacker.c A 1 A, I have this:

"./unpacker.c: Syntax error: "(" unexpected" refer to line "unsigned long unpack(char *buffer, int start, int length)"

how can I fix it?

thanks

@mikeream
Copy link

mikeream commented Jun 13, 2017

To get the unpacker working you need to compile it.
type "g++ unpacker.c -o unpacker"

After compiling it then you can use it as:
"./AIVDM_Encoder.py --type=1 --vsize=30x10 | xargs -IA ./unpacker A 1 A"

@saltperfect
Copy link

I was not able to compile the blocks using python2 or 3. Can someone help. It was searching this whole day, tried all the forks but all in vain. The last error I could come up was this and I simply don't know how to pass through it. I have tried the mod_tools hint but later found the forks but nothing worked out.
`(pytenv2) rupank@vanepill:~/ais/gr-aistx/build$ 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 'gnuradio-runtime'
-- Found gnuradio-runtime, version 3.7.9
-- Found GNURADIO_RUNTIME: /usr/lib/x86_64-linux-gnu/libgnuradio-runtime.so
-- Checking for module 'cppunit'
-- Found cppunit, version 1.13.2
-- Found CPPUNIT: /usr/lib/x86_64-linux-gnu/libcppunit.so;dl
-- Found SWIG: /usr/bin/swig2.0 (found version "2.0.12")
-- Found PythonLibs: /usr/local/lib/libpython3.5m.a (found version "3.5.0")
CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:44

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:25 (include)
swig/CMakeLists.txt:28 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:92

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:25 (include)
swig/CMakeLists.txt:28 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:100

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:25 (include)
swig/CMakeLists.txt:28 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found PythonInterp: /usr/local/bin/python3.5 (found version "3.5")
File "", line 3
print sysconfig.get_python_lib(plat_specific=True, prefix='')
^
SyntaxError: invalid syntax
CMake Error at cmake/Modules/GrPython.cmake:103 (file):
file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
exactly three arguments.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:25 (include)
swig/CMakeLists.txt:28 (include)

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:44

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
swig/CMakeLists.txt:29 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:92

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
swig/CMakeLists.txt:29 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:100

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
swig/CMakeLists.txt:29 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Doxygen: /usr/bin/doxygen (found version "1.8.11")
CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:44

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:182 (include)
swig/CMakeLists.txt:47 (GR_SWIG_INSTALL)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:92

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:182 (include)
swig/CMakeLists.txt:47 (GR_SWIG_INSTALL)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:100

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
cmake/Modules/GrSwig.cmake:182 (include)
swig/CMakeLists.txt:47 (GR_SWIG_INSTALL)
This warning is for project developers. Use -Wno-dev to suppress it.

Traceback (most recent call last):
File "", line 2, in
TypeError: Unicode-objects must be encoded before hashing
CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:44

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
python/CMakeLists.txt:23 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:92

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
python/CMakeLists.txt:23 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:100

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
python/CMakeLists.txt:23 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

File "", line 3
print sysconfig.get_python_lib(plat_specific=True, prefix='')
^
SyntaxError: invalid syntax
CMake Error at cmake/Modules/GrPython.cmake:103 (file):
file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
exactly three arguments.
Call Stack (most recent call first):
python/CMakeLists.txt:23 (include)

Traceback (most recent call last):
File "", line 2, in
TypeError: Unicode-objects must be encoded before hashing
CMake Error at cmake/Modules/GrPython.cmake:115 (add_custom_target):
add_custom_target cannot create target "ALL" because another target with
the same name already exists. The existing target is a custom target
created in source directory "/home/rupank/ais/gr-aistx/swig". See
documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake/Modules/GrPython.cmake:214 (GR_UNIQUE_TARGET)
python/CMakeLists.txt:31 (GR_PYTHON_INSTALL)

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:44

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
apps/CMakeLists.txt:20 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:92

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
apps/CMakeLists.txt:20 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in cmake/Modules/GrPython.cmake:
Syntax Warning in cmake code at

/home/rupank/ais/gr-aistx/cmake/Modules/GrPython.cmake:196:100

Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
apps/CMakeLists.txt:20 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

File "", line 3
print sysconfig.get_python_lib(plat_specific=True, prefix='')
^
SyntaxError: invalid syntax
CMake Error at cmake/Modules/GrPython.cmake:103 (file):
file FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be called with
exactly three arguments.
Call Stack (most recent call first):
apps/CMakeLists.txt:20 (include)

Traceback (most recent call last):
File "", line 2, in
TypeError: Unicode-objects must be encoded before hashing
CMake Error at cmake/Modules/GrPython.cmake:115 (add_custom_target):
add_custom_target cannot create target "ALL" because another target with
the same name already exists. The existing target is a custom target
created in source directory "/home/rupank/ais/gr-aistx/swig". See
documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
cmake/Modules/GrPython.cmake:214 (GR_UNIQUE_TARGET)
apps/CMakeLists.txt:22 (GR_PYTHON_INSTALL)

-- Configuring incomplete, errors occurred!
`
If some could help please. A total noob of git and python here just want the ais signal from gnu radio. End up at this git and don't know what to do next.

@ghost
Copy link

ghost commented Jan 2, 2018

@saltperfect you mention you have tried all the branches but which one are you using when you get this error? Also next time go ahead and run with -Wno-dev to suppress all the syntax warnings.

@saltperfect
Copy link

@zhudsonSM i have used https://github.com/dadopap/ais and yours also. I always get the same error with the swig error in the end.

@ghost
Copy link

ghost commented Jan 5, 2018

Perhaps this isn't an ideal solution for you but I just created a Pybombs recipe to install gr-aistx here: https://github.com/zhudsonSM/gr-etcetera try installing with that and see if it works.

@lYlantis
Copy link

@zhudsonSM I have tried your fork, your pybomb and the fork from @dadopap , but none have worked for me. I built everything, but when I try to run the python script or the graph from gnuradio-companion, I get the following error:

Traceback (most recent call last):
  File "/home/aces/Desktop/ais/top_block.py", line 31, in <module>
    import AISTX
  File "/usr/local/lib/python2.7/dist-packages/AISTX/__init__.py", line 45, in <module>
    from AISTX_swig import *
  File "/usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.py", line 17, in <module>
    _AISTX_swig = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/AISTX/AISTX_swig.py", line 16, in swig_import_helper
    return importlib.import_module('_AISTX_swig')
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: dynamic module does not define init function (init_AISTX_swig)

Any idea for what the issue might be?

@ghost
Copy link

ghost commented May 29, 2018

Do you get the same error when using pybombs?

Am I correct in assuming that the build and install process completed successfully?

embyte0 pushed a commit that referenced this issue Dec 4, 2018
embyte0 pushed a commit that referenced this issue Dec 4, 2018
@embyte0
Copy link
Collaborator

embyte0 commented Dec 4, 2018

Code merged. This should be fixed now. Let us know, thanks!

@embyte0 embyte0 closed this as completed Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants