Chris Bieneman via llvm-dev
2015-Sep-22 22:07 UTC
[llvm-dev] [compiler-rt] Add iOS simulator link flag
Sadly I really can’t help you debug the home-brew build, it is a good ways outside my expertise. If you want to try building from source using the guide here: http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary <http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary> I’d be more helpful. As it is, the patch you proposed doesn’t seem to make it build via home-brew, and I don’t think we should be taking an effectively untested patch that doesn’t actually enable you to build. You may want to take up this issue with whomever maintains the home-brew package you’re trying to build. -Chris> On Sep 22, 2015, at 2:50 PM, Alex Wang <aw1621107 at gmail.com> wrote: > > Doesn't look like it's set when that command runs. > > The env during the build looks something like the first one here: > https://gist.github.com/aw1621107/3e0b5a36d028f648d7a0 <https://gist.github.com/aw1621107/3e0b5a36d028f648d7a0> > >> On Sep 22, 2015, at 5:42 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote: >> >> The behavior here is consistent with setting SDKROOT in the environment to an OS X SDK. >> >> -Chris >> >>> On Sep 22, 2015, at 2:28 PM, Alex Wang <aw1621107 at gmail.com <mailto:aw1621107 at gmail.com>> wrote: >>> >>> Logs + commands added to the earlier gist. >>> >>> Only thing different from a plain trunk build is adding -Wl,-v and -Wl,-t to the >>> iossim link flags. >>> >>>> On Sep 22, 2015, at 5:17 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote: >>>> >>>> Can you please provide the full error and information about the failure you saw without your patch? >>>> >>>> Since you couldn’t build before the patch, and you can’t build with the patch. I suspect there is an underlying issue which isn’t being addressed. >>>> >>>> -Chris >>>> >>>>> On Sep 22, 2015, at 2:02 PM, Alex Wang <aw1621107 at gmail.com <mailto:aw1621107 at gmail.com>> wrote: >>>>> >>>>> Whoops. Forgot to include what happened before the patch. >>>>> >>>>> Without it, my build fails earlier with something along the lines of "Building for >>>>> iOS simulator, but linking against file (libc++.dylib) built for OS X (x86_64)". >>>>> The linker wasn't touching the iPhone SDK at all, instead going straight for >>>>> /usr/lib/libc++.dylib. This also happened with libSystem.dylib, but I don't know >>>>> what causes one library to fail vs the other. >>>>> >>>>>> On Sep 22, 2015, at 4:57 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote: >>>>>> >>>>>> In the failing command (iossim-log) the syslibroot flag is being specified to the linker and the link command still fails, so your patch shouldn’t fix the problem. You can see that listed in iossim-link.txt. >>>>>> >>>>>> The other error is (if anything) more disturbing. You’re generating a malformed libLLVMSupport. Not sure how that’s happening. >>>>>> >>>>>> It looks to me like there is something wrong with your host toolchain. I don’t really know what else to say, but your patch shouldn’t have any impact on this problem since that flag is already being specified in the failing commands you’ve shown. >>>>>> >>>>>> -Chris >>>>>> >>>>>>> On Sep 22, 2015, at 1:43 PM, Alex Wang via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote: >>>>>>> >>>>>>> Summary is linker fails with unknown symbol in iossim asan/ubsan (was _wordexp >>>>>>> in the past, now is _sigaltstack$UNIX2003"i), or ranlib getting bad input while >>>>>>> working on native tablegen (archive extends past end of file, no such file are >>>>>>> the ones I remember) >>>>>>> >>>>>>> Full commands + partial logs here: >>>>>>> https://gist.github.com/aw1621107/86fec1e1fa9cc66bbf4d <https://gist.github.com/aw1621107/86fec1e1fa9cc66bbf4d> >>>>>>> >>>>>>> This was built on OS X 10.11, Xcode 7.1 using the following homebrew command >>>>>>> and formula: >>>>>>> >>>>>>> brew install llvm --with-clang --with-sanitizers --HEAD --debug --verbose >>>>>>> https://github.com/aw1621107/homebrew/blob/llvm-updates/Library/Formula/llvm.rb <https://github.com/aw1621107/homebrew/blob/llvm-updates/Library/Formula/llvm.rb> >>>>>>>> On Sep 22, 2015, at 4:08 PM, Joerg Sonnenberger via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >>>>>>>> >>>>>>>> On Tue, Sep 22, 2015 at 01:04:27PM -0700, Chris Bieneman via llvm-dev wrote: >>>>>>>>> This does not sound right. -isysroot specified during linking should be passing through the sys root to the linker. >>>>>>>> >>>>>>>> No? It should just be dropped. >>>>>>>> >>>>>>>> Joerg >>>>>>>> _______________________________________________ >>>>>>>> LLVM Developers mailing list >>>>>>>> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> >>>>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> llvm-commits mailing list >>>>>>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org> >>>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits> >>>>>> >>>>> >>>> >>> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150922/adad064f/attachment-0001.html>
Alex Wang via llvm-dev
2015-Sep-23 16:42 UTC
[llvm-dev] [compiler-rt] Add iOS simulator link flag
Alright, tried a manual build with clang and compiler-rt. Config command I used was: cmake -G "Unix Makefiles" ../llvm -DCMAKE_VERBOSE_MAKEFILE=ON -DLLVM_OPTIMIZED_TABLEGEN=On -DLLVM_ENABLE_ASSERTIONS=On Ran builds with 1, 2, 4, 8, 9 threads. Only got a failure on two of the four 9-threaded builds; tried the other ones once each. For what it's worth, fully multi-threaded builds with one or none of the tablegen/assertion flags succeeded. The main difference I noticed from the failing config is that these builds didn't produce a NATIVE folder. gist here: https://gist.github.com/aw1621107/b01fc73821895847a454 <https://gist.github.com/aw1621107/b01fc73821895847a454> It does look like the SDK/linker issues are something with homebrew, so I'll go bother the homebrew maintainers instead. My apologies for the trouble.> On Sep 22, 2015, at 6:07 PM, Chris Bieneman <beanz at apple.com> wrote: > > Sadly I really can’t help you debug the home-brew build, it is a good ways outside my expertise. > > If you want to try building from source using the guide here: http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary <http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary> > > I’d be more helpful. As it is, the patch you proposed doesn’t seem to make it build via home-brew, and I don’t think we should be taking an effectively untested patch that doesn’t actually enable you to build. > > You may want to take up this issue with whomever maintains the home-brew package you’re trying to build. > > -Chris > >> On Sep 22, 2015, at 2:50 PM, Alex Wang <aw1621107 at gmail.com <mailto:aw1621107 at gmail.com>> wrote: >> >> Doesn't look like it's set when that command runs. >> >> The env during the build looks something like the first one here: >> https://gist.github.com/aw1621107/3e0b5a36d028f648d7a0 <https://gist.github.com/aw1621107/3e0b5a36d028f648d7a0> >> >>> On Sep 22, 2015, at 5:42 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote: >>> >>> The behavior here is consistent with setting SDKROOT in the environment to an OS X SDK. >>> >>> -Chris >>> >>>> On Sep 22, 2015, at 2:28 PM, Alex Wang <aw1621107 at gmail.com <mailto:aw1621107 at gmail.com>> wrote: >>>> >>>> Logs + commands added to the earlier gist. >>>> >>>> Only thing different from a plain trunk build is adding -Wl,-v and -Wl,-t to the >>>> iossim link flags. >>>> >>>>> On Sep 22, 2015, at 5:17 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote: >>>>> >>>>> Can you please provide the full error and information about the failure you saw without your patch? >>>>> >>>>> Since you couldn’t build before the patch, and you can’t build with the patch. I suspect there is an underlying issue which isn’t being addressed. >>>>> >>>>> -Chris >>>>> >>>>>> On Sep 22, 2015, at 2:02 PM, Alex Wang <aw1621107 at gmail.com <mailto:aw1621107 at gmail.com>> wrote: >>>>>> >>>>>> Whoops. Forgot to include what happened before the patch. >>>>>> >>>>>> Without it, my build fails earlier with something along the lines of "Building for >>>>>> iOS simulator, but linking against file (libc++.dylib) built for OS X (x86_64)". >>>>>> The linker wasn't touching the iPhone SDK at all, instead going straight for >>>>>> /usr/lib/libc++.dylib. This also happened with libSystem.dylib, but I don't know >>>>>> what causes one library to fail vs the other. >>>>>> >>>>>>> On Sep 22, 2015, at 4:57 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote: >>>>>>> >>>>>>> In the failing command (iossim-log) the syslibroot flag is being specified to the linker and the link command still fails, so your patch shouldn’t fix the problem. You can see that listed in iossim-link.txt. >>>>>>> >>>>>>> The other error is (if anything) more disturbing. You’re generating a malformed libLLVMSupport. Not sure how that’s happening. >>>>>>> >>>>>>> It looks to me like there is something wrong with your host toolchain. I don’t really know what else to say, but your patch shouldn’t have any impact on this problem since that flag is already being specified in the failing commands you’ve shown. >>>>>>> >>>>>>> -Chris >>>>>>> >>>>>>>> On Sep 22, 2015, at 1:43 PM, Alex Wang via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote: >>>>>>>> >>>>>>>> Summary is linker fails with unknown symbol in iossim asan/ubsan (was _wordexp >>>>>>>> in the past, now is _sigaltstack$UNIX2003"i), or ranlib getting bad input while >>>>>>>> working on native tablegen (archive extends past end of file, no such file are >>>>>>>> the ones I remember) >>>>>>>> >>>>>>>> Full commands + partial logs here: >>>>>>>> https://gist.github.com/aw1621107/86fec1e1fa9cc66bbf4d <https://gist.github.com/aw1621107/86fec1e1fa9cc66bbf4d> >>>>>>>> >>>>>>>> This was built on OS X 10.11, Xcode 7.1 using the following homebrew command >>>>>>>> and formula: >>>>>>>> >>>>>>>> brew install llvm --with-clang --with-sanitizers --HEAD --debug --verbose >>>>>>>> https://github.com/aw1621107/homebrew/blob/llvm-updates/Library/Formula/llvm.rb <https://github.com/aw1621107/homebrew/blob/llvm-updates/Library/Formula/llvm.rb> >>>>>>>>> On Sep 22, 2015, at 4:08 PM, Joerg Sonnenberger via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >>>>>>>>> >>>>>>>>> On Tue, Sep 22, 2015 at 01:04:27PM -0700, Chris Bieneman via llvm-dev wrote: >>>>>>>>>> This does not sound right. -isysroot specified during linking should be passing through the sys root to the linker. >>>>>>>>> >>>>>>>>> No? It should just be dropped. >>>>>>>>> >>>>>>>>> Joerg >>>>>>>>> _______________________________________________ >>>>>>>>> LLVM Developers mailing list >>>>>>>>> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> >>>>>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> llvm-commits mailing list >>>>>>>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org> >>>>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits> >>>>>>> >>>>>> >>>>> >>>> >>> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150923/912d2ff2/attachment.html>
Chris Bieneman via llvm-dev
2015-Sep-23 17:27 UTC
[llvm-dev] [compiler-rt] Add iOS simulator link flag
There are known parallelization issues in the CMake-generated makefiles. They seem more common with LLVM_OPTIMIZED_TABLEGEN=On. The issue doesn’t exist when using ninja instead of make, and I haven’t had the time to track it down. I don’t know if it is a CMake bug, or a bug in our configuration. Patches welcome. -Chris> On Sep 23, 2015, at 9:42 AM, Alex Wang <aw1621107 at gmail.com> wrote: > > Alright, tried a manual build with clang and compiler-rt. > Config command I used was: > > cmake -G "Unix Makefiles" ../llvm -DCMAKE_VERBOSE_MAKEFILE=ON -DLLVM_OPTIMIZED_TABLEGEN=On -DLLVM_ENABLE_ASSERTIONS=On > > Ran builds with 1, 2, 4, 8, 9 threads. Only got a failure on two of the four 9-threaded > builds; tried the other ones once each. > > For what it's worth, fully multi-threaded builds with one or none of the tablegen/assertion > flags succeeded. The main difference I noticed from the failing config is that these builds > didn't produce a NATIVE folder. > > gist here: https://gist.github.com/aw1621107/b01fc73821895847a454 <https://gist.github.com/aw1621107/b01fc73821895847a454> > > It does look like the SDK/linker issues are something with homebrew, so I'll go > bother the homebrew maintainers instead. My apologies for the trouble. > >> On Sep 22, 2015, at 6:07 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote: >> >> Sadly I really can’t help you debug the home-brew build, it is a good ways outside my expertise. >> >> If you want to try building from source using the guide here: http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary <http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary> >> >> I’d be more helpful. As it is, the patch you proposed doesn’t seem to make it build via home-brew, and I don’t think we should be taking an effectively untested patch that doesn’t actually enable you to build. >> >> You may want to take up this issue with whomever maintains the home-brew package you’re trying to build. >> >> -Chris >> >>> On Sep 22, 2015, at 2:50 PM, Alex Wang <aw1621107 at gmail.com <mailto:aw1621107 at gmail.com>> wrote: >>> >>> Doesn't look like it's set when that command runs. >>> >>> The env during the build looks something like the first one here: >>> https://gist.github.com/aw1621107/3e0b5a36d028f648d7a0 <https://gist.github.com/aw1621107/3e0b5a36d028f648d7a0> >>> >>>> On Sep 22, 2015, at 5:42 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote: >>>> >>>> The behavior here is consistent with setting SDKROOT in the environment to an OS X SDK. >>>> >>>> -Chris >>>> >>>>> On Sep 22, 2015, at 2:28 PM, Alex Wang <aw1621107 at gmail.com <mailto:aw1621107 at gmail.com>> wrote: >>>>> >>>>> Logs + commands added to the earlier gist. >>>>> >>>>> Only thing different from a plain trunk build is adding -Wl,-v and -Wl,-t to the >>>>> iossim link flags. >>>>> >>>>>> On Sep 22, 2015, at 5:17 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote: >>>>>> >>>>>> Can you please provide the full error and information about the failure you saw without your patch? >>>>>> >>>>>> Since you couldn’t build before the patch, and you can’t build with the patch. I suspect there is an underlying issue which isn’t being addressed. >>>>>> >>>>>> -Chris >>>>>> >>>>>>> On Sep 22, 2015, at 2:02 PM, Alex Wang <aw1621107 at gmail.com <mailto:aw1621107 at gmail.com>> wrote: >>>>>>> >>>>>>> Whoops. Forgot to include what happened before the patch. >>>>>>> >>>>>>> Without it, my build fails earlier with something along the lines of "Building for >>>>>>> iOS simulator, but linking against file (libc++.dylib) built for OS X (x86_64)". >>>>>>> The linker wasn't touching the iPhone SDK at all, instead going straight for >>>>>>> /usr/lib/libc++.dylib. This also happened with libSystem.dylib, but I don't know >>>>>>> what causes one library to fail vs the other. >>>>>>> >>>>>>>> On Sep 22, 2015, at 4:57 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote: >>>>>>>> >>>>>>>> In the failing command (iossim-log) the syslibroot flag is being specified to the linker and the link command still fails, so your patch shouldn’t fix the problem. You can see that listed in iossim-link.txt. >>>>>>>> >>>>>>>> The other error is (if anything) more disturbing. You’re generating a malformed libLLVMSupport. Not sure how that’s happening. >>>>>>>> >>>>>>>> It looks to me like there is something wrong with your host toolchain. I don’t really know what else to say, but your patch shouldn’t have any impact on this problem since that flag is already being specified in the failing commands you’ve shown. >>>>>>>> >>>>>>>> -Chris >>>>>>>> >>>>>>>>> On Sep 22, 2015, at 1:43 PM, Alex Wang via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote: >>>>>>>>> >>>>>>>>> Summary is linker fails with unknown symbol in iossim asan/ubsan (was _wordexp >>>>>>>>> in the past, now is _sigaltstack$UNIX2003"i), or ranlib getting bad input while >>>>>>>>> working on native tablegen (archive extends past end of file, no such file are >>>>>>>>> the ones I remember) >>>>>>>>> >>>>>>>>> Full commands + partial logs here: >>>>>>>>> https://gist.github.com/aw1621107/86fec1e1fa9cc66bbf4d <https://gist.github.com/aw1621107/86fec1e1fa9cc66bbf4d> >>>>>>>>> >>>>>>>>> This was built on OS X 10.11, Xcode 7.1 using the following homebrew command >>>>>>>>> and formula: >>>>>>>>> >>>>>>>>> brew install llvm --with-clang --with-sanitizers --HEAD --debug --verbose >>>>>>>>> https://github.com/aw1621107/homebrew/blob/llvm-updates/Library/Formula/llvm.rb <https://github.com/aw1621107/homebrew/blob/llvm-updates/Library/Formula/llvm.rb> >>>>>>>>>> On Sep 22, 2015, at 4:08 PM, Joerg Sonnenberger via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: >>>>>>>>>> >>>>>>>>>> On Tue, Sep 22, 2015 at 01:04:27PM -0700, Chris Bieneman via llvm-dev wrote: >>>>>>>>>>> This does not sound right. -isysroot specified during linking should be passing through the sys root to the linker. >>>>>>>>>> >>>>>>>>>> No? It should just be dropped. >>>>>>>>>> >>>>>>>>>> Joerg >>>>>>>>>> _______________________________________________ >>>>>>>>>> LLVM Developers mailing list >>>>>>>>>> llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> >>>>>>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> llvm-commits mailing list >>>>>>>>> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org> >>>>>>>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150923/72cf1ddc/attachment.html>