-
Notifications
You must be signed in to change notification settings - Fork 428
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
Compile grgsm_livemon and grgsm_livemon_headless with grcc #378
Conversation
And remove the pre-built scripts from the repository Fixes ptrkrysik#13
It is needed to proper detect the grcc full path
- Override the GR_UNIQUE_TARGET function to not append a hash to the target name. - Add explicit dependency between pygen_apps and _grgsm_swig The _grgs_swig needs to be built first because grcc evaluates and verify all imports - Test the parallel build in the docker containers as well
On Fedora 26 when gr-gsm is installed in /usr/local/lib in order to work some paths have to be added to PYTHONPATH and LD_LIBRARY_PATH enviroment variables This fixes the following errors ImportError: No module named grgsm ImportError: No module named _grgsm_swig ImportError: libgrgsm-0.41.3.so.0.0.0: cannot open shared object file: No such file or directory
On Fedora 26 when gr-gsm is installed in /usr/local/lib in order to work some paths have to be added to PYTHONPATH and LD_LIBRARY_PATH environment variables
And here are some logs
|
Hi @pkrysik, Have you had time to review this PR? It is closely related to #355 and a lot of users are affected. I already reported it downstream to debian and @petterreinholdtsen prefers this to be fixed upstream first. |
Hi @velichkov , I tried to add grcc compilation in the past but it didn't work well. Your changes to cmake files more look mature than mine, but I will first try to add them to a separate branch and test them in there. Many thanks for the changes. |
There was some problem with grgsm_livemon rule in Ubuntu 16.04 test. Strange because there are two tests of Ubuntu 16.04 and one passes :/. I will make some dummy commit to make the travis tests run again. |
It's ok now. The problem appeared because in the meantime I added a new test that didn't have your changes. |
There are some problems with grcc compilation :/. Here it worked:
https://travis-ci.org/ptrkrysik/gr-gsm/builds/360423727
and here grcc failed (error message says that due to lack of
_runtime_swig.so):
https://travis-ci.org/ptrkrysik/gr-gsm/builds/363104893
Both tests for the same commit to make sure that it is not fault of some
change in gr-gsm.
For some reason grcc compilation is not stable.
|
Hi @ptrkrysik,
This seems to be a problem with the debian's gnuradio as grcc always fails with the same error even when started without arguments. root@e9d9a0f15e75:/src/build# dpkg -l gnuradio
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============================-====================-====================-====================================================================
ii gnuradio 3.7.11-8 amd64 GNU Radio Software Radio Toolkit
root@e9d9a0f15e75:/src/build# grcc
Traceback (most recent call last):
File "/usr/bin/grcc", line 29, in <module>
from gnuradio import gr
File "/usr/lib/python2.7/dist-packages/gnuradio/gr/__init__.py", line 41, in <module>
from runtime_swig import *
File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 17, in <module>
_runtime_swig = swig_import_helper()
File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 16, in swig_import_helper
return importlib.import_module('_runtime_swig')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named _runtime_swig There is a new version 3.7.12.0-1 in debian unstable where the problem is fixed so I guess we need to wait few more days until this version is migrated to testing.
The failure on Fedora 26 is different and I think it is related with the parallel build
|
Hi @ptrkrysik, After some more digging I found a dirty workaround for the debian problem. To make it work we need to create one symlink ln -sf /usr/lib/x86_64-linux-gnu/libvolk.so.1.3.1 /usr/lib/x86_64-linux-gnu/libvolk.so.1.3 Here is the full log root@46f266ad7314:/src/build# make
[ 63%] Built target grgsm
[ 63%] Built target grgsm_swig_swig_doc
[ 66%] Built target _grgsm_swig_swig_tag
[ 70%] Built target grgsm_swig_swig_2d0df
[ 75%] Built target _grgsm_swig
[ 78%] Built target pygen_swig_72fe6
[ 81%] Built target pygen_python_bd098
[ 83%] Built target pygen_python_misc_utils_d6433
[ 86%] Built target pygen_python_receiver_d6696
[ 88%] Built target pygen_python_demapping_9c707
[ 90%] Generating grgsm_livemon
Traceback (most recent call last):
File "/usr/bin/grcc", line 29, in <module>
from gnuradio import gr
File "/usr/lib/python2.7/dist-packages/gnuradio/gr/__init__.py", line 41, in <module>
from runtime_swig import *
File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 17, in <module>
_runtime_swig = swig_import_helper()
File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 16, in swig_import_helper
return importlib.import_module('_runtime_swig')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named _runtime_swig
apps/CMakeFiles/pygen_apps.dir/build.make:79: recipe for target 'apps/grgsm_livemon' failed
make[2]: *** [apps/grgsm_livemon] Error 1
CMakeFiles/Makefile2:1099: recipe for target 'apps/CMakeFiles/pygen_apps.dir/all' failed
make[1]: *** [apps/CMakeFiles/pygen_apps.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
root@46f266ad7314:/src/build#
root@46f266ad7314:/src/build#
root@46f266ad7314:/src/build# ln -sf /usr/lib/x86_64-linux-gnu/libvolk.so.1.3.1 /usr/lib/x86_64-linux-gnu/libvolk.so.1.3
root@46f266ad7314:/src/build#
root@46f266ad7314:/src/build#
root@46f266ad7314:/src/build# make
[ 63%] Built target grgsm
[ 63%] Built target grgsm_swig_swig_doc
[ 66%] Built target _grgsm_swig_swig_tag
[ 70%] Built target grgsm_swig_swig_2d0df
[ 75%] Built target _grgsm_swig
[ 78%] Built target pygen_swig_72fe6
[ 81%] Built target pygen_python_bd098
[ 83%] Built target pygen_python_misc_utils_d6433
[ 86%] Built target pygen_python_receiver_d6696
[ 88%] Built target pygen_python_demapping_9c707
[ 90%] Generating grgsm_livemon
linux; GNU C++ version 7.3.0; Boost_106200; UHD_003.010.003.000-0-unknown
[ 91%] Shebangin grgsm_livemon
[ 92%] Generating grgsm_livemon_headless
linux; GNU C++ version 7.3.0; Boost_106200; UHD_003.010.003.000-0-unknown
[ 93%] Shebangin grgsm_livemon_headless
[ 96%] Built target pygen_apps
[ 98%] Built target pygen_apps_helpers_e5341
[100%] Built target man_grgsm_livemon.rst |
See ptrkrysik#378 (comment) Traceback (most recent call last): File "/usr/bin/grcc", line 29, in <module> from gnuradio import gr File "/usr/lib/python2.7/dist-packages/gnuradio/gr/__init__.py", line 41, in <module> from runtime_swig import * File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 17, in <module> _runtime_swig = swig_import_helper() File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 16, in swig_import_helper return importlib.import_module('_runtime_swig') File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named _runtime_swig
There is a problem with cmake 3.11.0 and the parallel build fails with See ptrkrysik#378 (comment) make[2]: *** No rule to make target 'swig/grgsm_swig.py', needed by 'swig/grgsm_swig.pyc'. Stop. make[1]: *** [CMakeFiles/Makefile2:601: swig/CMakeFiles/pygen_swig_43235.dir/all] Error 2
See #378 (comment) Traceback (most recent call last): File "/usr/bin/grcc", line 29, in <module> from gnuradio import gr File "/usr/lib/python2.7/dist-packages/gnuradio/gr/__init__.py", line 41, in <module> from runtime_swig import * File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 17, in <module> _runtime_swig = swig_import_helper() File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 16, in swig_import_helper return importlib.import_module('_runtime_swig') File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named _runtime_swig
There is a problem with cmake 3.11.0 and the parallel build fails with See #378 (comment) make[2]: *** No rule to make target 'swig/grgsm_swig.py', needed by 'swig/grgsm_swig.pyc'. Stop. make[1]: *** [CMakeFiles/Makefile2:601: swig/CMakeFiles/pygen_swig_43235.dir/all] Error 2
See ptrkrysik/gr-gsm#378 (comment) Traceback (most recent call last): File "/usr/bin/grcc", line 29, in <module> from gnuradio import gr File "/usr/lib/python2.7/dist-packages/gnuradio/gr/__init__.py", line 41, in <module> from runtime_swig import * File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 17, in <module> _runtime_swig = swig_import_helper() File "/usr/lib/python2.7/dist-packages/gnuradio/gr/runtime_swig.py", line 16, in swig_import_helper return importlib.import_module('_runtime_swig') File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named _runtime_swig
There is a problem with cmake 3.11.0 and the parallel build fails with See ptrkrysik/gr-gsm#378 (comment) make[2]: *** No rule to make target 'swig/grgsm_swig.py', needed by 'swig/grgsm_swig.pyc'. Stop. make[1]: *** [CMakeFiles/Makefile2:601: swig/CMakeFiles/pygen_swig_43235.dir/all] Error 2
Fixes #13
It is needed to proper detect the grcc full path
target name.
The _grgs_swig needs to be built first because grcc evaluates and
verify all imports