Skip to content
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

Failed to build #2

Open
4ntoine opened this issue Oct 25, 2015 · 5 comments
Open

Failed to build #2

4ntoine opened this issue Oct 25, 2015 · 5 comments

Comments

@4ntoine
Copy link

4ntoine commented Oct 25, 2015

C compiler cannot create executables

MBA-Anton:libclang-ios asmirnov$ ./llvm-ios/scripts/magic.sh 
 Cloning the necessary projects... 
Cloning into '/Volumes/Transcend/dev/src/libclang-ios/llvm-ios/scripts/../source/llvm'...
remote: Counting objects: 16290, done.
remote: Compressing objects: 100% (15034/15034), done.
remote: Total 16290 (delta 1982), reused 12796 (delta 1130)
Receiving objects: 100% (16290/16290), 20.37 MiB | 1.45 MiB/s, done.
Resolving deltas: 100% (1982/1982), done.
Checking connectivity... done
Checking out files: 100% (15818/15818), done.
Cloning into '/Volumes/Transcend/dev/src/libclang-ios/llvm-ios/scripts/../source/llvm/tools/clang'...
remote: Counting objects: 10131, done.
remote: Compressing objects: 100% (9205/9205), done.
remote: Total 10131 (delta 524), reused 8723 (delta 281)
Receiving objects: 100% (10131/10131), 12.75 MiB | 1.44 MiB/s, done.
Resolving deltas: 100% (524/524), done.
Checking connectivity... done
Checking out files: 100% (10241/10241), done.
Cloning into '/Volumes/Transcend/dev/src/libclang-ios/llvm-ios/scripts/../source/llvm/projects/compiler-rt'...
remote: Counting objects: 1774, done.
remote: Compressing objects: 100% (1423/1423), done.
remote: Total 1774 (delta 507), reused 1211 (delta 325)
Receiving objects: 100% (1774/1774), 2.29 MiB | 754.00 KiB/s, done.
Resolving deltas: 100% (507/507), done.
Checking connectivity... done
Checking out files: 100% (1692/1692), done.
 Applyig the needed patches... 
patching file llvm/utils/unittest/googletest/src/gtest-death-test.cc
patching file llvm/lib/LineEditor/LineEditor.cpp
patching file llvm/unittests/Support/ProgramTest.cpp
patching file llvm/lib/Support/Unix/Program.inc
 Building libclang... 
/Volumes/Transcend/dev/src/libclang-ios/llvm-ios/build
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for arm-apple-darwin11-clang... clang -arch armv7 -mios-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -stdlib=libc++ -Os
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang -arch armv7 -mios-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -stdlib=libc++ -Os accepts -g... yes
checking for clang -arch armv7 -mios-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -stdlib=libc++ -Os option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ -arch armv7 -mios-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -stdlib=libc++ -Os accepts -g... yes
checking how to run the C preprocessor... clang -arch armv7 -mios-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -stdlib=libc++ -Os -E
checking whether GCC or Clang is our host compiler... clang
checking build system type... i386-apple-darwin14.5.0
checking host system type... arm-apple-darwin11
checking target system type... arm-apple-darwin11
checking type of operating system we're going to host on... Darwin
checking type of operating system we're going to target... Darwin
checking target architecture... ARM
checking for executable suffix on build platform... checking for -gcc... no
checking for gcc... gcc
blank
checking for -g++... no
checking for g++... g++
checking whether Clang is new enough... yes
checking whether Clang will select a modern C++ standard library... no
configure: error:
We detected a missing feature in the standard C++ library that was known to be
missing in libstdc++4.6 and implemented in libstdc++4.7. There are numerous
C++11 problems with 4.6's library, and we don't support GCCs or libstdc++ older
than 4.7. You will need to update your system and ensure Clang uses the newer
standard library.

If this error is incorrect or you need to force things to work, you may pass
'--disable-compiler-version-checks' to configure to bypass this test.
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
/Volumes/Transcend/dev/src/libclang-ios/llvm-ios/build
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for arm-apple-darwin11-clang... clang -arch arm64 -mios-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -stdlib=libc++ -Os
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.
@4ntoine
Copy link
Author

4ntoine commented Oct 25, 2015

BTw i've modified build.sh in order to be used with iOS SDK 9.1, but left min version 8.0:

SYSROOT_SIM="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.1.sdk"
SYSROOT_OS="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk"
MIN_VERSION="8.0"

@4ntoine
Copy link
Author

4ntoine commented Oct 25, 2015

i've changed CC=clang ... to CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang ... and in similar way for CXX and i was able to go further. But then i've got:

llvm[2]: Compiling not.cpp for Release build
llvm[2]: Linking Release executable not (without symbols)
llvm[2]: ======= Finished Linking Release Executable not (without symbols)
llvm[2]: Installing Release /Volumes/Transcend/dev/src/libclang-ios/llvm-ios/scripts/../install/armv7/bin/not
llvm[3]: Compiling src/gtest-all.cc for Release build
llvm[3]: Building Release Archive Library libgtest.a
llvm[3]: Install circumvented with NO_INSTALL
llvm[3]: Compiling TestMain.cpp for Release build
llvm[3]: Building Release Archive Library libgtest_main.a
llvm[3]: Install circumvented with NO_INSTALL
make[1]: *** No rule to make target `/Volumes/Transcend/dev/src/libclang-ios/llvm-ios/build/BuildTools/Release/bin/llvm-tblgen', needed by `/Volumes/Transcend/dev/src/libclang-ios/llvm-ios/build/lib/IR/Release/Intrinsics.gen.tmp'.  Stop.
make: *** [install] Error 1

@zrzka
Copy link
Contributor

zrzka commented Oct 27, 2015

You're not able to use binaries? If not, feel free to create pull request with fixes. Currently there's no plan to update it for Xcode 7.1, ...

@4ntoine
Copy link
Author

4ntoine commented Oct 27, 2015

precompiled binaries are compiled with threads and zlib which is not suitable for me. do you have plans to add Xcode project with simple libclang usage? I was able to use it for iPad (arm64) but unable to even launch app at Simulator: http://stackoverflow.com/questions/33368170/linked-with-local-libclang-instead-of-passed-static-library Any suggestion on what can be wrong or even example is highly appreciated

@zrzka
Copy link
Contributor

zrzka commented Oct 27, 2015

There's no plan to add Xcode project file now. Basically I'm waiting for ´open sourcing Swift later this yeaŕ. Then I'll probably add it, because have some plans with iPad Pro, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants