Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 684902 - =app-emulation/qemu-4.0 USE=systemtap - src_install(): /usr/bin/install: cannot create directory ‘/var/tmp/portage/app-emulation/qemu-4.0.0/image/usr/bin’: File exists
Summary: =app-emulation/qemu-4.0 USE=systemtap - src_install(): /usr/bin/install: cann...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-01 23:12 UTC by Paul
Modified: 2019-05-23 08:36 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (build.log.xz,44.20 KB, application/x-xz)
2019-05-01 23:13 UTC, Paul
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul 2019-05-01 23:12:35 UTC
I had repeatable failures when trying to build =qemu-4.0 if +systemtap USE was set. This is a dependency of libguestfs which is what required my setting that flag.


build.log is attached, however it looks like their is 

`install -c -m 0755 "scripts/qemu-trace-stap" /var/tmp/portage/app-emulation/qemu-4.0.0/image/usr/bin`

that happens before 

`install -d -m 0755 "/var/tmp/portage/app-emulation/qemu-4.0.0/image/usr/bin"`

which prevents the directory from being created "cannot create directory .... File exists"

I have successfully installed the build with USE="-systemtap", but had to uninstall libguestfs.


Thanks all
Comment 1 Paul 2019-05-01 23:13:42 UTC
Created attachment 574918 [details]
build.log.xz
Comment 2 Ralf Ramsauer 2019-05-07 14:35:20 UTC
I can confirm this.

My targets are:

QEMU_SOFTMMU_TARGETS="aarch64 alpha arm i386 x86_64 mips mips64 mipsel ppc"
QEMU_USER_TARGETS="aarch64 alpha arm i386 x86_64 mips mips64 mipsel ppc"

If I uncomment them and only build for x86, then it works fine. So this seems to be somehow related to the target list.
Comment 3 Greg Turner 2019-05-08 16:38:14 UTC
make: *** [Makefile:812: install] Error 1
 * ERROR: app-emulation/qemu-4.0.0::gentoo failed (install phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-4.0.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-4.0.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-emulation/qemu-4.0.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qemu-4.0.0/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qemu-4.0.0/work/qemu-4.0.0/user-build'
 * S: '/var/tmp/portage/app-emulation/qemu-4.0.0/work/qemu-4.0.0'
spenciver ~ # file /var/tmp/portage/app-emulation/qemu-4.0.0/image/usr/bin
/var/tmp/portage/app-emulation/qemu-4.0.0/image/usr/bin: Python script, ASCII text executable
spenciver ~ # head -n 20 /var/tmp/portage/app-emulation/qemu-4.0.0/image/usr/bin
#!/usr/bin/python
# -*- python -*-
#
# Copyright (C) 2019 Red Hat, Inc
#
# QEMU SystemTap Trace Tool
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.

spenciver ~ #
Comment 4 Greg Turner 2019-05-08 16:43:14 UTC
... which confirms the etiology Pail proposed in the bug description.
Comment 5 Greg Turner 2019-05-08 16:43:52 UTC
Ug, sorry, Paul, not Pail of course, sorry, no coffee yet :)
Comment 6 hangglider 2019-05-17 11:38:22 UTC
--- Makefile.orig       2019-05-17 13:34:53.336587591 +0200
+++ Makefile    2019-05-17 13:35:17.512707474 +0200
@@ -802,6 +802,7 @@
        $(call install-prog,$(HELPERS-y),$(DESTDIR)$(libexecdir))
 endif
 ifdef CONFIG_TRACE_SYSTEMTAP
+       mkdir -p $(DESTDIR)$(bindir)
        $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir)
 endif
 ifneq ($(BLOBS),)
Comment 7 hangglider 2019-05-17 12:43:58 UTC
works for *-r1 and *-r2 too.
Comment 8 devsk 2019-05-19 01:57:03 UTC
r2 still fails with same errors. Was it supposed to fix this issue?
Comment 9 Matthias Maier gentoo-dev 2019-05-19 21:47:08 UTC
Neither -r1 nor -r2 were related to this bug report.
Comment 10 Larry the Git Cow gentoo-dev 2019-05-19 23:42:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=490c1bdd567d908b15ce7a825b4cab6e50a0bba5

commit 490c1bdd567d908b15ce7a825b4cab6e50a0bba5
Author:     Matthias Maier <tamiko@gentoo.org>
AuthorDate: 2019-05-19 21:57:57 +0000
Commit:     Matthias Maier <tamiko@gentoo.org>
CommitDate: 2019-05-19 23:42:11 +0000

    app-emulation/qemu: ensure directory is created
    
    Closes: https://bugs.gentoo.org/684902
    Package-Manager: Portage-2.3.66, Repoman-2.3.12
    Signed-off-by: Matthias Maier <tamiko@gentoo.org>

 app-emulation/qemu/files/qemu-4.0.0-mkdir_systemtap.patch | 12 ++++++++++++
 app-emulation/qemu/qemu-4.0.0-r3.ebuild                   |  1 +
 app-emulation/qemu/qemu-9999.ebuild                       |  1 +
 3 files changed, 14 insertions(+)
Comment 11 devsk 2019-05-20 18:33:40 UTC
Still failing...

```
make[1]: Leaving directory '/var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/user-build/i386-linux-user'
install -c -m 0755 "scripts/qemu-trace-stap" /var/tmp/portage/app-emulation/qemu-4.0.0-r3/image/usr/bin
for s in 16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512; do \
        mkdir -p "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image//usr/share/icons/hicolor/${s}/apps"; \
        install -c -m 0644 /var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/ui/icons/qemu_${s}.png \
                "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image//usr/share/icons/hicolor/${s}/apps/qemu.png"; \
done; \
mkdir -p "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image//usr/share/icons/hicolor/32x32/apps"; \
install -c -m 0644 /var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/ui/icons/qemu_32x32.bmp \
        "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image//usr/share/icons/hicolor/32x32/apps/qemu.bmp"; \
mkdir -p "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image//usr/share/icons/hicolor/scalable/apps"; \
install -c -m 0644 /var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/ui/icons/qemu.svg \
        "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image//usr/share/icons/hicolor/scalable/apps/qemu.svg"
mkdir -p "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image//usr/share/applications"
install -c -m 0644 /var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/ui/qemu.desktop \
        "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image//usr/share/applications/qemu.desktop"
install -d -m 0755 "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image/usr/share/qemu/keymaps"
set -e; for x in da     en-gb  et  fr     fr-ch  is  lt  no  pt-br  sv ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th de-ch  es     fo  fr-ca  hu     ja  mk  pt  sl     tr bepo    cz; do \
        install -c -m 0644 /var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/pc-bios/keymaps/$x "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image/usr/share/qemu/keymaps"; \
done
install -c -m 0644 /var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/user-build/trace-events-all "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image/usr/share/qemu/trace-events-all"
for d in i386-linux-user x86_64-linux-user; do \
make  BUILD_DIR=/var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/user-build TARGET_DIR=$d/ -C $d install || exit 1 ; \
        done
make[1]: Entering directory '/var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/user-build/i386-linux-user'
install -d -m 0755 "/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image/usr/bin"
/usr/bin/install: cannot create directory '/var/tmp/portage/app-emulation/qemu-4.0.0-r3/image/usr/bin': File exists
make[1]: *** [Makefile:230: install] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/user-build/i386-linux-user'
make: *** [Makefile:813: install] Error 1
 * ERROR: app-emulation/qemu-4.0.0-r3::gentoo failed (install phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/qemu-4.0.0-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/qemu-4.0.0-r3::gentoo'`.
 * The complete build log is located at '/usr/portage/local/log/app-emulation:qemu-4.0.0-r3:20190520-053519.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-emulation/qemu-4.0.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/qemu-4.0.0-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0/user-build'
 * S: '/var/tmp/portage/app-emulation/qemu-4.0.0-r3/work/qemu-4.0.0'
 * 
 * The following package has failed to build, install, or execute postinst:
 * 
 *  (app-emulation/qemu-4.0.0-r3:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/usr/portage/local/log/app-emulation:qemu-4.0.0-r3:20190520-053519.log'
```
Comment 12 Matthias Maier gentoo-dev 2019-05-20 18:52:15 UTC
See https://bugs.gentoo.org/686370
Does this fix the problem? (You might have to wait a bit for the revised patch to be rotated to the rsync servers.)
Comment 13 Paul 2019-05-23 08:36:55 UTC
It looks to successfully build now, -r3 . Thank you to everyone that helped on this one. I appreciate it.