MacOS compiler-rt build failed with master branch

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MacOS compiler-rt build failed with master branch

Kristof Beyls via cfe-dev
Hi Dan,
Why am I forced to install xcode on my machine to build compiler-rt? Even after installing xcode and building clang+compiler-rt from source, clang++ couldn't build a simple test cpp code. What should I do to fix this? After deleting your code, it worked fine. 

Thank you very much for ruining a week of my time. I wish you documented it somewhere

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: MacOS compiler-rt build failed with master branch

Kristof Beyls via cfe-dev
Hi,

On Sat, 26 Oct 2019 at 21:48, Aditya Atluri <[hidden email]> wrote:
Hi Dan,
Why am I forced to install xcode on my machine to build compiler-rt?

You’re not. You don’t say anything about your setup at all but I guess you’re running macOS?

Even after installing xcode and building clang+compiler-rt from source, clang++ couldn't build a simple test cpp code. What should I do to fix this? After deleting your code, it worked fine. 


What code? You don’t even provide a link.


Thank you very much for ruining a week of my time. I wish you documented it somewhere

I’m sorry you think I wasted your time. Perhaps you should have tried asking for help sooner?

The kind of email you just wrote is very unlikely to get you any help and I’m not sure what you hope it will achieve.

Good luck finding someone to help you.

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: MacOS compiler-rt build failed with master branch

Kristof Beyls via cfe-dev


On Sat, 26 Oct 2019 at 22:32, Aditya Atluri <[hidden email]> wrote:
>
> Hi Dan,
> I wasn't expecting a response from you. So, I didn't put effort in writing a detailed email. I am running macOS Mojave (10.14.6)
>
> Attached build script and test program.

The test program isn't really of any use. Your script doesn't succeed in building clang

```
ninja: error: loading 'build.ninja': No such file or directory
Unable to build llvm
```

so there isn't a build of clang available for you to use.


> Let me know if you need any more information
>
> Here is the output log:
>
> -- Sphinx disabled.
>
> -- Linker detection: ld64
>
> -- Found OSX_SYSROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
>
> ERRORCould not detect OS X Sysroot. Either install Xcode or the Apple Command Line Tools

That error indicates something is wrong with your compiler toolchain (i.e. what you are using to build llvm/clang/etc...)

> -- Got ld supported ARCHES: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em
>
> -- Toolchain supported arches: armv6;armv7;armv7s;arm64;arm64e;arm64_32;i386;x86_64;x86_64h;armv6m;armv7k;armv7m;armv7em
>
> -- Finding valid architectures for osx...
>
> CMake Error at projects/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake:68 (message):
>
>   Failed to determine SDK version for "macosx" SDK
>
> Call Stack (most recent call first):
>
>   projects/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake:125 (find_darwin_sdk_version)

This probably means the call to the following command failed

```
xcodebuild -version -sdk macosx Path
```

That command should work even with just the "Apple Command Line Tools". If it doesn't, then that's a problem. However, based on the other error message it sounds like something is wrong with compiler toolchain.

>
>   projects/compiler-rt/cmake/config-ix.cmake:401 (darwin_test_archs)
>
>   projects/compiler-rt/CMakeLists.txt:234 (include)
>
>
>
> -- Configuring incomplete, errors occurred!
>
> See also "/Users/aditya/Code/llvm10_x86_64_build_lnx/build_10_x86_64_llvm/CMakeFiles/CMakeOutput.log".
>
> See also "/Users/aditya/Code/llvm10_x86_64_build_lnx/build_10_x86_64_llvm/CMakeFiles/CMakeError.log".
>
> ninja: error: loading 'build.ninja': No such file or directory
>
> Unable to build llvm

Your script `get_llvm_v2.sh` is pulling LLVM sources from the wrong location. LLVM moved to a monorepo layout last week and your script is pulling from the unofficial mirror of LLVM on GitHub.



_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

test.cpp (110 bytes) Download Attachment
get_llvm_v2.sh (6K) Download Attachment