Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Software installs: translating Ubuntu > Gentoo (Qemu ARM64)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
gilius
n00b
n00b


Joined: 11 Apr 2018
Posts: 10

PostPosted: Thu Apr 12, 2018 2:24 am    Post subject: Software installs: translating Ubuntu > Gentoo (Qemu ARM6 Reply with quote

I need to get some software installed on Gentoo (ARM64 build; running on the Raspberry Pi 3):

Here's how I would do it in Ubuntu:
Code:
sudo apt-get install libvirt-bin
sudo apt-get install virt-manager
sudo adduser [i]name[/i] libvirtd
sudo service libvirt-bin start
sudo service virtlogd start
virsh -c qemu:///system list


I believe the Gentoo command to install the first one is:
Code:
emerge -av app-emulation/libvirt


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

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

Calculating dependencies... done!
[ebuild  N     ] sys-apps/dmidecode-3.1::gentoo  USE="(-selinux)" 60 KiB
[ebuild  N     ] app-misc/scrub-2.6.1::gentoo  355 KiB
[ebuild  N     ] net-libs/rpcsvc-proto-1.3.1::gentoo  58 KiB
[ebuild  N     ] app-text/xhtml1-20020801-r5::gentoo  227 KiB
[ebuild  N     ] net-analyzer/netcat6-1.0-r2::gentoo  USE="bluetooth ipv6 nls" 259 KiB
[ebuild  N     ] app-emulation/libvirt-4.1.0-r3:0/4.1.0::gentoo  USE="caps dbus libvirtd macvtap nls policykit qemu udev vepa (-apparmor) (-audit) -firewalld (-fuse) -glusterfs -iscsi -libssh -lvm -lxc -nfs -numa (-openvz) -parted -pcap -phyp -rbd (-sasl) (-selinux) -uml -virt-network (-virtualbox) -wireshark-plugins (-xen) -zeroconf (-zfs)" 14,695 KiB

Total: 6 packages (6 new), Size of downloads: 15,651 KiB

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Emerging (1 of 6) sys-apps/dmidecode-3.1::gentoo
>>> Emerging (2 of 6) app-misc/scrub-2.6.1::gentoo
>>> Emerging (3 of 6) net-libs/rpcsvc-proto-1.3.1::gentoo
>>> Emerging (4 of 6) app-text/xhtml1-20020801-r5::gentoo
>>> Emerging (5 of 6) net-analyzer/netcat6-1.0-r2::gentoo
>>> Installing (4 of 6) app-text/xhtml1-20020801-r5::gentoo
>>> Installing (1 of 6) sys-apps/dmidecode-3.1::gentoo
>>> Installing (2 of 6) app-misc/scrub-2.6.1::gentoo
>>> Installing (3 of 6) net-libs/rpcsvc-proto-1.3.1::gentoo
>>> Installing (5 of 6) net-analyzer/netcat6-1.0-r2::gentoo
>>> Emerging (6 of 6) app-emulation/libvirt-4.1.0-r3::gentoo
>>> Installing (6 of 6) app-emulation/libvirt-4.1.0-r3::gentoo
>>> Recording app-emulation/libvirt in "world" favorites file...
>>> Jobs: 6 of 6 complete                           Load avg: 2.55, 3.33, 3.98

 * Messages for package app-emulation/libvirt-4.1.0-r3:

 * Unable to find kernel sources at /usr/src/linux
 * Unable to calculate Linux Kernel version for build, attempting to use running version
 * Unable to check for the following kernel config options due
 * to absence of any configured kernel sources or compiled
 * config:
 *  - MACVTAP
 *  - MEMCG
 *  - MEMCG_SWAP
 * You're on your own to make sure they are set if needed.
 * Important: The openrc libvirtd init script is now broken up into two
 * separate services: libvirtd, that solely handles the daemon, and
 * libvirt-guests, that takes care of clients during shutdown/restart of the
 * host. In order to reenable client handling, edit /etc/conf.d/libvirt-guests
 * and enable the service and start it:
 *
 * $ rc-update add libvirt-guests
 * $ service libvirt-guests start
 *
 *
 * For the basic networking support (bridged and routed networks) you don't
 * need any extra software. For more complex network modes including but not
 * limited to NATed network, you can enable the 'virt-network' USE flag. It
 * will pull in required runtime dependencies
 *
 *
 * If you are using dnsmasq on your system, you will have to configure
 * /etc/dnsmasq.conf to enable the following settings:
 *
 * bind-interfaces
 * interface or except-interface
 *
 * Otherwise you might have issues with your existing DNS server.
 *
 *
 * For openrc users:
 *
 * Please use /etc/conf.d/libvirtd to control the '--listen' parameter for
 * libvirtd.
 *
 * Use /etc/init.d/libvirt-guests to manage clients on restart/shutdown of
 * the host. The default configuration will suspend and resume running kvm
 * guests with 'managedsave'. This behavior can be changed under
 * /etc/conf.d/libvirt-guests
 *
 *
 * For systemd users:
 *
 * Please use /etc/systemd/system/libvirtd.service.d/00gentoo.conf
 * to control the '--listen' parameter for libvirtd.
 *
 * The configuration for the 'libvirt-guests.service' is found under
 * /etc/libvirt/libvirt-guests.conf"
 *
 *
 * If you have built libvirt with policykit support, a new group "libvirt" has
 * been created. Simply add a user to the libvirt group in order to grant
 * administrative access to libvirtd. Alternatively, drop a custom policykit
 * rule into /etc/polkit-1/rules.d.
 *
 * If you have built libvirt without policykit support (USE=-policykit), you
 * must change the unix sock group and/or perms in /etc/libvirt/libvirtd.conf
 * in order to allow normal users to connect to libvirtd.
 *
 *
 * If libvirtd is built with USE=caps, libvirt will now start qemu/kvm VMs
 * with non-root privileges. Ensure any resources your VMs use are accessible
 * by qemu:qemu.
 *
 * (Note: Above message is only printed the first time package is
 * installed. Please look at /usr/share/doc/libvirt-4.1.0-r3/README.gentoo*
 * for future reference)
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

Does that look like it installed ok?

Code:
emerge -av app-emulation/virt-manager


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

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

Calculating dependencies... done!

The following keyword changes are necessary to proceed:
 (see "package.accept_keywords" in the portage(5) man page for more details)
# required by app-emulation/virt-manager (argument)
=app-emulation/virt-manager-9999 **

NOTE: The --autounmask-keep-masks option will prevent emerge
      from creating package.unmask or ** keyword changes.

Would you like to add these changes to your config files? [Yes/No] y

Autounmask changes successfully written.

 * IMPORTANT: config file '/etc/portage/package.accept_keywords/zzz_via_autounmask' needs updating.
 * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 * sections of the emerge man page to learn how to update config files.

 * In order to avoid wasting time, backtracking has terminated early
 * due to the above autounmask change(s). The --autounmask-backtrack=y
 * option can be used to force further backtracking, but there is no
 * guarantee that it will produce a solution.

emerge: there are no ebuilds built with USE flags to satisfy "dev-python/configparser[python_targets_python3_4(-)?,python_targets_python3_5(-)?,python_targets_python3_6(-)?,-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_pypy3(-),-python_single_target_python2_7(-),python_single_target_python3_4(+)?,python_single_target_python3_5(+)?,python_single_target_python3_6(+)?]".
!!! One of the following packages is required to complete your request:
- app-emulation/virt-manager-9999::gentoo (Change USE: -python_targets_python3_5, this change violates use flag constraints defined by app-emulation/virt-manager-9999: 'exactly-one-of ( python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 )')
(dependency required by "app-emulation/virt-manager-9999::gentoo" [ebuild])
(dependency required by "app-emulation/virt-manager" [argument])


Above I seem to encounter a problem; any ideas why?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24631
Location: here

PostPosted: Thu Apr 12, 2018 5:55 am    Post subject: Reply with quote

Portage tell you that for app-emulation/virt-manager
Code:
'exactly-one-of ( python_single_target_python3_4 python_single_target_python3_5 python_single_target_python3_6 ) python_single_target_python3_4? ( python_targets_python3_4 ) python_single_target_python3_5? ( python_targets_python3_5 ) python_single_target_python3_6? ( python_targets_python3_6 )')

must be setted.

It seems that there is more than one enabled.
Post your emerge --info and grep -r virt-manager /etc/portage/package.use*
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
gilius
n00b
n00b


Joined: 11 Apr 2018
Posts: 10

PostPosted: Thu Apr 12, 2018 7:36 am    Post subject: Reply with quote

Thanks for your reply!

Code:
pi64 ~ # emerge --info
Portage 2.3.27 (python 3.5.4-final-0, default/linux/arm64/17.0/desktop, gcc-7.3.0, glibc-2.26-r6, 4.14.33-v8-0a76b56e61cf+ aarch64)
=================================================================
System uname: Linux-4.14.33-v8-0a76b56e61cf+-aarch64-with-gentoo-2.4.1
KiB Mem:      992080 total,     36624 free
KiB Swap:     524284 total,    388348 free
Timestamp of repository gentoo: Sun, 01 Apr 2018 00:45:01 +0000
Head commit of repository gentoo: ec8101d3414bd260ba634914627ea4cd500c6950
Head commit of repository sakaki-tools: 47298eadf03413e0278684ff29c9d8a24df7bf0e

Head commit of repository rpi3: f34929c0ee6f83029765b7dd19c9a2340602a540

sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p1) 2.30.0
distcc 3.2rc1 aarch64-unknown-linux-gnu [disabled]
app-shells/bash:          4.4_p19::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.1-r2::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.11.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.35.5::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.30::gentoo
sys-devel/gcc:            7.3.0::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.15::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://isshoni.org/gentoo-portage-pi64
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-max-age: 24

sakaki-tools
    location: /usr/local/portage/sakaki-tools
    sync-type: git
    sync-uri: https://github.com/sakaki-/sakaki-tools.git
    masters: gentoo
    priority: 50

rpi3
    location: /usr/local/portage/rpi3
    sync-type: git
    sync-uri: https://github.com/sakaki-/rpi3-overlay.git
    masters: gentoo
    priority: 100

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="@FREE CC-Sampling-Plus-1.0"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=5 --load-average=4"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles getbinpkg merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://trumpetti.atm.tut.fi/gentoo/"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5 -l4"
PKGDIR="/usr/portage/packages"
PORTAGE_BINHOST="https://isshoni.org/pi64pie"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa arm64 berkdb bindist bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus dri dts dvdr egl emboss encode exif fam ffmpeg flac fortran gdbm gif glamor gles1 gles2 gpm gtk iconv ipv6 jpeg lcms libnotify lock mad mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds qt3support qt4 qt5 readline seccomp spell ssl startup-notification svg tcpd thunar tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp neon thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby21 ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="fbdev vc4" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, ENV_UNSET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


How to output this command grep -r virt-manager /etc/portage/package.use*? Sorry, I'm not very experienced with Linux...
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24631
Location: here

PostPosted: Thu Apr 12, 2018 9:17 am    Post subject: Reply with quote

gilius wrote:
How to output this command grep -r virt-manager /etc/portage/package.use*? Sorry, I'm not very experienced with Linux...

You should run a terminal and then copy the command.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
gilius
n00b
n00b


Joined: 11 Apr 2018
Posts: 10

PostPosted: Thu Apr 12, 2018 10:12 am    Post subject: Reply with quote

fedeliallalinea wrote:
gilius wrote:
How to output this command grep -r virt-manager /etc/portage/package.use*? Sorry, I'm not very experienced with Linux...

You should run a terminal and then copy the command.

I ran that command a few times with and without * at the end, and it moved to the next line - indicating that it had executed successfully? So it's not meant to output anything? Should I attempt emerge -av app-emulation/virt-manager again?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24631
Location: here

PostPosted: Thu Apr 12, 2018 12:17 pm    Post subject: Reply with quote

gilius wrote:
I ran that command a few times with and without * at the end, and it moved to the next line - indicating that it had executed successfully? So it's not meant to output anything? Should I attempt emerge -av app-emulation/virt-manager again?

If the command return nothing means that there is not entry in package.use (man grep for see what command do).
I read better the error message and the situation is no simple.
The problem is that dev-python/configparser package need the same python_targets of app-emulation/virt-manager-9999 package, unfortunately dev-python/configparser has no python3_x support, but only python2_7, and app-emulation/virt-manager-9999 has no python2_7 support.
This situation, I think but not sure, is not resolvable as long as dev-python/configparser will not have python3_x support
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 404

PostPosted: Thu Apr 12, 2018 12:43 pm    Post subject: Reply with quote

gilius,

I've just tried emerging virt-manager myself on a copy of your system image, and the issue actually appears to stem from the fact it is pulling in a number of "9999" (bleeding edge) ebuilds, because of keywording. This is a common issue atm for arm64, since there are many packages that are not "keyworded" (tested by Gentoo devs) for this architecture. When this occurs, Portage's default behaviour is to ask you if you'd like to allow the -9999 versions to build, but that's almost never what you want to do.

I suggest you first run (do all this as root) "dispatch-conf" and then press "z" to zap any configuration file changes that are pending as a result of your prior emerge runs. Then get rid of any changes that have already made it through:
Code:
pi64 ~ # > /etc/portage/package.accept_keywords/zzz_via_autounmask
pi64 ~ # > /etc/portage/package.use/zzz_via_autounmask

Then add the following text to the file /etc/portage/package.accept_keywords/virt-manager:
Code:
app-emulation/virt-manager * ~*
# dependencies of virt-manager
app-emulation/spice-protocol * ~*
net-libs/gtk-vnc * ~*
dev-perl/Text-CSV * ~*
net-misc/x11-ssh-askpass * ~*
net-misc/spice-gtk * ~*
app-emulation/libvirt-glib * ~*


And the following in /etc/portage/package.use/virt-manager:
Code:
# required by virt-manager
net-libs/gtk-vnc python
net-misc/spice-gtk usbredir


Then try
Code:
pi64 ~ # emerge -av app-emulation/libvirt
pi64 ~ # emerge -av app-emulation/virt-manager

again. What the package.accept_keywords edits do is, tell Portage it is OK to try building any package in the list that is marked as stable (the "*") or testing (the "~*") on any arch (e.g. amd64), even if not available right now for arm64. This will normally pick off a "sane" candidate to try building (no guarantees they will build though, if there is e.g. platform-specific assembler in there, but most stuff will work). The package.use changes are required by a standard libvirt install.

For more detail on Gentoo's package management, please see e.g. my article here.

Edited to note "* ~*" entries should be in package.accept_keywords, not package.unmask subdirectory; my bad ><
_________________
Regards,

sakaki


Last edited by Sakaki on Fri Apr 13, 2018 12:07 am; edited 2 times in total
Back to top
View user's profile Send private message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 404

PostPosted: Thu Apr 12, 2018 12:51 pm    Post subject: Reply with quote

PS for arm64 stuff you'll probably get a better response posting to the "Gentoo on ARM" forum - someone there may even have built the exact package you're trying to get working.
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 24631
Location: here

PostPosted: Thu Apr 12, 2018 1:01 pm    Post subject: Reply with quote

Thanks Sakaki I did not think that package without keyword arm64 can compile.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
gilius
n00b
n00b


Joined: 11 Apr 2018
Posts: 10

PostPosted: Thu Apr 12, 2018 11:00 pm    Post subject: Reply with quote

Thanks to Sakaki also! I ran the first commands (zap and clearing the other files) then when I came to updating the virt-manager files they were not already present, so I created them using cat > virt-manager. I then ran the libvirt install again:

Code:
pi64 /etc/portage/package.unmask # emerge -av app-emulation/libvirt
--- Invalid atom in /etc/portage/package.unmask/virt-manager: app-emulation/virt-manager * ~*
--- Invalid atom in /etc/portage/package.unmask/virt-manager: app-emulation/spice-protocol * ~*
--- Invalid atom in /etc/portage/package.unmask/virt-manager: net-libs/gtk-vnc * ~*
--- Invalid atom in /etc/portage/package.unmask/virt-manager: dev-perl/Text-CSV * ~*
--- Invalid atom in /etc/portage/package.unmask/virt-manager: net-misc/x11-ssh-askpass * ~*
--- Invalid atom in /etc/portage/package.unmask/virt-manager: net-misc/spice-gtk * ~*
--- Invalid atom in /etc/portage/package.unmask/virt-manager: app-emulation/libvirt-glib * ~*

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

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

Calculating dependencies... done!
[binary   R    ] app-emulation/libvirt-4.1.0-r3:0/4.1.0::gentoo  USE="caps dbus libvirtd macvtap nls policykit qemu udev vepa (-apparmor) (-audit) -firewalld (-fuse) -glusterfs -iscsi -libssh -lvm -lxc -nfs -numa (-openvz) -parted -pcap -phyp -rbd (-sasl) (-selinux) -uml -virt-network (-virtualbox) -wireshark-plugins (-xen) -zeroconf (-zfs)" 0 KiB

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

Would you like to merge these packages? [Yes/No] y
>>> Emerging binary (1 of 1) app-emulation/libvirt-4.1.0-r3::gentoo
>>> Installing (1 of 1) app-emulation/libvirt-4.1.0-r3::gentoo
>>> Jobs: 1 of 1 complete                           Load avg: 1.47, 0.77, 0.54

 * Messages for package app-emulation/libvirt-4.1.0-r3:

 * Unable to check for the following kernel config options due
 * to absence of any configured kernel sources or compiled
 * config:
 *  - MACVTAP
 *  - MEMCG
 *  - MEMCG_SWAP
 * You're on your own to make sure they are set if needed.
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

Has that worked? It complained about invalid atom though. Should I try installing virt-manager again? I don't really need it, but it helps detect if KVM is enabled on the software side via Libvirt.
Code:
pi64 /etc/portage/package.unmask # /etc/init.d/libvirtd start
 * Caching service dependencies ...                                       [ ok ]
 * Starting virtlogd ...                                                  [ ok ]
 * /etc/libvirt/lxc: creating directory
 * /etc/libvirt/qemu: creating directory
 * /etc/libvirt/storage: creating directory
 * Starting libvirtd ...                                                  [ ok ]

Looks ok, right?

Code:
pi64 /etc/portage/package.unmask # virsh -c qemu:///system list
 Id    Name                           State
----------------------------------------------------

OK COOOOOOL!!!!!
Back to top
View user's profile Send private message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 404

PostPosted: Fri Apr 13, 2018 12:03 am    Post subject: Reply with quote

Oops, that was my mistake - the entries should be /etc/portage/package.accept_keywords/virt-manager, not /etc/portage/package.unmask/virt-manager...

To fix it just do:
Code:
pi64 ~ # mv /etc/portage/package.{unmask,accept_keywords}/virt-manager


It looks as if libvirt itself has installed fine (and indeed did even the first time you tried it), you just need to try re-emerging virt-manager now.
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
gilius
n00b
n00b


Joined: 11 Apr 2018
Posts: 10

PostPosted: Sat Apr 14, 2018 8:39 am    Post subject: How to install full Qemu on ARM64? Reply with quote

I am running Gentoo ARM64 on Raspberry Pi 3, and a novice when it comes to using Linux.

How might I go about installing the entire Qemu package please? Here's how I would do it in Ubuntu:

https://download.qemu.org/qemu-2.12.0-rc2.tar.xz
sudo apt-get install libglib2.0-dev
sudo apt-get install libpixman-1-dev
sudo apt-get install libpixman-1-0
sudo apt-get install libsdl2-dev
sudo apt-get install autoconf
make a new subdirectory named build and cd to that dir
../configure --disable-vnc --enable-sdl --with-sdlabi=2.0
sudo make
sudo make install

Right now, I have only the qemu-system-aarch64, and it complains about missing vgabios-stdvga.bin when using the -device vga flag. I took that file from a Windows distribution, but it just comes up with a black screen after "guest initializes display". That's why I thought it might be better if I installed the entire Qemu package - but using Portage is not straightforward for me.

Any help would be much appreciated!
Back to top
View user's profile Send private message
gilius
n00b
n00b


Joined: 11 Apr 2018
Posts: 10

PostPosted: Sat Apr 14, 2018 8:42 am    Post subject: Reply with quote

Thanks again Sakaki! I got a new problem now - perhaps resolved with a complete install of Qemu - have posted in the forum you suggested:
https://forums.gentoo.org/viewtopic-p-8209500.html#8209500
Back to top
View user's profile Send private message
gilius
n00b
n00b


Joined: 11 Apr 2018
Posts: 10

PostPosted: Sat Apr 14, 2018 11:57 am    Post subject: Reply with quote

I've found out that the VGA issue is a bug when -device vga flag is used in conjunction with -enable-kvm :evil:
Back to top
View user's profile Send private message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 404

PostPosted: Sat Apr 14, 2018 2:55 pm    Post subject: Reply with quote

gilius,

there's some info about Gentoo's version of QEMU on the wiki, here, and in its package listing.

In particular, you may wish to add some additional supported targets, and possibly some additional USE flags, to turn on features you need. You can see the configuration of your currently installed package, and which other versions and options are available, using eix. For example, on my gentoo-on-rpi3-64bit system:
Code:
pi64 ~ # eix --verbose --exact app-emulation/qemu
* app-emulation/qemu
     Available versions:  (~)2.11.1-r2 (~)2.11.1-r53{tbz2} **9999
     IUSE (all versions): accessibility +aio alsa bluetooth bzip2 +caps capstone +curl debug +fdt +filecaps glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png pulseaudio python rbd sasl sdl sdl2 +seccomp selinux smartcard snappy spice ssh static static-user systemtap tci test usb usbredir vde +vhost-net virgl virtfs +vnc vte xattr xen xfs KERNEL="FreeBSD linux" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="aarch64 alpha arm cris hppa i386 lm32 m68k microblaze microblazeel mips mips64 mips64el mipsel moxie nios2 or1k ppc ppc64 ppcemb riscv32 riscv64 s390x sh4 sh4eb sparc sparc64 tricore unicore32 x86_64 xtensa xtensaeb" QEMU_USER_TARGETS="aarch64 aarch64_be alpha arm armeb cris hppa i386 m68k microblaze microblazeel mips mips64 mips64el mipsel mipsn32 mipsn32el nios2 or1k ppc ppc64 ppc64abi32 ppc64le riscv32 riscv64 s390x sh4 sh4eb sparc sparc32plus sparc64 tilegx x86_64 xtensa xtensaeb"
     Installed versions:  Version:   2.11.1-r53{tbz2}
                          Date:      14:29:47 11/04/18
                          USE:       aio alsa bluetooth bzip2 caps curl fdt filecaps gtk jpeg ncurses nls opengl pin-upstream-blobs png seccomp usb vhost-net vnc xattr -accessibility -capstone -debug -glusterfs -gnutls -gtk2 -infiniband -iscsi -lzo -nfs -numa -pulseaudio -python -rbd -sasl -sdl -sdl2 -selinux -smartcard -snappy -spice -ssh -static -static-user -systemtap -tci -test -usbredir -vde -virgl -virtfs -vte -xen -xfs KERNEL="linux -FreeBSD" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="aarch64 -alpha -arm -cris -i386 -lm32 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -moxie -nios2 -or1k -ppc -ppc64 -ppcemb -s390x -sh4 -sh4eb -sparc -sparc64 -tricore -unicore32 -x86_64 -xtensa -xtensaeb" QEMU_USER_TARGETS="-aarch64 -alpha -arm -armeb -cris -hppa -i386 -m68k -microblaze -microblazeel -mips -mips64 -mips64el -mipsel -mipsn32 -mipsn32el -nios2 -or1k -ppc -ppc64 -ppc64abi32 -ppc64le -s390x -sh4 -sh4eb -sparc -sparc32plus -sparc64 -tilegx -x86_64"
                          DEPEND:    ${RDEPEND} dev-lang/perl =dev-lang/python-2* sys-apps/texinfo virtual/pkgconfig >=sys-kernel/linux-headers-2.6.35 sys-devel/gettext virtual/pkgconfig sys-libs/libcap
                          RDEPEND:   >=dev-libs/glib-2.0 sys-libs/zlib sys-apps/attr >=x11-libs/pixman-0.28.0 dev-libs/libaio >=media-libs/alsa-lib-1.0.13 net-wireless/bluez app-arch/bzip2 sys-libs/libcap-ng >=net-misc/curl-7.15.4 >=sys-apps/dtc-1.4.2 x11-libs/gtk+:3 virtual/jpeg:0/0= sys-libs/ncurses:0/6=[unicode] sys-libs/ncurses:0/6= virtual/opengl media-libs/libepoxy media-libs/mesa media-libs/mesa[egl,gbm] media-libs/libpng:0/16= >=sys-libs/libseccomp-2.1.0 >=virtual/libusb-1-r2
                          EAPI:      6
     Best versions/slot:  (~)2.11.1-r53{tbz2}
     Homepage:            http://www.qemu.org http://www.linux-kvm.org
     Find open bugs:      https://bugs.gentoo.org/buglist.cgi?quicksearch=app-emulation%2Fqemu
     Description:         QEMU + Kernel-based Virtual Machine userland tools
     License:             GPL-2 LGPL-2 BSD-2


So my installed QEMU (fields following "Installed versions:") only has one QEMU_SOFTMMU_TARGET set currently (aarch64, the native architecture; the other arches are prefixed by minus signs), and has the aio, alsa, bluetooth etc. USE flags set, but the accessibility, capstone, debug etc. USE flags unset (again, the minus-sign prefix shows that).

If you wanted to e.g. compile it with additional spice and ssh-based block device support on, but bluetooth support off, create a file /etc/portage/package.use/qemu, and put in there:
Code:
app-emulation/qemu -bluetooth spice ssh


Then re-emerge app-emulation/qemu, to rebuild the package with these (additional-to-the-default) USE flag settings.

Or, if you wanted to add support for another target architecture, say 32-bit arm, edit /etc/portage/make.conf, and append:
Code:
QEMU_SOFTMMU_TARGETS="aarch64 arm"


and re-emerge. You may also want to specify some QEMU_USER_TARGETS (although that is less common); as the wiki says:
Quote:
See app-emulation/qemu for a list of possible values for QEMU_USER_TARGETS and QEMU_SOFTMMU_TARGETS.
For each target specified, a qemu executable will be built. Normally, a softmmu target will work; user targets execute user-mode code only - i.e. the goal is to execute a single ELF binary from a different architecture, rather than an entire OS.

_________________
Regards,

sakaki
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46279
Location: 56N 3W

PostPosted: Sat Apr 14, 2018 3:36 pm    Post subject: Reply with quote

gilius,

Welcome to Gentoo.

Gentoo on arm64 is a rather ambitious way to learn both Gentoo and Linux.

Gentoo is sill experimental on arm64. Lots of things just work, but nobody knows yet.
If you want to learn Gentoo, install it side by side as dual boot with Ubuntu. Then there is no time pressure to make it work.
If that's a step too far, install Gentoo as a guest in the Virtual Machine solution of your choice.

Everything you learn doing a 'standard' install will be applicable to arm64 too.
Both ways will enable you to use your desktop Gentoo install to help build for the Raspberry Pi.

Portage is the tool you use to implement your very own Linux distro. There is no need to get your distro design right at the outset, you can change it as you go and portage will morph your existing Gentoo into your new one.

As Gentoos arm64 offering is still experimental, its still rough round the edges. As Gentoo is source based, you get to compile everything for yourself too.
You can cheat a little. It is possible to share binaries for Gentoo if they fit your USE flags and other constraints.
If you want to try a BINHOST, I have a collection which includes stable, testing and some things not keyworded at all for arm64.

Code:
neddy_test1 arm64-build ~ # eix vgabios     
[I] sys-firmware/vgabios
     Available versions:  *0.6c-r1 *0.7a (~)0.7a-r1{tbz2} {binary debug}
     Installed versions:  0.7a-r1{tbz2}(16:34:14 04/14/18)(-binary -debug)
     Homepage:            http://www.nongnu.org/vgabios/
     Description:         VGA BIOS implementation


That shows that sys-firmware/vgabios installs on arm64 but I've not tried to run it yet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
gilius
n00b
n00b


Joined: 11 Apr 2018
Posts: 10

PostPosted: Sat Apr 14, 2018 3:40 pm    Post subject: Reply with quote

Cheers for the info as always!

BTW, I noticed in the wiki they are still on version 2.11, but there's now a 2.12 update available. Does that mean the Gentoo devs have to add it before we can update?

Once they add it would it then be a case of:
emerge --sync
emerge -auvDN --with-bdeps y world

Would that take care of it?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46279
Location: 56N 3W

PostPosted: Sat Apr 14, 2018 3:42 pm    Post subject: Reply with quote

Moved from Portage & Programming to Gentoo on ARM.

... and /me checks in

Merged another thread by gilius beginning with this post. Piggybacking on this post to avoid bumping the thread. --pjp
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46279
Location: 56N 3W

PostPosted: Sat Apr 14, 2018 3:49 pm    Post subject: Reply with quote

gilius,

That's correct.
Code:
emerge -auvDU --with-bdeps=y @world
may be faster because of the different scope of the -U and -N flags.

world tells Portage to emerge a package called world.
For historical reasons, that's mapped onto the @world set.
Likewise with system and @system.
The @ denotes the set namespace. Today, it doesn't matter. If a package called world were added to the repro, things would get interesting :)
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
gilius
n00b
n00b


