Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939816 - sys-devel/clang-19.1.0_rc2 fails configure in EPREFIX due to usage of deprecated GCC_INSTALL_PREFIX
Summary: sys-devel/clang-19.1.0_rc2 fails configure in EPREFIX due to usage of depreca...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 939841 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-18 14:01 UTC by Jens Lindenmeier
Modified: 2024-09-30 05:26 UTC (History)
4 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 Jens Lindenmeier 2024-09-18 14:01:18 UTC
I have a EPREFIX installation and starting with ckang 19.1.x, configure of emerge fails with:
[...]
-- Looking for dlopen in dl - found
-- Looking for dladdr
-- Looking for dladdr - found
CMake Error at CMakeLists.txt:211 (message):
  GCC_INSTALL_PREFIX is deprecated and will be removed.  Use configuration
  files (https://clang.llvm.org/docs/UsersManual.html#configuration-files)to
  specify the default --gcc-install-dir= or --gcc-triple=.  --gcc-toolchain=
  is discouraged.  See https://github.com/llvm/llvm-project/pull/77537 for
  detail.


This is due to the usage of GCC_INSTALL_PREFIX in sys-devel/clang/clang-19.1.0_rc4.ebuild:

    if [[ -n ${EPREFIX} ]]; then
        mycmakeargs+=(
            -DGCC_INSTALL_PREFIX="${EPREFIX}/usr"
        )
    fi


Stop gap solution for is to use:
    if [[ -n ${EPREFIX} ]]; then
        mycmakeargs+=(
            -DGCC_INSTALL_PREFIX="${EPREFIX}/usr" -DUSE_DEPRECATED_GCC_INSTALL_PREFIX=1
        )
    fi


This emerges fine for, but I understand clang will remove support soon entirely, maybe a better solution needs to be found.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-18 14:04:30 UTC
We actually should have --gcc-install-dir already setup so we might be able to drop it entirely.
Comment 2 Jens Lindenmeier 2024-09-18 14:09:11 UTC
Sure, this was the solution I was looking for.
Let me know when I can test it. Is there another bug report open for it?
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-19 07:30:59 UTC
*** Bug 939841 has been marked as a duplicate of this bug. ***
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-19 07:31:22 UTC
You should be able to just delete that if block you pasted.
Comment 5 Jens Lindenmeier 2024-09-19 08:34:32 UTC
Just upgraded to sys-devel/clang-runtime-19.1.0 and removed the statement before.
I can confirm that it works without the statement, it should be removed.
Comment 6 Larry the Git Cow gentoo-dev 2024-09-30 05:26:52 UTC
The bug has been closed via the following commit(s):

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

commit fe0050ea40377dcc2283d287e5ec57cb729b0ea4
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-30 05:25:39 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-30 05:25:39 +0000

    sys-devel/clang: stop setting GCC_INSTALL_PREFIX for prefix
    
    Clang 19 deprecates the GCC_INSTALL_PREFIX CMake option.
    
    We now handle this via config files installed by gcc-config. If there's
    any remaining issues for Prefix, it should be handled over there
    or in sys-devel/clang-common.
    
    Closes: https://bugs.gentoo.org/939816
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/clang/clang-19.1.0.ebuild             | 6 ------
 sys-devel/clang/clang-20.0.0.9999.ebuild        | 6 ------
 sys-devel/clang/clang-20.0.0_pre20240917.ebuild | 6 ------
 sys-devel/clang/clang-20.0.0_pre20240924.ebuild | 6 ------
 4 files changed, 24 deletions(-)