New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-5885] build libdispatch for android error 'sys/sdt.h' file not found #680
Comments
Comment by Amr Aboelela (JIRA) @johnno1962 I was trying your script when I got this error, any idea? Thanks |
Comment by Amr Aboelela (JIRA) I passed this error by adding this line before running ./configure: CPPFLAGS="-DTARGET_OS_EMBEDDED" \ |
Comment by Amr Aboelela (JIRA) Now I am getting this error: /home/amr/swift/swift-corelibs-libdispatch/dispatch/dispatch.h:30:10: note: in file included from /home/amr/swift/swift-corelibs-libdispatch/dispatch/dispatch.h:30: |
Comment by Amr Aboelela (JIRA) + das (JIRA User) |
Comment by Amr Aboelela (JIRA) I fixed this error by doing the following in os/linux_base.h: #ifndef ANDROID |
I believe that the current state of the world has libdispatch building successfully for android. Please re-open if that is not the case. |
Additional Detail from JIRA
md5: 4a136b2576174433ec60ce3acb97291c
Issue Description:
I run script:
env \
CC="$SWIFT_ANDROID_BUILD_PATH/llvm-linux-x86_64/bin/clang" \
CXX="$SWIFT_ANDROID_BUILD_PATH/llvm-linux-x86_64/bin/clang++" \
SWIFTC="$SWIFT_ANDROID_BUILD_PATH/swift-linux-x86_64/bin/swiftc" \
CFLAGS="" \
./configure \
--with-swift-toolchain="$SWIFT_ANDROID_TOOLCHAIN_PATH" \
--with-build-variant=release \
--enable-android \
--host=arm-linux-androideabi \
--with-android-ndk=$ANDROID_NDK_PATH \
--with-android-api-level=21 \
--disable-build-tests \
--prefix=$SWIFT_ANDROID_TOOLCHAIN_PATH/usr
I got error:
...
libtool: compile: /home/amr/swift/build/Ninja-ReleaseAssert/llvm-linux-x86_64/bin/clang -DHAVE_CONFIG_H -I. -I../config -I.. -I.. -I../private -Wall -fvisibility=hidden -momit-leaf-frame-pointer -fblocks -I../src/BlocksRuntime -target arm-linux-androideabi --sysroot=/home/amr/android/android-ndk-r14b/platforms/android-21/arch-arm -B/home/amr/android/android-ndk-r14b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin -c allocator.c -fPIC -DPIC -o .libs/allocator.o
In file included from allocator.c:21:
In file included from ./internal.h:743:
./provider.h:10:10: fatal error: 'sys/sdt.h' file not found
#include <sys/sdt.h>
^~~~~~~~~~~
1 error generated.
The text was updated successfully, but these errors were encountered: