Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to install MAVproxy on gentoo?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Sat Apr 28, 2018 8:59 am    Post subject: How to install MAVproxy on gentoo? Reply with quote

The "mavproxy" is an python written application, that helps to connect to the drones' autopilots (like pixhawk) thru the network (internet or LAN, wirend or wireless..). This is done by running mavprozy on the "companion computer", like raspberry. Since gentoo can be runned on Raspberry PI 3D, I would like to try to use them to boild such companion computer for my remote-controlled model.

The problem is that all available docs are written for the raspbian (debian, ubuntu) or for the windows os.
https://ardupilot.github.io/MAVProxy/html/getting_started/download_and_installation.html

Since I'm dummy in Linux. I'm asking for your help.
In accordance with instruction, posted above, first it is necessary to install python 2.7.x.
In my gentoo setup I have two installed versions of python.
Code:
pi64 ~ # eix dev-lang/python
[U] dev-lang/python
     Available versions:
     (2.7)  2.7.14-r1
     (3.4)  3.4.5-r1(3.4/3.4m)^t (~)3.4.6-r1(3.4/3.4m) (~)3.4.8(3.4/3.4m)
     (3.5)  3.5.4-r1(3.5/3.5m)^t (~)3.5.5(3.5/3.5m)^t{tbz2}
     (3.6)  3.6.3-r1(3.6/3.6m)^t (~)3.6.4(3.6/3.6m)^t (~)3.6.5(3.6/3.6m)
     Installed versions:  2.7.14-r1(2.7)
                                 3.5.4-r1

It is not necessary to uninstall 3.5.4, right?

Then it is necessary to install some additional stuff. In accordance to instruction:
Code:
sudo apt-get install python-opencv python-wxgtk2.8 python-matplotlib python-numpy python-serial python-pil libwxgtk2.8-dev libpython2.7-dev

But for the gentoo I cant decide what to use:
For the python-opencv
Code:
* dev-ros/opencv_apps
     Description:         OpenCV applications for ROS
* dev-ros/opencv_tests
     Description:         Tests for ROS OpenCV integration
* media-libs/opencv
     Description:         A collection of algorithms and sample code for various computer vision problems
* media-plugins/gst-plugins-opencv
     Description:         OpenCV elements for Gstreamer
* ros-meta/vision_opencv
     Description:         Converts between ROS Image messages and OpenCV images

then for the python-wxgtk2.8
Code:
pi64 ~ # eix wxgtk
[U] x11-libs/wxGTK
     Available versions:
     (2.8)  (*)2.8.12.1-r2
     (3.0)  (~)3.0.3
     (3.0-gtk3) (*)3.0.3-r300
     Description:         GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit
     Installed versions:  3.0.3(3.0)

.. so I have to uninstall 3.0.3 and install 2.8.12, right?

