Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 841827 - sys-devel/clang-common-14.0.3: The source directory '/var/tmp/portage/sys-devel/clang-common-14.0.3/work/clang/utils/bash-autocomplete.sh' doesn't exist
Summary: sys-devel/clang-common-14.0.3: The source directory '/var/tmp/portage/sys-dev...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal with 1 vote (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-30 09:44 UTC by HougeLangley
Modified: 2022-04-30 13:28 UTC (History)
9 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description HougeLangley 2022-04-30 09:44:33 UTC
$ doas cat /var/tmp/portage/sys-devel/clang-common-14.0.3/temp/build.log
doas (houge@gentoo-phytium) password:
 * Package:    sys-devel/clang-common-14.0.3
 * Repository: gentoo
 * Maintainer: llvm@gentoo.org
 * USE:        arm64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
 * Unpacking from llvmorg-14.0.3.tar.gz ...
 [ ok ]
>>> Source unpacked in /var/tmp/portage/sys-devel/clang-common-14.0.3/work
 * ERROR: sys-devel/clang-common-14.0.3::gentoo failed (prepare phase):
 *   The source directory '/var/tmp/portage/sys-devel/clang-common-14.0.3/work/clang/utils/bash-autocomplete.sh' doesn't exist
 *
 * Call stack:
 *            ebuild.sh, line  770:  Called __ebuild_main 'prepare'
 *   phase-functions.sh, line 1059:  Called __dyn_prepare
 *   phase-functions.sh, line  385:  Called die
 * The specific snippet of code:
 *              die "The source directory '${S}' doesn't exist"
 *
 * If you need support, post the output of `emerge --info '=sys-devel/clang-common-14.0.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/clang-common-14.0.3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/clang-common-14.0.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/clang-common-14.0.3/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/clang-common-14.0.3/empty'
 * S: '/var/tmp/portage/sys-devel/clang-common-14.0.3/work/clang/utils/bash-autocomplete.sh'
Comment 1 MZ 2022-04-30 10:01:20 UTC
same problem.
Comment 2 Jouni Kosonen 2022-04-30 10:04:40 UTC
Ditto. It looks to me like setting S= before llvm.org_set_globals confuses things.
Comment 3 Jouni Kosonen 2022-04-30 10:09:32 UTC
(In reply to Jouni Kosonen from comment #2)
> Ditto. It looks to me like setting S= before llvm.org_set_globals confuses
> things.

Oh, right. llvm.org_set_globals clobbers it on line 195: 

> S=${WORKDIR}/${LLVM_COMPONENTS[0]}
Comment 4 Chris Faulkner 2022-04-30 11:37:56 UTC
Confirmed for me on ~amd64

Same error
Comment 5 sg313 2022-04-30 12:06:16 UTC
Same here.

The problem seems to be that LLVM_COMPONENTS is set to a file, instead of a directory:

-LLVM_COMPONENTS=( clang/utils/bash-autocomplete.sh )
+LLVM_COMPONENTS=( clang/utils )
 llvm.org_set_globals

If this is done variable S doesn't need to be set at all.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-04-30 13:23:41 UTC
I'm sorry, I somehow managed to miss this one package while testing.
Comment 7 Larry the Git Cow gentoo-dev 2022-04-30 13:28:09 UTC
The bug has been closed via the following commit(s):

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

commit e1857def3989aa506b7bb7f08dca6ddaee1cd92e
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-04-30 13:26:29 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-04-30 13:26:56 +0000

    sys-devel/clang-common: Fix S substitution
    
    Variable reordering has caused the S substitution to be overwritten
    by the eclass logic.  Rather than relying on a specific ordering,
    just update LLVM_COMPONENTS so that the default value works just fine.
    
    Closes: https://bugs.gentoo.org/841827
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-devel/clang-common/clang-common-14.0.3.ebuild      | 3 +--
 sys-devel/clang-common/clang-common-15.0.0.9999.ebuild | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)