Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 763018 - sys-devel/llvm-11.0.0: Host compiler appears to require libatomic, but cannot find it (macOS Big Sur, Clang bootstrap)
Summary: sys-devel/llvm-11.0.0: Host compiler appears to require libatomic, but cannot...
Status: CONFIRMED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-02 03:58 UTC by Sam James
Modified: 2021-01-02 09:52 UTC (History)
1 user (show)

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


Attachments
build.log (file_763018.txt,12.84 KB, text/plain)
2021-01-02 03:58 UTC, Sam James
Details
CMakeOutput.log (file_763018.txt,68.93 KB, text/plain)
2021-01-02 03:59 UTC, Sam James
Details
CMakeError.log (file_763018.txt,17.68 KB, text/plain)
2021-01-02 03:59 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-02 03:58:46 UTC
Created attachment 680578 [details]
build.log

-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE - Failed
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Failed
-- Looking for __atomic_fetch_add_4 in atomic
-- Looking for __atomic_fetch_add_4 in atomic - not found
CMake Error at cmake/modules/CheckAtomic.cmake:58 (message):
  Host compiler appears to require libatomic, but cannot find it.
Call Stack (most recent call first):
  cmake/config-ix.cmake:350 (include)
  CMakeLists.txt:655 (include)


-- Configuring incomplete, errors occurred!
See also "/Users/sam/prefix/var/tmp/portage/sys-devel/llvm-11.0.0/work/llvm-11.0.0_build-abi_x86_64.amd64/CMakeFiles/CMakeOutput.log".
See also "/Users/sam/prefix/var/tmp/portage/sys-devel/llvm-11.0.0/work/llvm-11.0.0_build-abi_x86_64.amd64/CMakeFiles/CMakeError.log".
 * ERROR: sys-devel/llvm-11.0.0::gentoo_prefix failed (configure phase):
 *   cmake failed
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-02 03:59:05 UTC
Created attachment 680581 [details]
CMakeOutput.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-02 03:59:22 UTC
Created attachment 680584 [details]
CMakeError.log
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-01-02 09:33:12 UTC
Oh, Fabian already noted this: https://bugs.gentoo.org/758167#c51.
Comment 4 Fabian Groffen gentoo-dev 2021-01-02 09:52:51 UTC
Yes, but a bug is actually good, since this is x86_64 and not arm64.

So, my thinking was, one needs compiler_rt.

Next is, that compiler_rt needs to be explicitly enabled (with cflags) or it needs built into libcxx/-abi.  The latter makes more sense, else we'd have to patch a lot of packages.  So I tried doing that but it seems clang cannot find compiler_rt.

Reason for that is twofold: it seems Clang (also Apple's host Clang) is configured with -print-path to point to a different directory (darwin20.20.0 iso darwin), but perhaps this is just a decoy since it's some gcc emulation code.
Second, it appears to look for compiler_rt.builtins.<arch>, which I don't have.  I only have osx.a or something.