32-bit powerpc system-clang based builds of devel/llvm40 and devel/llvm50: fails via "Host compiler appears to require libatomic, but cannot find it"

Mark Millard markmi at dsl-only.net
Tue Dec 5 18:42:58 UTC 2017


[I experiment with system-clang based
buildworld and/or buildkernel based
TARGET_ARCH=powerpc64 and
TARGET_ARCH=powerpc environments.]

For TARGET_ARCH=powerpc devel/llvm40 and
devel/llvm50 get failure reports like:

-- Looking for __atomic_load_8 in atomic - not found
CMake Error at cmake/modules/CheckAtomic.cmake:74 (message):
  Host compiler appears to require libatomic, but cannot find it.
Call Stack (most recent call first):
  cmake/config-ix.cmake:307 (include)
  CMakeLists.txt:582 (include)


I had tried to avoid any need for 8-Byte atomics
(among other things) by avoiding LIT, LLD, and LLDB:

# more /usr/local/etc/poudriere.d/options/devel_llvm50/options
# This file is auto-generated by 'make config'.
# Options for llvm50-5.0.0_1
_OPTIONS_READ=llvm50-5.0.0_1
_FILE_COMPLETE_OPTIONS_LIST=CLANG DOCS EXTRAS LIT LLD LLDB
OPTIONS_FILE_SET+=CLANG
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=EXTRAS
OPTIONS_FILE_UNSET+=LIT
OPTIONS_FILE_UNSET+=LLD
OPTIONS_FILE_UNSET+=LLDB

# more /usr/local/etc/poudriere.d/options/devel_llvm40/options
# This file is auto-generated by 'make config'.
# Options for llvm40-4.0.1_1
_OPTIONS_READ=llvm40-4.0.1_1
_FILE_COMPLETE_OPTIONS_LIST=CLANG DOCS EXTRAS LIT LLD LLDB
OPTIONS_FILE_SET+=CLANG
OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=EXTRAS
OPTIONS_FILE_UNSET+=LIT
OPTIONS_FILE_UNSET+=LLD
OPTIONS_FILE_UNSET+=LLDB

For clang-based buildworld avoiding such things
prevents running into the 8-Byte atomics based
build failures:

WITH_LIBCPLUSPLUS=
WITH_BINUTILS_BOOTSTRAP=
WITH_ELFTOOLCHAIN_BOOTSTRAP=
#WITH_CLANG_BOOTSTRAP=
WITH_CLANG=
WITH_CLANG_IS_CC=
WITH_CLANG_FULL=
WITH_CLANG_EXTRAS=
WITH_LLD=
# lldb requires missing atomic 8-byte operations for powerpc (non-64)
WITHOUT_LLDB=
#
WITH_BOOT=

(Note: buildkernel currently fails.)

# clang++ --version
FreeBSD clang version 5.0.0 (tags/RELEASE_500/final 312559) (based on LLVM 5.0.0svn)
Target: powerpc-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

# uname -apKU
FreeBSD FBSDG4S 12.0-CURRENT FreeBSD 12.0-CURRENT  r326192M  powerpc powerpc 1200054 1200054

# svnlite info /usr/ports/ | grep "Re[plv]"
Relative URL: ^/head
Repository Root: https://svn.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 455204
Last Changed Rev: 455204


===
Mark Millard
markmi at dsl-only.net



More information about the freebsd-ports mailing list