[tor-bugs] #9711 [Tor bundles/installation]: Test out crosstools-ng for Gitian OSX builds (instead of toolchain4 binaries)

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 9 09:46:13 UTC 2013


#9711: Test out crosstools-ng for Gitian OSX builds (instead of toolchain4
binaries)
------------------------------------------+-------------------------------
     Reporter:  mikeperry                 |      Owner:  erinn
         Type:  task                      |     Status:  needs_information
     Priority:  normal                    |  Milestone:
    Component:  Tor bundles/installation  |    Version:
   Resolution:                            |   Keywords:  tbb-3.0, gitian
Actual Points:                            |  Parent ID:
       Points:                            |
------------------------------------------+-------------------------------

Comment (by mingwandroid):

 Replying to [comment:6 gk]:
 > Replying to [comment:4 mingwandroid]:
 > > Mike, are you using llvmgcc or normal gcc from toolchain4 at present?
 If normal gcc, then I'd recommend that you guys build from the latest of
 the cctools-llvm branch to get the latest fixes (llvmgcc is disabled at
 present, IMHO it was never very reliable, even the official Apple
 binaries).
 >
 > Normal gcc and yes, I am using the latest cctools-llvm branch.
 >
 > > Georg, there's no reason to use darwin11 instead of darwin10. When I
 started this work it was with a darwin11 SDK so it's purely a matter of
 habit for me. The merge to crosstool-ng is being done by Yann Diorcet and
 myself; I handle the darwin11 samples and he does the same for the
 darwin10 ones.
 > >
 > > A compiler built with the darwin11 SDK (MacOSX10.7.sdk) can be used
 fine to build software for darwin10 using -mmacosx-version-min=10.5,
 However feel free to base your version on i686-apple-darwin10 (e.g.
 flosoft's MacOSX10.6.sdk) and the i686-apple-darwin10 sample instead.
 >
 > That was actually the reason why I asked. We use already flosoft's
 MacOSX10.6.sdk and I hoped to avoid using the 10.7 SDK to get a compiler
 to use that one with the 10.6 SDK... Good.
 >
 > > I recommend studying the two crosstool.config files:
 > >
 > > samples/i686-apple-darwin10/crosstool.config and samples/i686-apple-
 darwin11/crosstool.config
 > >
 > > .. these are just samples of course. You could make your own, e.g.
 darwin-gitian. The final compiler prefixes don't depend on the sample
 folder name but rather the options specified in the crosstool.config file
 itself.
 >
 > Thanks I'll think about doing an own while I digest that whole system.
 >
 > > I think it would be sensible for me to setup exactly the same
 environment you are using. Is this Ubuntu? If so, can you point me to the
 exact ISO and any scripts you use to prepare it for development? I will
 then make a new VM.
 >
 > The gitian build system is working with (at least) the current LTS
 (12.04). I order to build the Mac TBB you do the following

 Should I use the 32bit version of the LTS?

 > {{{
 > git clone https://git.torproject.org/builders/tor-browser-bundle.git
 > cd tor-browser-bundle/gitian
 > make prep
 > }}}
 > Install all the stuff you are asked to and run
 > {{{
 > make prep
 > }}}
 > again until you have all the necessary sources (i.e. until |make prep|
 does not give you any errors anymore)
 > Then do
 > {{{
 > ./mkbundle-mac.sh
 > }}}
 > and it should give you (after a while) Mac TBBs in a new directory
 (currently 3.0-alpha-4). Anyway, if you have issues with setting it up.
 Just write me a mail and we'll sort these things out.
 >
 > > If you've got some logs (build.log) detailing the "fun bugs" please
 post them.
 >
 > So I have found so far three issues (disclaimer: I am not sure yet if
 there is anything you can do about as this might actually be things
 belonging to the source packages used in building the compiler):
 >
 > 1) I hit intermittent GMP configure failures due to newly created files
 being older than distributed ones. (log: cross_mac_gmp1) That is likely
 due to the gitian build environment but it would be good to somehow avoid
 that. I am wondering whether the reason here is some old version of GMP? I
 have been building mingw-w64 from source for a while with a similar gitian
 environment but never hit this problem.

 In general, how does gitian handle filestamp dependencies? I'm under the
 impression that it uses .so injection to force specific time functions to
 return the same thing, given that, I'm a little confused. Is there a
 mechanism to force some fixed negative delta onto files created by
 specific tools (tar and patch come to mind)?

 >
 > 2) 'groff' was missing (the check in the configure script is there but
 although 'groff' is needed for building the script is not returning with
 an error if it is not available) (cross_mac_build1). Installing the
 necessary package probably solves the issue.

 Ok this sounds like an upstream crosstool-ng problem. I will put it on the
 TODO list for now.

 >
 > 3) a Makefile.config(?) is missing? (cross_mac_build2).
 >
 > Now, what bothers me most, though, is that Firefox 24 is not working
 with a gcc4.2 anymore (at least Mozilla is saying that in the configure
 script and I don't have a reason to doubt that). I am under the impression
 that your cross-compilers are (by default) gcc4.2, no? If so, what are our
 options here? Are there non-interactive ways to change the gcc version?

 4.2.1 was as the last GCC that Apple provided. They heavily patched this
 version (and made llvmgcc from it) and they never updated beyond that
 (understandable given the level and nature of patching, of course they
 could've opted to make their changes cleanly and worked with GCC core
 developers to upstream but I suspect GCC was something they worked on
 grudgingly). They switched from GCC to clang, so when you say that Firefox
 24 is not working with gcc4.2 anymore, I can only assume that for Mac,
 they switched to building with clang - or maybe llvmgcc, if you can
 determine the exact details of this it would be helpful, also can you find
 out it requires libc++? When do you plan to switch over to Firefox 24?

 I will download your git repo, give it a test and study your logs at
 lunchtime. You didn't say whether you use the -arch flag or not, but no
 problem I can take a look.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9711#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list