Closed
Description
Previous ID | SR-1409 |
Radar | None |
Original Reporter | @colemancda |
Type | Bug |
Status | Closed |
Resolution | Done |
Environment
Ubuntu 15.10 x86_64, Macbook Pro 5,5 (Not VM)
Additional Detail from JIRA
Votes | 1 |
Component/s | Compiler |
Labels | Bug, Android |
Assignee | None |
Priority | Medium |
md5: f46de962380b729a1479852bbb931adb
Issue Description:
I get fatal error: 'unicode/ustring.h' file not found
when compiling for Android. I have downloaded the prebuilt ICU binaries, as well as compiled them myself, and it makes no difference. As you can see from the build command below, I put all my dependencies in my home folder to make the compilation simple.
coleman@coleman-ubuntu: ./utils/build-script -R --android --android-ndk ~/android-ndk-r11c --android-api-level 21 --android-icu-uc ~/libicu-android/armeabi-v7a --android-icu-uc-include ~/libicu-android/armeabi-v7a/icu/source/common --android-icu-i18n ~/libicu-android/armeabi-v7a --android-icu-i18n-include ~/libicu-android/armeabi-v7a/icu/source/i18n
Building the standard library for: swift-test-stdlib-linux-x86_64 swift-test-stdlib-android-armv7
cmark: using standard linker
++ cmake_config_opt cmark
++ product=cmark
++ [[ Ninja == \X\c\o\d\e ]]
+ /usr/bin/cmake --build /home/coleman/build/Ninja-ReleaseAssert/cmark-linux-x86_64 -- -j2 all
ninja: no work to do.
llvm: using standard linker
++ cmake_config_opt llvm
++ product=llvm
++ [[ Ninja == \X\c\o\d\e ]]
+ /usr/bin/cmake --build /home/coleman/build/Ninja-ReleaseAssert/llvm-linux-x86_64 -- -j2 all
ninja: no work to do.
++ uname -s
+ [[ Linux == \D\a\r\w\i\n ]]
+ HOST_CXX_HEADERS_DIR=/usr/include/c++
+ BUILT_CXX_INCLUDE_DIR=/home/coleman/build/Ninja-ReleaseAssert/llvm-linux-x86_64/include
+ echo 'symlinking the system headers (/usr/include/c++) into the local clang build directory (/home/coleman/build/Ninja-ReleaseAssert/llvm-linux-x86_64/include).'
symlinking the system headers (/usr/include/c++) into the local clang build directory (/home/coleman/build/Ninja-ReleaseAssert/llvm-linux-x86_64/include).
+ ln -s -f /usr/include/c++ /home/coleman/build/Ninja-ReleaseAssert/llvm-linux-x86_64/include
swift: using standard linker
++ cmake_config_opt swift
++ product=swift
++ [[ Ninja == \X\c\o\d\e ]]
+ /usr/bin/cmake --build /home/coleman/build/Ninja-ReleaseAssert/swift-linux-x86_64 -- -j2 all swift-test-stdlib-linux-x86_64 swift-test-stdlib-android-armv7
[1/1] Re-running CMake...
-- Found LLVM_CONFIG as /home/coleman/build/Ninja-ReleaseAssert/llvm-linux-x86_64/bin/llvm-config
-- Building with -fPIC
-- Linux SDK:
-- Path: /
-- Version: don't use
-- Build number: don't use
-- Deployment version: don't use
-- Library subdir: linux
-- Version min name:
-- Triple name: linux
-- Architectures: x86_64
-- Triple for x86_64 is x86_64-unknown-linux-gnu
--
-- Android SDK:
-- Path: /
-- Version: don't use
-- Build number: don't use
-- Deployment version: don't use
-- Library subdir: android
-- Version min name:
-- Triple name: android
-- Architectures: armv7
-- Triple for armv7 is armv7-none-linux-androideabi
--
-- Building host Swift tools for LINUX x86_64
-- Build type: Release
-- Assertions: TRUE
-- LTO: FALSE
--
-- Building Swift standard library and SDK overlays for SDKs: LINUX;ANDROID
-- Build type: Release
-- Assertions: TRUE
--
-- Building Swift runtime with:
-- Leak Detection Checker Entrypoints: FALSE
--
-- Swift version: 3.0
-- Swift vendor:
-- Swift compiler version:
-- Embedded clang compiler version:
CMake Warning at stdlib/CMakeLists.txt:5 (message):
Building the swift runtime using the host compiler, and not the just-built
clang.
CMake Warning at docs/CMakeLists.txt:24 (message):
Unable to find sphinx-build program. Not building docs
CMake Warning at docs/CMakeLists.txt:130 (message):
LitRe not found; code examples won't be tested.
-- Configuring done
CMake Warning (dev) at cmake/modules/AddSwift.cmake:1569 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
The dependency target "/usr/lib/x86_64-linux-gnu/libicui18n.so-linux" of
target "swiftStdlibStubs-linux-x86_64" does not exist.
Call Stack (most recent call first):
stdlib/public/stubs/CMakeLists.txt:22 (add_swift_library)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at cmake/modules/AddSwift.cmake:1569 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
The dependency target "/usr/lib/x86_64-linux-gnu/libicuuc.so-linux" of
target "swiftStdlibStubs-linux-x86_64" does not exist.
Call Stack (most recent call first):
stdlib/public/stubs/CMakeLists.txt:22 (add_swift_library)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at cmake/modules/AddSwift.cmake:1569 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
The dependency target "/usr/lib/x86_64-linux-gnu/libicui18n.so-android" of
target "swiftStdlibStubs-android-armv7" does not exist.
Call Stack (most recent call first):
stdlib/public/stubs/CMakeLists.txt:22 (add_swift_library)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at cmake/modules/AddSwift.cmake:1569 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
The dependency target "/usr/lib/x86_64-linux-gnu/libicuuc.so-android" of
target "swiftStdlibStubs-android-armv7" does not exist.
Call Stack (most recent call first):
stdlib/public/stubs/CMakeLists.txt:22 (add_swift_library)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
-- Build files have been written to: /home/coleman/build/Ninja-ReleaseAssert/swift-linux-x86_64
[471/684] Building CXX object stdlib/p...ime-android-armv7.dir/HeapObject.cpp.o
/home/coleman/swift/stdlib/public/runtime/HeapObject.cpp:228:43: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<MetadataCache<BoxCacheEntry>> Boxes;
^~~~~
1 warning generated.
[473/684] Building CXX object stdlib/p...ntime-android-armv7.dir/Metadata.cpp.o
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:315:49: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<MetadataCache<ObjCClassCacheEntry>> ObjCClassWrappers;
^~~~~~~~~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:381:48: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<MetadataCache<FunctionCacheEntry>> FunctionTypes;
^~~~~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:532:45: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<MetadataCache<TupleCacheEntry>> TupleTypes;
^~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:1804:48: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<MetadataCache<MetatypeCacheEntry>> MetatypeTypes;
^~~~~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:1871:39: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<ExistentialMetatypeState> ExistentialMetatypes;
^~~~~~~~~~~~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:1996:35: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<ExistentialTypeState> Existentials;
^~~~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:2410:31: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<ForeignTypeState> ForeignTypes;
^~~~~~~~~~~~
7 warnings generated.
[475/684] Building CXX object stdlib/p...android-armv7.dir/MetadataLookup.cpp.o
/home/coleman/swift/stdlib/public/runtime/MetadataLookup.cpp:125:32: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<TypeMetadataState> TypeMetadataRecords;
^~~~~~~~~~~~~~~~~~~
1 warning generated.
[478/684] Building CXX object stdlib/p...id-armv7.dir/ProtocolConformance.cpp.o
/home/coleman/swift/stdlib/public/runtime/ProtocolConformance.cpp:287:31: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<ConformanceState> Conformances;
^~~~~~~~~~~~
1 warning generated.
[489/684] Building CXX object stdlib/p...time-linux-x86_64.dir/HeapObject.cpp.o
/home/coleman/swift/stdlib/public/runtime/HeapObject.cpp:228:43: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<MetadataCache<BoxCacheEntry>> Boxes;
^~~~~
1 warning generated.
[491/684] Building CXX object stdlib/p...-linux-x86_64.dir/MetadataLookup.cpp.o
/home/coleman/swift/stdlib/public/runtime/MetadataLookup.cpp:125:32: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<TypeMetadataState> TypeMetadataRecords;
^~~~~~~~~~~~~~~~~~~
1 warning generated.
[495/684] Building CXX object stdlib/p...untime-linux-x86_64.dir/Metadata.cpp.o
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:315:49: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<MetadataCache<ObjCClassCacheEntry>> ObjCClassWrappers;
^~~~~~~~~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:381:48: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<MetadataCache<FunctionCacheEntry>> FunctionTypes;
^~~~~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:532:45: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<MetadataCache<TupleCacheEntry>> TupleTypes;
^~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:1804:48: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<MetadataCache<MetatypeCacheEntry>> MetatypeTypes;
^~~~~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:1871:39: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<ExistentialMetatypeState> ExistentialMetatypes;
^~~~~~~~~~~~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:1996:35: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<ExistentialTypeState> Existentials;
^~~~~~~~~~~~
/home/coleman/swift/stdlib/public/runtime/Metadata.cpp:2410:31: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<ForeignTypeState> ForeignTypes;
^~~~~~~~~~~~
7 warnings generated.
[496/684] Building CXX object stdlib/p...x-x86_64.dir/ProtocolConformance.cpp.o
/home/coleman/swift/stdlib/public/runtime/ProtocolConformance.cpp:287:31: warning: declaration requires a global constructor [-Wglobal-constructors]
static Lazy<ConformanceState> Conformances;
^~~~~~~~~~~~
1 warning generated.
[517/684] Building CXX object stdlib/p...d-armv7.dir/UnicodeNormalization.cpp.o
FAILED: /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-stack-protector -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Werror=date-time -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -Wdocumentation -Wimplicit-fallthrough -Wunreachable-code -Woverloaded-virtual -O3 -Istdlib/public/stubs -I/home/coleman/swift/stdlib/public/stubs -I/home/coleman/swift/include -Iinclude -I/home/coleman/build/Ninja-ReleaseAssert/llvm-linux-x86_64/include -I/home/coleman/llvm/include -I/home/coleman/build/Ninja-ReleaseAssert/llvm-linux-x86_64/tools/clang/include -I/home/coleman/llvm/tools/clang/include -I/home/coleman/cmark/src -I/home/coleman/build/Ninja-ReleaseAssert/cmark-linux-x86_64/src -I/home/coleman/libicu-android/armeabi-v7a/icu/source/common -I/home/coleman/libicu-android/armeabi-v7a/icu/source/i18n -UNDEBUG -fno-exceptions -fno-rtti -Wglobal-constructors -Wexit-time-destructors -fvisibility=hidden -target armv7-none-linux-androideabi -isysroot /home/coleman/android-ndk-r11c/platforms/android-21/arch-arm --sysroot=/home/coleman/android-ndk-r11c/platforms/android-21/arch-arm -B /home/coleman/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin/ -O2 -g0 -UNDEBUG -I/home/coleman/android-ndk-r11c/sources/cxx-stl/llvm-libc++/libcxx/include -I/home/coleman/android-ndk-r11c/sources/cxx-stl/llvm-libc++abi/libcxxabi/include -I/home/coleman/android-ndk-r11c/sources/android/support/include -MMD -MT stdlib/public/stubs/CMakeFiles/swiftStdlibStubs-android-armv7.dir/UnicodeNormalization.cpp.o -MF stdlib/public/stubs/CMakeFiles/swiftStdlibStubs-android-armv7.dir/UnicodeNormalization.cpp.o.d -o stdlib/public/stubs/CMakeFiles/swiftStdlibStubs-android-armv7.dir/UnicodeNormalization.cpp.o -c /home/coleman/swift/stdlib/public/stubs/UnicodeNormalization.cpp
/home/coleman/swift/stdlib/public/stubs/UnicodeNormalization.cpp:24:10: fatal error: 'unicode/ustring.h' file not found
#include <unicode/ustring.h>
^
1 error generated.
[517/684] Building CXX object stdlib/p...s-linux-x86_64.dir/GlobalObjects.cpp.o
ninja: build stopped: subcommand failed.
./utils/build-script: command terminated with a non-zero exit status 1, aborting