discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Trouble with Pybombs 2.0.0


From: Hans Van Ingelgom
Subject: Re: [Discuss-gnuradio] Trouble with Pybombs 2.0.0
Date: Sun, 7 Feb 2016 19:45:13 +0100

Thanks for that info, Richard, it helped me solve some problems I have here. I added the forcebuild lines to my config and it helped. (ldconfig path was already ok here in Mint)


And now some more feedback on Pybombs 2:

If pybombs wants to use apt-get in some cases that is fine by me, but then I think it should also keep track of that and at least provide a list of deb packages that have been installed through pybombs.

What I'm also missing is a testrun feature where I can just check what packages will be installed from source, and what packages will be installed through the package manager.


I was curious to see what would happen if I were to install hackrf:


# pybombs -p system install --print-tree hackrf
|
\- hackrf
PyBombs.install - INFO - Installing package: hackrf
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following extra packages will be installed:
  libhackrf0
The following NEW packages will be installed:
  hackrf libhackrf0
0 upgraded, 2 newly installed, 0 to remove and 28 not upgraded.
Need to get 0 B/41,6 kB of archives.
After this operation, 205 kB of additional disk space will be used.
Selecting previously unselected package libhackrf0:amd64.
(Reading database ... 284695 files and directories currently installed.)
Preparing to unpack .../libhackrf0_2013.07.1.16.d5cebd-2_amd64.deb ...
Unpacking libhackrf0:amd64 (2013.07.1.16.d5cebd-2) ...
Selecting previously unselected package hackrf.
Preparing to unpack .../hackrf_2013.07.1.16.d5cebd-2_amd64.deb ...
Unpacking hackrf (2013.07.1.16.d5cebd-2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libhackrf0:amd64 (2013.07.1.16.d5cebd-2) ...
Setting up hackrf (2013.07.1.16.d5cebd-2) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
PyBombs.install - INFO - Installation successful.


That one is still using the deb packages. So now I have to uninstall them again, edit the config file, and retry. I don't know if this is a desirable workflow.

Meanwhile, if I try to see what packages are installed, pybombs has already forgotten that it just installed hackrf:

# pybombs -p system inv
Showing package state:
uhd:    installed

And as stated earlier, undoing it through pybombs is not possible. Once installed, I have to switch to apt-get to remove the packages again.

# pybombs -p system remove hackrf
PyBombs.PackageManager - WARNING - This binary package manager can't be instantiated:
PyBombs.remove - ERROR - Package hackrf is not installed. Aborting.

(Thinking about it further I can see some problematic what-if scenarios with keeping track of installed deb packages within pybombs, but maybe a workable solution may be found).

Moving forward, I tried installing gnuradio, but that produced errors:

....
[ 88%] Built target uhd_swig_gr_uhd_swig_5e3ce
[ 88%] Building CXX object gr-uhd/swig/CMakeFiles/_uhd_swig.dir/uhd_swigPYTHON_wrap.cxx.o
/usr/local/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx: In function ‘void init_uhd_swig()’:
/usr/local/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:45785:91: error: ‘ATR_REG_IDLE’ is not a member of ‘uhd::usrp::dboard_iface’
   SWIG_Python_SetConstant(d, "dboard_iface_ATR_REG_IDLE",SWIG_From_int(static_cast< int >(uhd::usrp::dboard_iface::ATR_REG_IDLE)));
                                                                                           ^
/usr/local/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:45786:94: error: ‘ATR_REG_TX_ONLY’ is not a member of ‘uhd::usrp::dboard_iface’
   SWIG_Python_SetConstant(d, "dboard_iface_ATR_REG_TX_ONLY",SWIG_From_int(static_cast< int >(uhd::usrp::dboard_iface::ATR_REG_TX_ONLY)));
                                                                                              ^
/usr/local/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:45787:94: error: ‘ATR_REG_RX_ONLY’ is not a member of ‘uhd::usrp::dboard_iface’
   SWIG_Python_SetConstant(d, "dboard_iface_ATR_REG_RX_ONLY",SWIG_From_int(static_cast< int >(uhd::usrp::dboard_iface::ATR_REG_RX_ONLY)));
                                                                                              ^
/usr/local/src/gnuradio/build/gr-uhd/swig/uhd_swigPYTHON_wrap.cxx:45788:98: error: ‘ATR_REG_FULL_DUPLEX’ is not a member of ‘uhd::usrp::dboard_iface’
   SWIG_Python_SetConstant(d, "dboard_iface_ATR_REG_FULL_DUPLEX",SWIG_From_int(static_cast< int >(uhd::usrp::dboard_iface::ATR_REG_FULL_DUPLEX)));
                                                                                                  ^
make[2]: *** [gr-uhd/swig/CMakeFiles/_uhd_swig.dir/uhd_swigPYTHON_wrap.cxx.o] Error 1
make[1]: *** [gr-uhd/swig/CMakeFiles/_uhd_swig.dir/all] Error 2
make: *** [all] Error 2
PyBombs.Packager.source - ERROR - Build failed. See output above for error messages.
PyBombs.Packager.source - ERROR - Problem occured while building package gnuradio:
Build failed.
PyBombs.install - ERROR - Error installing package gnuradio. Aborting.

Turns out that I had removed the package uhd, but not libuhd and uhd-host

# apt-get remove libuhd\* uhd-host

Now I had a bit of a problem because gnuradio was already configured for using those old versions. Trying to run "pybombs install" now failed because of missing files. I didn't find how I could convince pybombs to run cmake again.

[ 88%] Built target _uhd_swig_swig_tag
make[2]: *** No rule to make target `/usr/include/uhd/config.hpp', needed by `gr-uhd/swig/uhd_swig_gr_uhd_swig_5e3ce.cpp'.  Stop.
make[1]: *** [gr-uhd/swig/CMakeFiles/uhd_swig_gr_uhd_swig_5e3ce.dir/all] Error 2
make: *** [all] Error 2

I also can't tell pybombs to remove the package, since it is not installed.

I deleted the gnuradio directory by hand but that just gave other errors:
# rm -r gnuradio/
# pybombs -p system install --print-tree gnuradio
|
\- gnuradio
PyBombs.install - INFO - Installing package: gnuradio
PyBombs.Packager.source - ERROR - Problem occured while building package gnuradio:
There should be a source dir in /usr/local/src/gnuradio, but there isn't.
PyBombs.install - ERROR - Error installing package gnuradio. Aborting.


# pybombs -p system fetch gnuradio
PyBombs.fetch - INFO - Downloading source for package gnuradio
Cloning: (100%) [============================================================================================================================================================================================================================================================]
Loki src # pybombs -p system install --print-tree gnuradio
|
\- gnuradio
PyBombs.install - INFO - Installing package: gnuradio
Building: (100%) [===========================================================================================================================================================================================================================================================]
make: *** No targets specified and no makefile found.  Stop.
PyBombs.Packager.source - ERROR - Build failed. See output above for error messages.
PyBombs.Packager.source - ERROR - Problem occured while building package gnuradio:
Build failed.
PyBombs.install - ERROR - Error installing package gnuradio. Aborting.


I ended up editing inventory.yml and removing the gnuradio entry. This then caused gnuradio to compile successfully.

I think almost  everything is working now, except the osmocom tools:

osmocom_fft
Traceback (most recent call last):
  File "/usr/local/bin/osmocom_fft", line 33, in <module>
    import osmosdr
  File "/usr/local/lib/python2.7/dist-packages/osmosdr/__init__.py", line 26, in <module>
    from osmosdr_swig import *
  File "/usr/local/lib/python2.7/dist-packages/osmosdr/osmosdr_swig.py", line 28, in <module>
    _osmosdr_swig = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/osmosdr/osmosdr_swig.py", line 24, in swig_import_helper
    _mod = imp.load_module('_osmosdr_swig', fp, pathname, description)
ImportError: libosmodsp.so.0: cannot open shared object file: No such file or directory

I will continue working on that....


PS: when I tried to remove the previous installation, there was an error: 

--- Snip ---

~> sudo pybombs remove gnuradio
PyBombs.PackageManager - WARNING - This binary package manager can't be instantiated: 
PyBombs.remove - INFO - Removing package gnuradio.
Uninstalling: (100%) [=======================================================================================================================================================================================================================================================]
PyBombs.remove - INFO - Removing package gr-osmosdr.
Uninstalling: (100%) [=======================================================================================================================================================================================================================================================]
-- Extracting version information from git describe...
-- Configuring Boost C++ Libraries...
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   thread
--   system
CMake Error at CMakeLists.txt:153 (find_package):
  By not providing "FindGnuradio.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Gnuradio",
  but CMake did not find one.

  Could not find a package configuration file provided by "Gnuradio"
  (requested version 3.7.3) with any of the following names:

    GnuradioConfig.cmake
    gnuradio-config.cmake

  Add the installation prefix of "Gnuradio" to CMAKE_PREFIX_PATH or set
  "Gnuradio_DIR" to a directory containing one of the above files.  If
  "Gnuradio" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!
See also "/usr/local/src/gr-osmosdr/build/CMakeFiles/CMakeOutput.log".
See also "/usr/local/src/gr-osmosdr/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
PyBombs.Packager.source - ERROR - Uninstall failed. See output above for error messages.
PyBombs.Packager.source - WARNING - Uninstall failed: Uninstall failed..
PyBombs.remove - WARNING - Could not uninstall gr-osmosdr from prefix.
PyBombs.remove - INFO - Removing package gr-iqbal.
Traceback (most recent call last):
  File "/usr/local/bin/pybombs", line 9, in <module>
    load_entry_point('PyBOMBS==2.0.0', 'console_scripts', 'pybombs')()
  File "/usr/local/lib/python2.7/dist-packages/PyBOMBS-2.0.0-py2.7.egg/pybombs/main.py", line 30, in main
    return dispatch() or 0
  File "/usr/local/lib/python2.7/dist-packages/PyBOMBS-2.0.0-py2.7.egg/pybombs/commands/base.py", line 134, in dispatch
    return get_cmd_dict(cmd_list)[args.command](cmd=args.command, args=args).run()
  File "/usr/local/lib/python2.7/dist-packages/PyBOMBS-2.0.0-py2.7.egg/pybombs/commands/remove.py", line 81, in run
    if not self.pm.uninstall(pkg):
  File "/usr/local/lib/python2.7/dist-packages/PyBOMBS-2.0.0-py2.7.egg/pybombs/package_manager.py", line 190, in uninstall
    self.get_packagers(name),
  File "/usr/local/lib/python2.7/dist-packages/PyBOMBS-2.0.0-py2.7.egg/pybombs/package_manager.py", line 201, in _std_package_operation
    result = getattr(pkgr, operation)(rec, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/PyBOMBS-2.0.0-py2.7.egg/pybombs/packagers/source.py", line 136, in uninstall
    cwd = os.getcwd()
OSError: [Errno 2] No such file or directory

--- Snip ----


reply via email to

[Prev in Thread] Current Thread [Next in Thread]