<div dir="ltr">I'll go ahead and give it a run on Xcode.  If it doesn't break anything there, sure I'll go ahead and commit it.<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 10:22 AM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Does the Xcode build automatically include SafeMachO.h? Also, any harm in just committing that patch, if not would you mind doing that (I don't have commit access)? </div>
<div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br>

<div class="gmail_quote">On Wed, Jul 23, 2014 at 10:17 AM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr">Ok.  Sounds like there are header ordering differences between configure/make and the Xcode build.  That might be causing issues.</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Wed, Jul 23, 2014 at 10:14 AM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok, figured it out. The position of the SafeMachO.h header matters. This works:<div><br></div><div>```</div>



<div><div>diff --git a/source/Host/common/Host.cpp b/source/Host/common/Host.cpp</div><div>index 275b446..3802224 100644</div>

<div>--- a/source/Host/common/Host.cpp</div><div>+++ b/source/Host/common/Host.cpp</div><div>@@ -32,6 +32,8 @@</div><div> #include <sys/sysctl.h></div><div> #endif</div><div><br></div><div>+#include "lldb/Utility/SafeMachO.h"</div>





<div>+</div><div> #if defined (__APPLE__)</div><div> #include <mach/mach_port.h></div><div> #include <mach/mach_init.h></div><div>@@ -368,7 +370,7 @@ Host::GetArchitecture (SystemDefaultArchitecture arch_kind)</div>





<div>                 // Now we need modify the cpusubtype for the 32 bit slices.</div><div>                 uint32_t cpusubtype32 = cpusubtype;</div><div> #if defined (__i386__) || defined (__x86_64__)</div><div>-                if (cpusubtype == CPU_SUBTYPE_486 || cpusubtype == CPU_SUBTYPE_</div>





<div>+                if (cpusubtype == CPU_SUBTYPE_486 || cpusubtype == llvm::MachO:</div><div>                     cpusubtype32 = CPU_SUBTYPE_I386_ALL;</div><div> #elif defined (__arm__) || defined (__arm64__) || defined (__aarch64__)</div>





<div>                 if (cputype == CPU_TYPE_ARM || cputype == CPU_TYPE_ARM64)</div></div><div>```</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 10:04 AM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I don't think that file is included from Host.cpp or am I missing something?</div><div>

<div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 9:59 AM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br>






<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It comes from llvm/include/llvm/Support/MachO.h, line 1261.</div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 9:57 AM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Through which path is that constant supposed to be defined? I can check that all those are picked up correctly.</div>







<div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 9:55 AM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br>









<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok.  Definitely sounds worth of opening up a <a href="http://llvm.org/bugs" target="_blank">llvm.org/bugs</a> ticket on.  That way you can attach your make logs and whatnot.<div>









<br></div><div>Based on what you reported so far, it sounds like perhaps the build is picking up headers from the wrong place (i.e. maybe configure is finding the wrong llvm code, or something that is causing headers from one place to get used with code from another, perhaps between the local lldb and llvm/clang code).</div>









<span><font color="#888888">
<div><br></div><div>-Todd</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 9:51 AM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br>










<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">That's not really a great option, because it means I have to maintain three build systems on my side with three different configurations, especially because the rest of llvm/clang builds just fine with Makefiles. I will track down why this fails and submit a patch. Since this is the only issue preventing a clean build of lldb with Makefiles, I think that will be significantly less work than adjusting the rest of the pipeline to work with three build systems. </div>










<div><div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 9:26 AM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">












<div dir="ltr">Ok I did an Xcode and Ubuntu 14.04 build at llvm, clang and lldb r213767 (just a few minutes ago), and those all worked.<div><br></div><div>Are you in a position where you can use the Xcode build on MacOSX?  If so, that's definitely the way to go.  cmake gets little attention there, and frankly I didn't even know the configure/make build on MacOSX even worked.</div>













<div><br></div><div>At the moment we're struggling with having 3 build systems.  At best we're maintaining the canonical build system for a given platform.  Right now that seems to be Xcode for MacOSX, cmake for Ubuntu and FreeBSD.  make/configure seems to be used by Debian's 'build (maybe FC too?).  I would recommend attempting to use the canonical build system for lldb on a given platform to minimize difficulties since those will tend to get fixed quickly when they do break on the given platform.</div>













</div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 9:13 AM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br>













<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ah shucks, ok.<div><br></div><div>I did fix a build issue that occurred this morning due to some changes in llvm, but I don't think I hit that one.</div>













<div><br></div><div>I'll do a quick sync now just to see if maybe that crept in over the last hour or two since I came in.</div><span><font color="#888888">
<div><br></div><div>-Todd</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 9:11 AM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br>














<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">No, I'm doing a Makefile build. LLVM/Clang/LLDB are all at latest trunk.</div><div><div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 23, 2014 at 9:06 AM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey Keno!<div><br></div><div>Are you doing an Xcode build?</div><div><br></div><div>If so, you may be suffering from what I did when I first started using Xcode builds.  Xcode puts the llvm and llvm/tools/clang directory underneath the lldb directory.  It does a sync the first time for you, but not after that.  So, you may be dealing with an llvm and clang tree that are out of date with respect to your version of llvm.  If that's the case, just do this:</div>

















<div><br></div><div>cd /your/lldb/path</div><div><br></div><div>cd llvm</div><div>svn update</div><div><br></div><div>cd tools/clang</div><div>svn update</div><div><br></div><div># Put you back in the lldb dir</div><div>
















cd ../../..</div>
<div><br></div><div>Then redo your build of lldb.  It will run the auto llvm/clang build step (somewhat long), then get back to building lldb.</div><div><br></div><div>Let me know if that solves your issue!</div><div><br>

















</div><div>-Todd</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Wed, Jul 23, 2014 at 8:43 AM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br>

















</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>While building on OS X I have been sent reports of the following (I<br>
did see it myself at one point as well, but worked around it). I tried<br>
including SafeMachO.h but that caused other problems in the llvm<br>
headers. What's the proper way to get around this other than `#define<br>
CPU_SUBTYPE_X86_64_H 8`?<br>
<br>
lldb/source/Host/common/Host.cpp:371:68: error: use of undeclared<br>
identifier 'CPU_SUBTYPE_X86_64_H'<br>
                if (cpusubtype == CPU_SUBTYPE_486 || cpusubtype ==<br>
CPU_SUBTYPE_X86_64_H)<br>
<br>
Keno<br></div></div>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><span><font color="#888888"><br>
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'">
















<tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>

















<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>

















<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">














<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>














<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>














<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">













<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>













<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>













<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">










<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>










<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>










<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">







<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>







<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>







<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">



<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>



<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>



<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>