Ok, now for the python-matplotlib seems that there is no questions:
Code:
pi64 ~ # eix matplotlib
* dev-python/matplotlib
     Available versions:  *1.4.3 (~)2.1.0-r1 (~)2.1.0-r2 (~)2.1.2-r1 (~)2.2.0 (~)2.2.2 **9999 {cairo doc examples excel fltk gtk gtk2 gtk3 latex pyside qt4 qt5 test tk wxwidgets PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6"}
     Description:         Pure python plotting library with matlab like syntax

The next is python-numpy and again we have a lot of options..
Code:
pi64 ~ # eix numpy
* dev-libs/boost-numpy
     Description:         Boost.Python interface for NumPy
* dev-python/numpy
     Description:         Fast array and numerical python library
* dev-python/numpydoc
     Description:         Sphinx extension to support docstrings in Numpy format
* dev-python/root_numpy
     Description:         Interface between ROOT and numpy

With python-serial everything is clear
Code:
pi64 ~ # eix dev-python/pyserial
* dev-python/pyserial
     Available versions:  3.2.1 (~)3.4

Also I cant decide what to do with python-pil
Code:
pi64 ~ # eix dev-python/pil
* dev-python/pilkit
     Description:         A collection of utilities and processors for the Python Imaging Libary
* dev-python/pillow
     Description:         Python Imaging Library (fork)
* dev-python/pillowfight
     Description:         Eases the transition from PIL to Pillow

I cant find any packages for the libwxgtk2.8-dev and for the libpython2.7-dev :(
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Sat Apr 28, 2018 11:43 am    Post subject: Re: How to install MAVproxy on gentoo? Reply with quote

orion777 wrote:
Code:
pi64 ~ # eix dev-lang/python
[U] dev-lang/python
     Available versions:
     (2.7)  2.7.14-r1
     (3.4)  3.4.5-r1(3.4/3.4m)^t (~)3.4.6-r1(3.4/3.4m) (~)3.4.8(3.4/3.4m)
     (3.5)  3.5.4-r1(3.5/3.5m)^t (~)3.5.5(3.5/3.5m)^t{tbz2}
     (3.6)  3.6.3-r1(3.6/3.6m)^t (~)3.6.4(3.6/3.6m)^t (~)3.6.5(3.6/3.6m)
     Installed versions:  2.7.14-r1(2.7)
                                 3.5.4-r1

It is not necessary to uninstall 3.5.4, right?

Yes but you have already installed python 2.7 (see Installed versions).

orion777 wrote:
Then it is necessary to install some additional stuff. In accordance to instruction:
Code:
sudo apt-get install python-opencv python-wxgtk2.8 python-matplotlib python-numpy python-serial python-pil libwxgtk2.8-dev libpython2.7-dev

But for the gentoo I cant decide what to use:

Probably media-libs/opencv with python use flag enabled

orion777 wrote:
then for the python-wxgtk2.8
Code:
pi64 ~ # eix wxgtk
[U] x11-libs/wxGTK
     Available versions:
     (2.8)  (*)2.8.12.1-r2
     (3.0)  (~)3.0.3
     (3.0-gtk3) (*)3.0.3-r300
     Description:         GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit
     Installed versions:  3.0.3(3.0)

.. so I have to uninstall 3.0.3 and install 2.8.12, right?

Yes but two version can coexist if you need have the two version

orion777 wrote:
The next is python-numpy and again we have a lot of options..
Code:
pi64 ~ # eix numpy
* dev-libs/boost-numpy
     Description:         Boost.Python interface for NumPy
* dev-python/numpy
     Description:         Fast array and numerical python library
* dev-python/numpydoc
     Description:         Sphinx extension to support docstrings in Numpy format
* dev-python/root_numpy
     Description:         Interface between ROOT and numpy

The correct package I think is main package dev-python/numpy

orion777 wrote:
Also I cant decide what to do with python-pil
Code:
pi64 ~ # eix dev-python/pil
* dev-python/pilkit
     Description:         A collection of utilities and processors for the Python Imaging Libary
* dev-python/pillow
     Description:         Python Imaging Library (fork)
* dev-python/pillowfight
     Description:         Eases the transition from PIL to Pillow

In this case use dev-python/pillow

orion777 wrote:
I cant find any packages for the libwxgtk2.8-dev and for the libpython2.7-dev :(

First is provided by x11-libs/wxGTK and second by dev-lang/python. In gentoo there is no a distinction from client and dev package.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Tue May 01, 2018 7:49 am    Post subject: Reply with quote

Thank You!

One question left: I have two pythons (2.7 and 3.5) and pip uses latest one by default. Since mavproxy should be installed with python 2.7, i was reemerging the pip by
Code:
PYTHON_TARGETS="python2_7" emerge -av dev-python/pip

Does any more suitable method exists for the temporary use on 2.7 instead of 3.5 by the pip?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Tue May 01, 2018 7:54 am    Post subject: Reply with quote

orion777 wrote:
Does any more suitable method exists for the temporary use on 2.7 instead of 3.5 by the pip?

Use command pip2.7
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Tue May 01, 2018 2:55 pm    Post subject: Reply with quote

orion777 wrote:
Does any more suitable method exists for the temporary use on 2.7 instead of 3.5 by the pip?
fedeliallalinea wrote:
Use command pip2.7
I thought usage of pip was discouraged? Or is this non-root?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Tue May 01, 2018 3:08 pm    Post subject: Reply with quote

steveL wrote:
I thought usage of pip was discouraged? Or is this non-root?

You right, but in this case is needed only for install only MAVProxy
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Tue May 01, 2018 3:54 pm    Post subject: Reply with quote

A first implementation and not tested ebuild for mavproxy
mavproxy-9999.ebuild:
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PYTHON_COMPAT=( python2_7 )
inherit distutils-r1 git-r3

DESCRIPTION="A UAV ground station software package for MAVLink based systems"
HOMEPAGE="http://ardupilot.github.io/MAVProxy"
EGIT_REPO_URI="https://github.com/ArduPilot/MAVProxy.git"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="${PYTHON_DEPS}
    media-libs/opencv[${PYTHON_USEDEP}]
    dev-python/wxpython:2.8[${PYTHON_USEDEP}]
    dev-python/matplotlib[${PYTHON_USEDEP}]
    dev-python/numpy[${PYTHON_USEDEP}]
    dev-python/pyserial[${PYTHON_USEDEP}]
    dev-python/pillow[${PYTHON_USEDEP}]
"

DEPEND="${RDEPEND}
    virtual/pkgconfig"


Probably you need also dev-python/wxpython as dependency, this include also x11-libs/wxGTK
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Wed May 02, 2018 7:16 pm    Post subject: Reply with quote

I'm not familiar with ebuilds, but I can try..

Now I was installing the mavproxy as follow:
Code:

#pip should work with python2.7
PYTHON_TARGETS="python2_7" emerge -av dev-python/pip
# WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
emerge -C net-misc/modemmanager
---
emerge -av media-libs/opencv
emerge -av =x11-libs/wxGTK-2.8.12.1-r2
emerge -av dev-python/numpy
emerge -av dev-python/pillow
emerge -av x11-libs/wxGTK
emerge -av dev-lang/python
emerge -av dev-libs/libxml2
__________
For the development: https://github.com/ArduPilot/MAVProxy  ;;;; pip search pyserial
# pyserial>=3.0 
emerge -av dev-python/pyserial
# pymavlink>=2.2.8
 pip install --user pymavlink
---
cd /root/.local/bin/
./mavproxy.py --master=/dev/ttyACM0 --baudrate 57600  --aircraft MyCopter

And it seems working! (was not testing it a lot)
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed May 02, 2018 7:21 pm    Post subject: Reply with quote

orion777 wrote:
I'm not familiar with ebuilds, but I can try..

You should create a local overlay and put the ebuild
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Sat Jun 02, 2018 7:50 am    Post subject: Reply with quote

fedeliallalinea wrote:
A first implementation and not tested ebuild for mavproxy

So, I did not try Your ebuild because MAVProxy require pymavlink to run, but as can be seen in the ebuild code, there is no pymavlink. Can You comment please?

So I still install my MAVProxy using not recommended pip :roll: under root :!: as follow:
Code:
# WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
emerge -C net-misc/modemmanager
emerge -av media-libs/opencv
# wxgtk version 2.x
emerge -av =x11-libs/wxGTK-2.8.12.1-r2
# pyserial>=3.0 
emerge -av dev-python/pyserial
#already installed emerge -av dev-python/numpy
#already installed dev-python/pillow
#already installed x11-libs/wxGTK
#already installed dev-lang/python
#already installed dev-libs/libxml2

Now pip should be used under root
Code:
#pymavlink>=2.2.8 
pip2.7 install --user pymavlink
pip2.7 install --user MAVProxy


NOTE: You will gen the error
Code:
    Traceback (most recent call last):
    File "mavproxy.py", line 20, in <module>
    from MAVProxy.modules.lib import textconsole
    ImportError: No module named MAVProxy.modules.lib

if the pip was started under user :roll:

Also NOTE: You will get the error
Code:
Traceback (most recent call last):   File "./mavproxy.py", line 12, in <module>     import serial, Queue, select ImportError: No module named serial

if pyserial is not installed
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Sat Jun 02, 2018 11:59 am    Post subject: Reply with quote

orion777 wrote:
fedeliallalinea wrote:
A first implementation and not tested ebuild for mavproxy

So, I did not try Your ebuild because MAVProxy require pymavlink to run, but as can be seen in the ebuild code, there is no pymavlink. Can You comment please?

Yes I created an ebuild without testing it :P . As soon as I have some time I try to create an ebuild also for pymavlink
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Wed Jun 13, 2018 6:05 am    Post subject: Reply with quote

Sorry, forgot about one stuff..
Here is installation process:
Code:
# WARNING: You should uninstall ModemManager as it conflicts with APM and Pixhawk
emerge -C net-misc/modemmanager

emerge -av media-libs/opencv
# wxgtk version 2.8
emerge -av =x11-libs/wxGTK-2.8.12.1-r2
emerge -av dev-python/matplotlib
#already installed emerge -av dev-python/numpy
#already installed dev-python/pillow
#already installed dev-lang/python

# pyserial>=3.0 
emerge -av dev-python/pyserial
# pymavlink>=2.2.8 
pip2.7 install --user pymavlink

pip2.7 install --user MAVProxy
# or for the development: https://github.com/ArduPilot/MAVProxy
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Wed Jul 11, 2018 7:10 pm    Post subject: Reply with quote

I stick in overlay creating :roll:
Code:
pi64 /usr/local/portage/mavlink/mavproxy # ls
mavproxy-9999.ebuild

pi64 /usr/local/portage/mavlink/mavproxy # chown -R portage:portage /usr/local/portage

pi64 /usr/local/portage/mavlink/mavproxy # pushd /usr/local/portage/mavlink/mavproxy/
/usr/local/portage/mavlink/mavproxy /usr/local/portage/mavlink/mavproxy

pi64 /usr/local/portage/mavlink/mavproxy # repoman manifest
repoman: mavlink is not an official category.  Skipping QA checks in this directory.
Please ensure that you add mavlink to /usr/local/portage/profiles/categories
if it is a new category.

pi64 echo 'mavlink' > /usr/local/portage/profiles/categories

pi64 /usr/local/portage/profiles # popd
/usr/local/portage/mavlink/mavproxy

pi64 /usr/local/portage/mavlink # repoman manifest
 * ERROR: mavlink/mavproxy-9999::localrepo failed (depend phase):
 *   External commands disallowed while sourcing ebuild:
 *
 * Call stack:
 *              ebuild.sh, line 635:  Called source '/usr/local/portage/mavlink/mavproxy/mavproxy-9999.ebuild'
'*   mavproxy-9999.ebuild, line   3:  Called command_not_found_handle '
 *              ebuild.sh, line  88:  Called die
 * The specific snippet of code:
 *              die "External commands disallowed while sourcing ebuild: ${*}"
 *
 * If you need support, post the output of `emerge --info '=mavlink/mavproxy-9999::localrepo'`,
 * the complete build log and the output of `emerge -pqv '=mavlink/mavproxy-9999::localrepo'`.
 * Working directory: '/usr/lib64/python3.5/site-packages'
 * S: '/var/tmp/portage/mavlink/mavproxy-9999/work/mavproxy-9999'
!!! getFetchMap(): aux_get() error reading mavlink/mavproxy-9999; aborting.
Unable to generate manifest.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Thu Jul 12, 2018 1:42 am    Post subject: Reply with quote

How did you create the ebuild file? Based on the output, it looks like you have a stray carriage return in the file.
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Thu Jul 12, 2018 4:09 am    Post subject: Reply with quote

Code:

pi64 ~ # eix app-portage/repoman
[I] app-portage/repoman
     Available versions:  2.3.0-r1 2.3.6 2.3.9{tbz2} **9999 {PYTHON_TARGETS="pypy python2_7 python3_4 python3_5 python3_6"}
     Installed versions:  2.3.9{tbz2}(19:30:51 11/07/18)(PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6")

pi64 ~ # mkdir -p /usr/local/portage/{metadata,profiles}
pi64 ~ # chown -R portage:portage /usr/local/portage
pi64 ~ # echo 'localrepo' > /usr/local/portage/profiles/repo_name
pi64 ~ # cat /usr/local/portage/profiles/repo_name
localrepo
pi64 ~ # cat /etc/portage/repos.conf/localrepo.conf
[localrepo]
location = /usr/local/portagepi64 ~ #
pi64 ~ #
pi64 ~ #
pi64 ~ # mkdir -p /usr/local/portage/app-dicts/mavproxy
pi64 ~ # cp ~root/mavproxy-9999.ebuild /usr/local/portage/app-dicts/mavproxy/mavproxy-9999.ebuild
pi64 ~ # chown -R portage:portage /usr/local/portage
pi64 ~ # pushd /usr/local/portage/app-dicts/mavproxy
/usr/local/portage/app-dicts/mavproxy ~
pi64 /usr/local/portage/app-dicts/mavproxy # repoman manifest
 * ERROR: app-dicts/mavproxy-9999::localrepo failed (depend phase):
 *   External commands disallowed while sourcing ebuild:
 *
 * Call stack:
 *              ebuild.sh, line 635:  Called source '/usr/local/portage/app-dicts/mavproxy/mavproxy-9999.ebuild'
'*   mavproxy-9999.ebuild, line   3:  Called command_not_found_handle '
 *              ebuild.sh, line  88:  Called die
 * The specific snippet of code:
 *              die "External commands disallowed while sourcing ebuild: ${*}"
 *
 * If you need support, post the output of `emerge --info '=app-dicts/mavproxy-9999::localrepo'`,
 * the complete build log and the output of `emerge -pqv '=app-dicts/mavproxy-9999::localrepo'`.
 * Working directory: '/usr/lib64/python3.5/site-packages'
 * S: '/var/tmp/portage/app-dicts/mavproxy-9999/work/mavproxy-9999'
!!! getFetchMap(): aux_get() error reading app-dicts/mavproxy-9999; aborting.
Unable to generate manifest.

Code:
pi64 /usr/local/portage/profiles # ls
repo_name
pi64 /usr/local/portage/profile # ls /usr/local/portage/app-dicts/mavproxy/
mavproxy-9999.ebuild
pi64 /usr/local/portage/profiles # cat /usr/local/portage/app-dicts/mavproxy/mavproxy-9999.ebuild
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PYTHON_COMPAT=( python2_7 )
inherit distutils-r1 git-r3

DESCRIPTION="A UAV ground station software package for MAVLink based systems"
HOMEPAGE="http://ardupilot.github.io/MAVProxy"
EGIT_REPO_URI="https://github.com/ArduPilot/MAVProxy.git"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="${PYTHON_DEPS}
    media-libs/opencv[${PYTHON_USEDEP}]
    dev-python/wxpython:2.8[${PYTHON_USEDEP}]
    dev-python/matplotlib[${PYTHON_USEDEP}]
    dev-python/numpy[${PYTHON_USEDEP}]
    dev-python/pyserial[${PYTHON_USEDEP}]
    dev-python/pillow[${PYTHON_USEDEP}]
"

DEPEND="${RDEPEND}
    virtual/pkgconfig"

Maybe the problem is in KEYWORDS="~amd64 ~x86" as I'm on rpi3 64 bit?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Thu Jul 12, 2018 6:32 am    Post subject: Reply with quote

orion777 wrote:
Maybe the problem is in KEYWORDS="~amd64 ~x86" as I'm on rpi3 64 bit?

Sorry is my fault a 9999 package not need KEYWORDS, you can remove this line, but I don't think that is the problem
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Fri Jul 13, 2018 2:02 am    Post subject: Reply with quote

orion777 wrote:
pi64 ~ # cp ~root/mavproxy-9999.ebuild /usr/local/portage/app-dicts/mavproxy/mavproxy-9999.ebuild[/code]
How was ~root/mavproxy-9999.ebuild created?
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Sun Jul 15, 2018 6:24 am    Post subject: Reply with quote

Hu wrote:
orion777 wrote:
pi64 ~ # cp ~root/mavproxy-9999.ebuild /usr/local/portage/app-dicts/mavproxy/mavproxy-9999.ebuild[/code]
How was ~root/mavproxy-9999.ebuild created?

By copy-paste text from the forum into windows text editor and then save them as mavproxy-9999.ebuild, and, finally, uploading it into ~root
So now emerge returns
Code:
Calculating dependencies \ * Manifest not found for '/usr/local/portage/app-dicts/mavproxy/mavproxy-9999.ebuild'                                              ... done!

!!! All ebuilds that could satisfy "mavproxy" have been masked.
!!! One of the following masked packages is required to complete your request:
- app-dicts/mavproxy-9999::localrepo (masked by: corruption)


Also, as I'm using sakakis made image for the rpi3, I already have some stuff.. maybe this stuff is conflicting?
Code:
pi64 /usr/local/portage # ls
rpi3  sakaki-tools
pi64 /usr/local/portage # cd rpi3
pi64 /usr/local/portage/rpi3 # ls
LICENSE            dev-lang    net-fs            sys-apps      x11-base
README.md          dev-python  net-misc          sys-boot      x11-misc
app-accessibility  dev-util    net-p2p           sys-devel     x11-themes
app-office         media-libs  net-wireless      sys-firmware  xfce-extra
app-portage        media-tv    profiles          sys-kernel
dev-embedded       metadata    repositories.xml  www-client
pi64 /usr/local/portage/rpi3 # cd metadata/
pi64 /usr/local/portage/rpi3/metadata # ls
layout.conf  news
pi64 /usr/local/portage/rpi3 # cat metadata/layout.conf
repo-name = rpi3
masters = gentoo
eapis-banned = 0 1 2 3
eapis-deprecated = 4
sign-commits = false
sign-manifests = false
thin-manifests = true
use-manifests = strict
cache-formats = md5-dict
profile-formats = portage-2 profile-bashrcs
pi64 /usr/local/portage/rpi3 # cd /usr/local/portage/rpi3/profiles/
pi64 /usr/local/portage/rpi3/profiles # ls
default  eapi  profiles.desc  repo_name  targets
pi64 /usr/local/portage/rpi3/profiles # cat repo_name
rpi3
pi64 /usr/local/portage/rpi3/profiles # cd /usr/local/portage/sakaki-tools/
pi64 /usr/local/portage/sakaki-tools # ls
README.md  app-portage  metadata  sys-apps
app-crypt  media-gfx    profiles  sys-kernel
pi64 /usr/local/portage/sakaki-tools # cat profiles/repo_name
sakaki-tools
pi64 /usr/local/portage/sakaki-tools #
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Tue Jul 17, 2018 7:44 am    Post subject: Reply with quote

As in Sakakis' image some additional custom ebuilds exists, I was trying to put mavproxy ebuild in subdirectory, but I'm still get the error
* ERROR: ros-meta/mavproxy-9999::localrepo failed (depend phase):
* External commands disallowed while sourcing ebuild:
*
* Call stack:
* ebuild.sh, line 635: Called source '/usr/local/portage/localrepo/ros-meta/mavproxy/mavproxy-9999.ebuild'
'* mavproxy-9999.ebuild, line 3: Called command_not_found_handle '
* ebuild.sh, line 88: Called die
* The specific snippet of code:
* die "External commands disallowed while sourcing ebuild: ${*}"
*


Code:

mkdir -p /usr/local/portage/localrepo/{metadata,profiles}
chown -R portage:portage /usr/local/portage/localrepo

cat /usr/local/portage/localrepo/profiles/repo_name
localrepo

cat /usr/local/portage/localrepo/metadata/layout.conf
repo-rame = localrepo
masters = gentoo
auto-sync = false

cat /etc/portage/repos.conf/localrepo.conf
[localrepo]
location = /usr/local/portage/localrepo

mkdir -p /usr/local/portage/localrepo/ros-meta/mavproxy
cp ~root/mavproxy-9999.ebuild /usr/local/portage/localrepo/ros-meta/mavproxy/mavproxy-9999.ebuild
chown -R portage:portage /usr/local/portage/localrepo    ## Again? But Ok..
pushd /usr/local/portage/localrepo/ros-meta/mavproxy
pi64 /usr/local/portage/localrepo/ros-meta/mavproxy # repoman manifest
 * ERROR: ros-meta/mavproxy-9999::localrepo failed (depend phase):
 *   External commands disallowed while sourcing ebuild:
 *
 * Call stack:
 *              ebuild.sh, line 635:  Called source '/usr/local/portage/localrepo/ros-meta/mavproxy/mavproxy-9999.ebuild'
'*   mavproxy-9999.ebuild, line   3:  Called command_not_found_handle '
 *              ebuild.sh, line  88:  Called die
 * The specific snippet of code:
 *              die "External commands disallowed while sourcing ebuild: ${*}"
 *
 * If you need support, post the output of `emerge --info '=ros-meta/mavproxy-9999::localrepo'`,
 * the complete build log and the output of `emerge -pqv '=ros-meta/mavproxy-9999::localrepo'`.
 * Working directory: '/usr/lib64/python3.5/site-packages'
 * S: '/var/tmp/portage/ros-meta/mavproxy-9999/work/mavproxy-9999'
!!! getFetchMap(): aux_get() error reading ros-meta/mavproxy-9999; aborting.
Unable to generate manifest.


Code:
pi64 /usr/local/portage/localrepo/ros-meta/mavproxy # cat /usr/local/portage/localrepo/ros-meta/mavproxy/mavproxy-9999.ebuild
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PYTHON_COMPAT=( python2_7 )
inherit distutils-r1 git-r3

DESCRIPTION="A UAV ground station software package for MAVLink based systems"
HOMEPAGE="http://ardupilot.github.io/MAVProxy"
EGIT_REPO_URI="https://github.com/ArduPilot/MAVProxy.git"

LICENSE="GPL-3+"
SLOT="0"
# KEYWORDS="~amd64 ~x86"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="${PYTHON_DEPS}
    media-libs/opencv[${PYTHON_USEDEP}]
    dev-python/wxpython:2.8[${PYTHON_USEDEP}]
    dev-python/matplotlib[${PYTHON_USEDEP}]
    dev-python/numpy[${PYTHON_USEDEP}]
    dev-python/pyserial[${PYTHON_USEDEP}]
    dev-python/pillow[${PYTHON_USEDEP}]
"

DEPEND="${RDEPEND}
    virtual/pkgconfig"
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Tue Jul 17, 2018 8:00 pm    Post subject: Reply with quote

Finally, manifest if going without errors!
So: I was copying ebuild text from message above and paste it to the windows' notepad; then this notepad file was uploaded to the linux and...
cat shows that everything is good; mc - view (F3) also shows that everything is perfect; but if you will open the ebuild file (created in windows) via mc - edit (F4), then you will see this:
https://ibb.co/hvDBmy Just clean this unnecessary stuff and feel lucky ))
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21490

PostPosted: Wed Jul 18, 2018 1:49 am    Post subject: Reply with quote

You should never use Windows for processing text meant to be used on a non-Windows system. For compatibility with DOS, standard Windows programs generate mangled line breaks (CRLF, instead of proper LF), as you saw. Some non-default Windows programs do the right thing, but you will save yourself considerable trouble if you do the work directly from Linux.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Wed Jul 18, 2018 5:47 am    Post subject: Reply with quote

Hu is right. But next time if it still happens you can also try
Code:
[I] app-text/dos2unix
     Available versions:  7.3.5 ~7.4.0 {debug nls test}
     Installed versions:  7.3.5(08:33:24 08. 01. 18)(nls -debug -test)
     Homepage:            http://www.xs4all.nl/~waterlan/dos2unix.html https://sourceforge.net/projects/dos2unix/
     Description:         Convert DOS or MAC text files to UNIX format or vice versa

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Wed Jul 18, 2018 7:15 pm    Post subject: Reply with quote

Okay, thank you!
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Sat Jul 21, 2018 8:51 am    Post subject: Reply with quote

Thanks for the ebuild. At least for now, mavproxy.py runs as it should be and also is able to run its additional commands, for example, tcp connection!
It may be interesting to note that the prepared APsync image http://ardupilot.org/dev/docs/apsync-intro.html#apsync-intro on raspbian fails to run mavproxy tcp connection, per its own guide.
Back to top
View user's profile Send private message
orion777
Apprentice
Apprentice


Joined: 15 Mar 2017
Posts: 207
Location: Riga, Latvia

PostPosted: Fri Aug 03, 2018 6:32 pm    Post subject: Reply with quote

Good day! As your remember (probably), mavproxy requires pymavlink. The pymavlink was installed via pip_2.7 in my previous setup.
Now I prepare new setup and here I wish to use an overlay instead of pip.
Here is the overlay, created using mavproxy overlay as an example:
Code:
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

PYTHON_COMPAT=( python2_7 )
inherit distutils-r1 git-r3

DESCRIPTION="A python implementation of the MAVLink protocol"
HOMEPAGE="http://qgroundcontrol.org/mavlink/start"
EGIT_REPO_URI="https://github.com/ArduPilot/pymavlink.git"

LICENSE="GPL-3+"
SLOT="0"
#KEYWORDS="~amd64 ~x86"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="${PYTHON_DEPS}
    dev-python/future[${PYTHON_USEDEP}]
    dev-python/lxml[${PYTHON_USEDEP}]
"

DEPEND="${RDEPEND}
    virtual/pkgconfig"


During emerge I get the following error, whereas emerge -pqv returns no problems:
Code:
 emerge -pqv '=ros-meta/pymavlink-9999::localrepo'

Local copy of remote index is up-to-date and will be used.
[ebuild  N    ] ros-meta/pymavlink-9999  PYTHON_TARGETS="python2_7"

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

Code:
emerge -av ros-meta/pymavlink

Local copy of remote index is up-to-date and will be used.

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N    *] ros-meta/pymavlink-9999::localrepo  PYTHON_TARGETS="python2_7" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) ros-meta/pymavlink-9999::localrepo
>>> Failed to emerge ros-meta/pymavlink-9999, Log file:
>>>  '/var/tmp/portage/ros-meta/pymavlink-9999/temp/build.log'
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 0.56, 0.47, 0.47
 * Package:    ros-meta/pymavlink-9999
 * Repository: localrepo
 * USE:        arm64 elibc_glibc kernel_linux python_targets_python2_7 userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
 * Fetching https://github.com/ArduPilot/pymavlink.git ...
git fetch https://github.com/ArduPilot/pymavlink.git +HEAD:refs/git-r3/HEAD
git symbolic-ref refs/git-r3/ros-meta/pymavlink/0/__main__ refs/git-r3/HEAD
 * Checking out https://github.com/ArduPilot/pymavlink.git to /var/tmp/portage/ros-meta/pymavlink-9999/work/pymavlink-9999 ...
git checkout --quiet refs/git-r3/HEAD
GIT update -->
   repository:               https://github.com/ArduPilot/pymavlink.git
   at the commit:            52a07ef859b8352b35325bdd0b820c3a254706d3
>>> Source unpacked in /var/tmp/portage/ros-meta/pymavlink-9999/work
>>> Preparing source in /var/tmp/portage/ros-meta/pymavlink-9999/work/pymavlink-9999 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/ros-meta/pymavlink-9999/work/pymavlink-9999 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/ros-meta/pymavlink-9999/work/pymavlink-9999 ...
 * python2_7: running distutils-r1_run_phase distutils-r1_python_compile
python2.7 setup.py build
running build
running build_py
No XML message definitions found
 * ERROR: ros-meta/pymavlink-9999::localrepo failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  124:  Called src_compile
 *   environment, line 3161:  Called distutils-r1_src_compile
 *   environment, line 1015:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
 *   environment, line  332:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2714:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2083:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2081:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line  749:  Called distutils-r1_run_phase 'distutils-r1_python_compile'
 *   environment, line 1006:  Called distutils-r1_python_compile
 *   environment, line  881:  Called esetup.py 'build'
 *   environment, line 1274:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}";
 *
 * If you need support, post the output of `emerge --info '=ros-meta/pymavlink-9999::localrepo'`,
 * the complete build log and the output of `emerge -pqv '=ros-meta/pymavlink-9999::localrepo'`.
 * The complete build log is located at '/var/tmp/portage/ros-meta/pymavlink-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/ros-meta/pymavlink-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/ros-meta/pymavlink-9999/work/pymavlink-9999'
 * S: '/var/tmp/portage/ros-meta/pymavlink-9999/work/pymavlink-9999'

 * Messages for package ros-meta/pymavlink-9999:

 * ERROR: ros-meta/pymavlink-9999::localrepo failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  124:  Called src_compile
 *   environment, line 3161:  Called distutils-r1_src_compile
 *   environment, line 1015:  Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile'
 *   environment, line  332:  Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2714:  Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2083:  Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line 2081:  Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile'
 *   environment, line  749:  Called distutils-r1_run_phase 'distutils-r1_python_compile'
 *   environment, line 1006:  Called distutils-r1_python_compile
 *   environment, line  881:  Called esetup.py 'build'
 *   environment, line 1274:  Called die
 * The specific snippet of code:
 *       "${@}" || die "${die_args[@]}";
 *
 * If you need support, post the output of `emerge --info '=ros-meta/pymavlink-9999::localrepo'`,
 * the complete build log and the output of `emerge -pqv '=ros-meta/pymavlink-9999::localrepo'`.
 * The complete build log is located at '/var/tmp/portage/ros-meta/pymavlink-9999/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/ros-meta/pymavlink-9999/temp/environment'.
 * Working directory: '/var/tmp/portage/ros-meta/pymavlink-9999/work/pymavlink-9999'
 * S: '/var/tmp/portage/ros-meta/pymavlink-9999/work/pymavlink-9999'

Any ideas, please? :oops:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum