--
You received this message because you are subscribed to the Google Groups "android-llvm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-llvm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-llvm/9f7b97ac-5eef-4311-ac13-67c259f3eaf4n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-llvm/CADCT%2BCN-q%3DEUX5RgNZ2A%2B08iP%2BJoDK0XkWJ4D8yAmTZTrYkA%2Bw%40mail.gmail.com.
I tried a local build on my upgraded Mac, and also hit a build failure, so perhaps there is something more wrong here with the r365631 build on newer Macos versions. Pirama, are you suggesting that we're using the wrong `-isysroot`? There appear to be 2 instances of this, and just looking at my Mac install, there is only that 1 .sdk directory structure available (i.e. I don't have anything for older SDKs).
Please ignore the link below to toolchain/llvm_android/base_builders.py - it's only for autoconf-based builds. LLVM's CMake adds these automatically.On Fri, Sep 3, 2021 at 1:04 PM Stephen Hines <srh...@google.com> wrote:I tried a local build on my upgraded Mac, and also hit a build failure, so perhaps there is something more wrong here with the r365631 build on newer Macos versions. Pirama, are you suggesting that we're using the wrong `-isysroot`? There appear to be 2 instances of this, and just looking at my Mac install, there is only that 1 .sdk directory structure available (i.e. I don't have anything for older SDKs).I'm saying (rather guessing) that the llvm-r365631 branch may be missing upstream LLVM changes to make it work with newer MacOS/SDK versions.
On Fri, Sep 3, 2021 at 1:08 PM Pirama Arumuga Nainar <pir...@google.com> wrote:Please ignore the link below to toolchain/llvm_android/base_builders.py - it's only for autoconf-based builds. LLVM's CMake adds these automatically.On Fri, Sep 3, 2021 at 1:04 PM Stephen Hines <srh...@google.com> wrote:I tried a local build on my upgraded Mac, and also hit a build failure, so perhaps there is something more wrong here with the r365631 build on newer Macos versions. Pirama, are you suggesting that we're using the wrong `-isysroot`? There appear to be 2 instances of this, and just looking at my Mac install, there is only that 1 .sdk directory structure available (i.e. I don't have anything for older SDKs).I'm saying (rather guessing) that the llvm-r365631 branch may be missing upstream LLVM changes to make it work with newer MacOS/SDK versions.True, I'll go peek at what's failing here for me. It's likely that Naville's errors will be similar (might just be seeing a different failure that breaks the build so far).
INFO:__main__:check_call:15:17:06 /Users/naville/Development/NDK1/llvm-toolchain/prebuilts/cmake/darwin-x86/bin/cmake -G Ninja -DCMAKE_PREFIX_PATH=/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/cmake/darwin-x86/bin -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON "-DCMAKE_SHARED_LINKER_FLAGS=-L/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/lib64 -Wl,-rpath,/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/lib64" -DLLVM_ENABLE_ASSERTIONS=OFF -DCMAKE_CXX_FLAGS=-fdebug-prefix-map=/Users/naville/Development/NDK1/llvm-toolchain= "-DCMAKE_MODULE_LINKER_FLAGS=-L/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/lib64 -Wl,-rpath,/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/lib64" -DCLANG_REPOSITORY_STRING=https://android.googlesource.com/toolchain/llvm-project -DLLVM_ENABLE_TERMINFO=OFF -DCLANG_VERSION_PATCHLEVEL=9 -DCOMPILER_RT_BUILD_XRAY=OFF -DLLVM_ENABLE_THREADS=ON -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_BUILD_TOOLS=OFF -DCMAKE_CXX_COMPILER=/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/clang++ -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_LIBCXX=ON -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_SYSROOT= -DLLVM_ENABLE_PROJECTS=clang;lld;libcxxabi;libcxx;compiler-rt -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCLANG_ENABLE_ARCMT=OFF -DLLVM_LIBDIR_SUFFIX=64 "-DCLANG_VENDOR=Android (dev based on r365631c3) " -DCMAKE_C_FLAGS=-fdebug-prefix-map=/Users/naville/Development/NDK1/llvm-toolchain= -DBUG_REPORT_URL=https://github.com/android-ndk/ndk/issues -DLLVM_BINUTILS_INCDIR=/Users/naville/Development/NDK1/llvm-toolchain/toolchain/binutils/binutils-2.27/include -DLLVM_USE_NEWPM=ON "-DCMAKE_EXE_LINKER_FLAGS=-L/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/lib64 -Wl,-rpath,/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/lib64" -DCOMPILER_RT_BUILD_LIBFUZZER=OFF -DLLVM_VERSION_PATCH=9 -DLLVM_BUILD_RUNTIME=ON -DCMAKE_INSTALL_PREFIX=/Users/naville/Development/NDK1/llvm-toolchain/out/stage1-install -DCLANG_ENABLE_STATIC_ANALYZER=OFF -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DCMAKE_C_COMPILER=/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/clang -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_ASM_FLAGS=-fdebug-prefix-map=/Users/naville/Development/NDK1/llvm-toolchain= -DLLVM_TARGETS_TO_BUILD=X86 /Users/naville/Development/NDK1/llvm-toolchain/toolchain/llvm-project/llvm
-- The C compiler identification is Clang 9.0.7
-- The CXX compiler identification is Clang 9.0.7
-- The ASM compiler identification is Clang
-- Found assembler: /Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/clang
-- Check for working C compiler: /Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/clang
-- Check for working C compiler: /Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/clang++
-- Check for working CXX compiler: /Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is enabled
-- debuginfo-tests project is disabled
-- libclc project is disabled
-- libcxx project is enabled
-- libcxxabi project is enabled
-- libunwind project is disabled
-- lld project is enabled
-- lldb project is disabled
-- llgo project is disabled
-- openmp project is disabled
-- parallel-libs project is disabled
-- polly project is disabled
-- pstl project is disabled
-- Found Z3: /usr/local/lib/libz3.dylib (found suitable version "4.8.9", minimum required is "4.7.1")
-- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
-- Performing Test CXX_COMPILER_SUPPORTS_STDLIB
-- Performing Test CXX_COMPILER_SUPPORTS_STDLIB - Success
-- Performing Test CXX_LINKER_SUPPORTS_STDLIB
-- Performing Test CXX_LINKER_SUPPORTS_STDLIB - Success
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for link.h
-- Looking for link.h - not found
-- Looking for malloc/malloc.h
-- Looking for malloc/malloc.h - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for signal.h
-- Looking for signal.h - found
-- Looking for sys/ioctl.h
-- Looking for sys/ioctl.h - found
-- Looking for sys/mman.h
-- Looking for sys/mman.h - found
-- Looking for sys/param.h
-- Looking for sys/param.h - found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for termios.h
-- Looking for termios.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - found
-- Looking for fenv.h
-- Looking for fenv.h - found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Looking for mach/mach.h
-- Looking for mach/mach.h - found
-- Looking for histedit.h
-- Looking for histedit.h - found
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Performing Test HAVE_CRASHREPORTER_INFO
-- Performing Test HAVE_CRASHREPORTER_INFO - Success
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for pthread_getspecific in pthread
-- Looking for pthread_getspecific in pthread - found
-- Looking for pthread_rwlock_init in pthread
-- Looking for pthread_rwlock_init in pthread - found
-- Looking for pthread_mutex_lock in pthread
-- Looking for pthread_mutex_lock in pthread - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - not found
-- Looking for pfm_initialize in pfm
-- Looking for pfm_initialize in pfm - not found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Looking for compress2 in z
-- Looking for compress2 in z - found
-- Looking for el_init in edit
-- Looking for el_init in edit - found
-- Found LibXml2: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libxml2.tbd (found version "2.9.4")
-- Looking for xar_open in xar
-- Looking for xar_open in xar - found
-- Looking for arc4random
-- Looking for arc4random - found
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - found
-- Looking for getpagesize
-- Looking for getpagesize - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for setrlimit
-- Looking for setrlimit - found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for futimens
-- Looking for futimens - not found
-- Looking for futimes
-- Looking for futimes - found
-- Looking for posix_fallocate
-- Looking for posix_fallocate - not found
-- Looking for lseek64
-- Looking for lseek64 - not found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - found
-- Looking for getrlimit
-- Looking for getrlimit - found
-- Looking for posix_spawn
-- Looking for posix_spawn - found
-- Looking for pread
-- Looking for pread - found
-- Looking for sbrk
-- Looking for sbrk - found
-- Looking for strerror
-- Looking for strerror - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for strerror_s
-- Looking for strerror_s - not found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for dladdr
-- Looking for dladdr - found
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Success
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Failed
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Looking for sched_getaffinity
-- Looking for sched_getaffinity - not found
-- Looking for CPU_COUNT
-- Looking for CPU_COUNT - not found
-- Looking for pthread_getname_np
-- Looking for pthread_getname_np - found
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - found
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE
-- Performing Test HAVE_STD_IS_TRIVIALLY_COPYABLE - Success
-- 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:53 (message):
Host compiler appears to require libatomic, but cannot find it.
Call Stack (most recent call first):
cmake/config-ix.cmake:343 (include)
CMakeLists.txt:617 (include)
clang++ -stdlib=libc++ -std=c++11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk test.cpp -v
```
gives us the following header search path:
```
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/local/include"
ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.5/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks (framework directory)
End of search list.
```
and if the same commands is used to invoke NDK's prebuilt clang:
```
#include "..." search starts here:
#include <...> search starts here:
/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/../include/c++/v1
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1
/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/lib64/clang/9.0.7/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/Library/Frameworks (framework directory)
End of search list.
In file included from test.cpp:1:
In file included from /Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/../include/c++/v1/atomic:551:
/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/../include/c++/v1/cstdint:152:8: error: no member named 'int8_t' in the
global namespace
using::int8_t;
~~^
/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/../include/c++/v1/cstdint:153:8: error: no member named 'int16_t' in
the global namespace
using::int16_t;
~~^
/Users/naville/Development/NDK1/llvm-toolchain/prebuilts/clang/host/darwin-x86/clang-r365631b/bin/../include/c++/v1/cstdint:154:8: error: no member named 'int32_t' in
the global namespace
using::int32_t;
~~^
```
To view this discussion on the web visit https://groups.google.com/d/msgid/android-llvm/c9061d68-d388-4e6b-a8fe-dabec3c11a2en%40googlegroups.com.