Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666884 - media-sound/apulse-0.1.12-r2: multilib 64/32-bit installation fails with mv: cannot stat '/var/tmp/portage/media-sound/apulse-0.1.12-r2/image/usr/bin/apulse': No such file or directory
Summary: media-sound/apulse-0.1.12-r2: multilib 64/32-bit installation fails with mv: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Andrew Savchenko
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-23 16:47 UTC by Karl-Johan Karlsson
Modified: 2018-09-26 21:51 UTC (History)
1 user (show)

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


Attachments
build.log from failed 32+64-bit multilib build (build.log,58.06 KB, text/x-log)
2018-09-23 16:48 UTC, Karl-Johan Karlsson
Details
build.log from still failing -r3 (build.log,53.89 KB, text/x-log)
2018-09-24 13:06 UTC, Timo Ollech
Details
r3 environment (environment,125.58 KB, text/plain)
2018-09-24 22:54 UTC, Karl-Johan Karlsson
Details
emerge --info apulse (info,6.86 KB, text/plain)
2018-09-24 22:54 UTC, Karl-Johan Karlsson
Details
build.log of -r3 with MAKEOPTS="-j1" (build.log-j1,55.39 KB, application/octet-stream)
2018-09-24 22:55 UTC, Karl-Johan Karlsson
Details
apulse-0.1.12-r3.ebuild.patch (apulse-0.1.12-r3.ebuild.patch,717 bytes, patch)
2018-09-25 10:32 UTC, Andrew Savchenko
Details | Diff
Patch (apulse.patch,1.65 KB, patch)
2018-09-26 19:04 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karl-Johan Karlsson 2018-09-23 16:47:53 UTC
When building media-sound/apulse-0.1.12-r2 on an AMD64 multilib system (i.e. both x86_32 and x86_64 enabled), the install phase fails with:

 * abi_x86_32.x86: running multilib_prepare_wrappers
 * abi_x86_64.amd64: running multilib_prepare_wrappers
mv: cannot stat '/var/tmp/portage/media-sound/apulse-0.1.12-r2/image/usr/bin/apulse': No such file or directory
 * ERROR: media-sound/apulse-0.1.12-r2::gentoo failed (install phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_install
 *   environment, line 3303:  Called cmake-multilib_src_install
 *   environment, line  723:  Called multilib-minimal_src_install
 *   environment, line 2533:  Called multilib_src_install_all
 *   environment, line 2953:  Called multilib_foreach_abi 'multilib_prepare_wrappers'
 *   environment, line 2724:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib_prepare_wrappers'
 *   environment, line 2417:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib_prepare_wrappers'
 *   environment, line 2415:  Called _multilib_multibuild_wrapper 'multilib_prepare_wrappers'
 *   environment, line  581:  Called multilib_prepare_wrappers
 *   environment, line 2853:  Called die
 * The specific snippet of code:
 *           mv "${root}/${f}" "${root}/${dir}/${CHOST}-${fn}" || die;

Which is true; only the 32-bit version exists:

/var/tmp/portage/media-sound/apulse-0.1.12-r2/image/
└── usr
    ├── bin
    │   └── i686-pc-linux-gnu-apulse
    ├── lib
    │   └── apulse
    │       ├── libpulse-mainloop-glib.so -> libpulse-mainloop-glib.so.0
    │       ├── libpulse-mainloop-glib.so.0
    │       ├── libpulse-simple.so -> libpulse-simple.so.0
    │       ├── libpulse-simple.so.0
    │       ├── libpulse.so -> libpulse.so.0
    │       └── libpulse.so.0
    ├── lib64
    │   └── apulse
    │       ├── libpulse-mainloop-glib.so -> libpulse-mainloop-glib.so.0
    │       ├── libpulse-mainloop-glib.so.0
    │       ├── libpulse-simple.so -> libpulse-simple.so.0
    │       ├── libpulse-simple.so.0
    │       ├── libpulse.so -> libpulse.so.0
    │       └── libpulse.so.0
    └── share
        ├── doc
        │   └── apulse-0.1.12-r2
        │       └── README.md
        └── man
            └── man1
                └── apulse.1

If I build just the 64-bit version, by running

   env ABI_X86="64" emerge -a1 apulse

the emerge completes successfully and installs the following files:

 * Searching for apulse ...
 * Contents of media-sound/apulse-0.1.12-r2:
/usr
/usr/bin
/usr/bin/apulse -> x86_64-pc-linux-gnu-apulse
/usr/bin/x86_64-pc-linux-gnu-apulse
/usr/lib
/usr/lib/debug
/usr/lib/debug/usr
/usr/lib/debug/usr/lib64
/usr/lib/debug/usr/lib64/apulse
/usr/lib/debug/usr/lib64/apulse/libpulse-mainloop-glib.so.0.debug
/usr/lib/debug/usr/lib64/apulse/libpulse-simple.so.0.debug
/usr/lib/debug/usr/lib64/apulse/libpulse.so.0.debug
/usr/lib64
/usr/lib64/apulse
/usr/lib64/apulse/libpulse-mainloop-glib.so -> libpulse-mainloop-glib.so.0
/usr/lib64/apulse/libpulse-mainloop-glib.so.0
/usr/lib64/apulse/libpulse-simple.so -> libpulse-simple.so.0
/usr/lib64/apulse/libpulse-simple.so.0
/usr/lib64/apulse/libpulse.so -> libpulse.so.0
/usr/lib64/apulse/libpulse.so.0
/usr/share
/usr/share/doc
/usr/share/doc/apulse-0.1.12-r2
/usr/share/doc/apulse-0.1.12-r2/README.md.bz2
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/apulse.1.bz2

Reproducible: Always




Portage 2.3.49 (python 3.6.6-final-0, default/linux/amd64/17.1/hardened, gcc-8.2.0, glibc-2.27-r6, 4.18.9-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.18.9-gentoo-x86_64-Intel-R-_Core-TM-_i7-4770K_CPU_@_3.50GHz-with-gentoo-2.6
KiB Mem:    32874148 total,  13993012 free
KiB Swap:   33521660 total,  33521660 free
Timestamp of repository gentoo: Sun, 23 Sep 2018 15:00:01 +0000
Head commit of repository gentoo: 93dfe5ba210abb6c363c711847ad1e9c3963f4fc
Head commit of repository creideiki: 1996e913cdc87bcf00a87f5c5799245c62cba040

sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p3) 2.31.1
app-shells/bash:          4.4_p23::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.5.5-r1::gentoo, 3.6.6::gentoo
dev-util/cmake:           3.12.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r1::gentoo
sys-devel/gcc:            8.2.0-r2::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.17::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: --timeout=10 --ipv6
    sync-rsync-verify-max-age: 24

creideiki
    location: /usr/local/portage
    sync-type: git
    sync-uri: https://github.com/creideiki/portage
    masters: gentoo
    priority: 0

rion
    location: /var/lib/layman/rion
    sync-type: laymansync
    sync-uri: git://github.com/rion-overlay/rion-overlay.git
    masters: gentoo
    priority: 50

seden
    location: /var/lib/layman/seden
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/user/seden.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

torbrowser
    location: /var/lib/layman/torbrowser
    sync-type: laymansync
    sync-uri: git://github.com/MeisterP/torbrowser-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical --keep-going --quiet-build=n --backtrack=30 --verbose-conflicts"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--enable-new-dtags"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=10 --ipv6"
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 acl alsa amd64 bluray bzip2 crypt cups cxx dvd emacs exif ffmpeg flac gif hackrf hardened iconv idn ipv6 jpeg jpeg2k kde libtirpc mng multilib ncurses nls nptl ogg opencl opengl openmp pam pcre pdf pie png postscript qt5 readline seccomp ssl ssp svg tiff unicode vaapi vdpau vorbis vulkan wmf xattr xpm xtpax zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel" 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="braindump flow karbon kexi krita sheets stage words" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 wacom" KERNEL="linux" L10N="en en-US en-GB sv" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF AMDGPU X86" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_5 python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" RUBY_TARGETS="ruby23 ruby24 ruby25" SANE_BACKENDS="pixma hp" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" 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, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

=================================================================
                        Package Settings
=================================================================

media-sound/apulse-0.1.12-r2::gentoo was built with the following:
USE="-debug -sdk -test" ABI_X86="-32 (64) (-x32)"
Comment 1 Karl-Johan Karlsson 2018-09-23 16:48:35 UTC
Created attachment 547652 [details]
build.log from failed 32+64-bit multilib build
Comment 2 Timo Ollech 2018-09-23 18:15:30 UTC
Could it have to do with this message:

 * The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR.
 * Please migrate the ebuild to use the new one.

?
Comment 3 Andrew Savchenko gentoo-dev 2018-09-23 18:40:16 UTC
(In reply to Timo Ollech from comment #2)
> Could it have to do with this message:
> 
>  * The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR.
>  * Please migrate the ebuild to use the new one.
> 
> ?

No, it comes from eclass and was there before. I made a mistake with apulse wrapper handling, will fix it later.
Comment 4 Larry the Git Cow gentoo-dev 2018-09-24 10:29:25 UTC
The bug has been closed via the following commit(s):

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

commit c8e88da1b0ab4577de6ac18abc9e173ed6071e0e
Author:     Andrew Savchenko <bircoph@gentoo.org>
AuthorDate: 2018-09-24 10:28:22 +0000
Commit:     Andrew Savchenko <bircoph@gentoo.org>
CommitDate: 2018-09-24 10:28:22 +0000

    media-sound/apulse: fix the wrapper generation.
    
    - Fix the apulse wrapper generation.
    - Fix library paths inside apulse wrapper.
    - Fix typo in libpulse-simple.pc libdir.
    
    Closes: https://bugs.gentoo.org/666884
    Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
    Package-Manager: Portage-2.3.49, Repoman-2.3.10

 ...lse-0.1.12-r2.ebuild => apulse-0.1.12-r3.ebuild} | 10 ++++++----
 media-sound/apulse/files/sdk.patch                  | 21 +++++++++++----------
 2 files changed, 17 insertions(+), 14 deletions(-)
Comment 5 Timo Ollech 2018-09-24 12:39:47 UTC
Still exactly the same problem here with apulse-0.1.12-r3!?!
Comment 6 Timo Ollech 2018-09-24 12:50:08 UTC
Well, maybe not *exactly* the same, but this:

>>> Install apulse-0.1.12-r3 into /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/ category media-sound
 * abi_x86_32.x86: running multilib-minimal_abi_src_install
>>> Working in BUILD_DIR: "/var/tmp/portage/media-sound/apulse-0.1.12-r3/work/apulse-0.1.12-abi_x86_32.x86"
make -j5 install 
[  9%] Built target trace-helper
[ 18%] Built target pulse-simple
[ 27%] Built target pulse-mainloop-glib
[100%] Built target pulse
Install the project...
-- Install configuration: "Gentoo"
-- Installing: /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/lib32/apulse/libpulse-simple.so.0
-- Installing: /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/lib32/apulse/libpulse-simple.so
-- Installing: /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/lib32/apulse/libpulse.so.0
-- Installing: /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/lib32/apulse/libpulse.so
-- Installing: /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/lib32/apulse/libpulse-mainloop-glib.so.0
-- Installing: /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/lib32/apulse/libpulse-mainloop-glib.so
-- Installing: /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse
-- Installing: /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/share/man/man1/apulse.1
mv: cannot stat '/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse': No such file or directory
Comment 7 Timo Ollech 2018-09-24 13:06:23 UTC
Created attachment 547770 [details]
build.log from still failing -r3
Comment 8 Karl-Johan Karlsson 2018-09-24 13:45:27 UTC
I get the same error as Timo with -r3.
Comment 9 Andrew Savchenko gentoo-dev 2018-09-24 20:52:39 UTC
Strange, I can't reproduce it with -r3 and ABI_x86="32 64".

Could you please provide emerge --info and environment file?
Comment 10 Andrew Savchenko gentoo-dev 2018-09-24 20:57:55 UTC
Also I see the following in your log:

-- Installing: /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse
-- Installing: /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/share/man/man1/apulse.1
mv: cannot stat '/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse': No such file or directory

That's odd. Can you try with -j1 in MAKEOPTS?
Comment 11 Karl-Johan Karlsson 2018-09-24 22:54:16 UTC
Created attachment 547842 [details]
r3 environment
Comment 12 Karl-Johan Karlsson 2018-09-24 22:54:47 UTC
Created attachment 547844 [details]
emerge --info apulse
Comment 13 Karl-Johan Karlsson 2018-09-24 22:55:35 UTC
Created attachment 547846 [details]
build.log of -r3 with MAKEOPTS="-j1"

It fails the same way with MAKEOPTS="-j1".
Comment 14 Karl-Johan Karlsson 2018-09-24 23:07:37 UTC
(In reply to Andrew Savchenko from comment #10)
> -- Installing:
> /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse
> -- Installing:
> /var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/share/man/man1/
> apulse.1
> mv: cannot stat
> '/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse': No
> such file or directory
> 
> That's odd. Can you try with -j1 in MAKEOPTS?

Hmm. I ran it under strace, and it looks like it tries to do the rename twice:

root@luna tmp # grep /usr/bin/apulse /tmp/apulse.strace | tail -n 7
[pid  5180] chmod("/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse", 0755) = 0
[pid  5106] lstat("/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse", {st_mode=S_IFREG|0755, st_size=116, ...}) = 0
[pid  5190] renameat2(AT_FDCWD, "/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse", AT_FDCWD, "/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/i686-pc-linux-gnu-apulse", RENAME_NOREPLACE) = 0
[pid  5106] lstat("/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse", 0x7ffc477cad10) = -1 ENOENT (No such file or directory)
[pid  5195] renameat2(AT_FDCWD, "/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse", AT_FDCWD, "/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/i686-pc-linux-gnu-apulse", RENAME_NOREPLACE) = -1 ENOENT (No such file or directory)
[pid  5195] lstat("/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse", 0x7ffd69511d00) = -1 ENOENT (No such file or directory)
mv: cannot stat '/var/tmp/portage/media-sound/apulse-0.1.12-r3/image/usr/bin/apulse': No such file or directory

The "-e trace=file" log is 93MB, so I'm reluctant to upload it here, but let me know if and how you want that or even more logging.
Comment 15 Andrew Savchenko gentoo-dev 2018-09-25 10:32:11 UTC
Created attachment 547862 [details, diff]
apulse-0.1.12-r3.ebuild.patch

Thanks for the info.

We have different bash versions and looks like they have a bit different behaviour in env sanitation: eclasses does not clear all variables themselves, so subsequent call of inner function is unreliable.

Please try attached patch, I'm not pushing it right now in the tree despite it works for me since it may or may not work for you.
Comment 16 Karl-Johan Karlsson 2018-09-25 12:26:56 UTC
(In reply to Andrew Savchenko from comment #15)
> Please try attached patch, I'm not pushing it right now in the tree despite
> it works for me since it may or may not work for you.

Creating -r4 with that patch makes apulse emerge successfully for me.

However, the only application I use it with is Tor Browser, and that doesn't work currently for unrelated reasons, so I can't test the functionality of apulse right now.
Comment 17 Andrew Savchenko gentoo-dev 2018-09-25 14:13:13 UTC
Thanks for testing.

Wrapper installation issue should not affect run-time execution (if wrapper is present).
Comment 18 Larry the Git Cow gentoo-dev 2018-09-25 14:26:02 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78bff4dfac8ced74932a4311400b359d307b306d

commit 78bff4dfac8ced74932a4311400b359d307b306d
Author:     Andrew Savchenko <bircoph@gentoo.org>
AuthorDate: 2018-09-25 14:24:00 +0000
Commit:     Andrew Savchenko <bircoph@gentoo.org>
CommitDate: 2018-09-25 14:25:51 +0000

    media-sound/apulse: fix wrapper installation on multilib setups
    
    Wrapper installation was broken on multilib setups with newest bash
    versions. In order to avoid environment driven eclass problems
    manual installation of required wrappers is added.
    
    Thanks  Karl-Johan Karlsson (creideiki+gentoo-bugzilla_lysator.liu.se)
    for detailed reporting and testing.
    
    Closes: https://bugs.gentoo.org/666884
    Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
    Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../{apulse-0.1.12-r3.ebuild => apulse-0.1.12-r4.ebuild}  | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
Comment 19 Timo Ollech 2018-09-25 19:55:36 UTC
Yep, that fixed it. Thx!
Comment 20 Arfrever Frehtes Taifersar Arahesis 2018-09-25 21:26:29 UTC
> -multilib_src_install() {
> +multilib_src_install_all() {
>  	cmake-utils_src_install
> +	# The easiest way would be setting MULTILIB_CHOST_TOOLS at global scope, depending
> +	# on USE=sdk, but this is no longer permitted, so workaround is required.
> +	# See bug 666884 for details.
>  	if ! use sdk; then
> -		export MULTILIB_CHOST_TOOLS=( /usr/bin/apulse )

Can you not just set MULTILIB_CHOST_TOOLS in a function above multilib-specific functions, e.g. pkg_setup()?
(And 'export' is not needed.)

pkg_setup() {
 	if ! use sdk; then
		MULTILIB_CHOST_TOOLS=( /usr/bin/apulse )
	fi
}
Comment 21 Andrew Savchenko gentoo-dev 2018-09-26 07:22:26 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #20)

The code you quote is no longer present in tree. However, the issue is fixed differently.
Comment 22 Arfrever Frehtes Taifersar Arahesis 2018-09-26 18:58:20 UTC
I quoted the last commit in this package and there were no later commits in this package.

Your code is overcomplicated and partially broken.

'make install' (through cmake-utils_src_install()) is called ${number_of_ABIs} + 1 times:
  2 times when ABI_X86="64" is used.
  3 times when ABI_X86="32 64" is used.

multilib_src_install() is defined in cmake-multilib.eclass (inherited in this package):
multilib_src_install() {
        cmake-utils_src_install "${_cmake_args[@]}"
}
And your custom multilib_src_install_all() also calls cmake-utils_src_install().
Comment 23 Arfrever Frehtes Taifersar Arahesis 2018-09-26 19:04:47 UTC
Created attachment 547986 [details, diff]
Patch

This patch was tested with all combinations:
  ABI_X86="64" USE="-sdk"
  ABI_X86="64" USE="sdk"
  ABI_X86="32 64" USE="-sdk"
  ABI_X86="32 64" USE="sdk"
(In each combination, ${ED}/usr/bin has the same content as without this patch.)


Additionally this patch avoids this warning:
 * The CMAKE_BUILD_DIR variable has been renamed to BUILD_DIR.
 * Please migrate the ebuild to use the new one.
Comment 24 Andrew Savchenko gentoo-dev 2018-09-26 21:51:44 UTC
1. The code in tree works and you have not proven otherwise. Apulse now installs and works fine.

2. Please stop abusing bugzilla, as the bug originally reported was fixed. If you have another issue, please open another bug.