Joined: 11 Apr 2018
Posts: 10

PostPosted: Sat Apr 14, 2018 3:49 pm    Post subject: Reply with quote

Thanks Neddy! I might try to get the 32-bit version on my phone via LinuxDeploy and play around with that. I realise my arm64 failures are not representative of Gentoo in general or at large. I am still trying to understand the concepts of Portage and "building our own Linux distro" not to mention what the "meta" part means, but I guess in a nutshell we get easy access to newer app versions with automatic updates?

Sakaki did a great job introducing us to this over at the Raspberry Pi forums... nice to have the exposure!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 46279
Location: 56N 3W

PostPosted: Sat Apr 14, 2018 3:59 pm    Post subject: Reply with quote

gilius,

Think of Gentoo like Linux From Scratch with a package manager.
Gentoo is really only Portage and the Gentoo repositiory, everything else is ${UPSTREAM}

Take a single large package, like libreoffice. The binary distros will build and package it for you but you don't get any say in how its built.
In Gentoo, you build it yourself and there are over 256ki ways to do that. That just with USE flag settings.

How long you need to wait for new packages depends on how adventurous you are.
For minor revisions, it can be enough to rename the existing ebuild. It doesn't always work but if you are in a hurry, its worth a try.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15972

PostPosted: Sat Apr 14, 2018 4:50 pm    Post subject: Reply with quote

Regarding new versions, there are a few options, all depending on how you value timeliness of availability versus your own time. If your own time is maximally valuable, you wait for someone with write access to the Gentoo repository or some other well-trusted repository to post a new ebuild. This puts the least burden on you, especially if you choose to follow the "stable" tree (meaning that you don't get the package until the maintainers are confident in it). It's also the slowest, because you're waiting for volunteers to spend their time bumping to the new version, other more adventurous users to test it, and only then do you get it. If your time is somewhat valuable, but you're willing to put a bit more effort into it, you can track "unstable". You still wait for volunteers to bump it, but you get access to it before it's had a burn-in time to let other people look for serious regressions. More adventurous still would be to track overlays, which may have looser quality standards (or not - some overlays are run by very diligent and cautious people). Finally, if timeliness is maximally valuable and your own time is minimally so, you can use a personal overlay to bump to the new ebuild as soon as upstream provides something you want. Nobody will get there before you, so quality testing is all on you, but you get it as soon as possible.

You don't need to make that decision on a tree-wide basis. Portage allows you to mix and match, so you could choose to track upstream closely for some packages (e.g. your favorite game, productivity suite, etc.), but stick with a less adventurous option for core system packages. This has its own complications, since mixtures may not be as well tested. On the other hand, it lets you avoid pulling in untested packages when the well-tested ones do everything you need. (For example, maybe you don't need the absolute latest SDL, because you only have it for games that want it, and don't particularly care when upstream adds shiny new features to it, because those features won't matter to you until the games are updated to use them.)
Back to top
View user's profile Send private message
Sakaki
Guru
Guru


Joined: 21 May 2014
Posts: 404

PostPosted: Sun Apr 15, 2018 11:55 am    Post subject: Reply with quote

gilius,

I've now added virt-manager to the set of apps maintained by the gentoo-on-rpi3-64bit weekly autobuild, and added the necessary package.accept_keywords and package.use entries to the project's custom profile.

As such, you can now emerge virt-manager on your RPi3 using binary packages (much quicker than building it from source yourself, if you haven't already done so). To install it, open a terminal, become root, then:
Code:
pi64 ~ # emaint sync --repo rpi3
pi64 ~ # rm -f /etc/portage/package.{use,accept_keywords}/virt-manager
pi64 ~ # > /etc/portage/package.accept_keywords/zzz_via_autounmask
pi64 ~ # > /etc/portage/package.use/zzz_via_autounmask
pi64 ~ # emerge -av app-emulation/virt-manager


You should find that all the packages are now binaries, so installation will take less than 15 minutes or so. Once done, ensure libvirtd is running, and is set to autostart on boot:
Code:
pi64 ~ # rc-update add libvirtd default
pi64 ~ # rc-service libvirtd start


You should now be able to launch virt-manager from the Applications -> System -> Virtual Machine Manager desktop menu!
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM 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