Tweaking locally – ftw

So in order to get the current version of nightly builds to work for me, I had to add a srcsrv.ini file in the same place as the srcsrv.dll and devenv.exe – on my computer this is C:Program FilesMicrosoft Visual Studio 8Common7IDE

In that srcsrv.ini the only lines needed are:

[variables]

MYSERVER=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot

The reason for this is that anything in your local srcsrv.ini will override what’s in the pdb file. In the current situation, the pdb files for the nightly debug builds have MYSERVER=:ext:ffxbld@cvs.mozilla.org:/cvsroot since that is what the computer they were built on used. That cvspath does not work without a key though, so it is no good to the average user of source indexed builds.

The second tweak is still making sure that the code is being located properly once it’s downloaded. There is a way to change your registry to alter where Visual Studio looks for its cache of source code. I tried this and it worked but I’m not sure it was necessary. It’s all still a bit of a grey area.

However, the silver lining? The patch does work – with the tweaks which are pretty simple – so source indexed builds exists and hopefully some people will start using them and familiarizing themselves with source server. In the long run, the more people using it, the more people who will be able to hack on it.

Thanks especially to this article which helped tonight as I tried to find the right combination of settings.

Now it’s time to go write some things into the documentation.

Testing the indexed nightly

So the fix worked and now the Mac/Linux |make buildsymbols| functionality is working again. As well, the nightly debug build from last night had source server indexing.

I downloaded the windows nightly to test it – in both WinDBG and Visual Studio 2005.

All looks good on VStudio – the symbols download and then when I try to break debugging I get this:
“This is great!” I think to myself and I happily hit “Run” several times to the various prompts for cvs commands.

Then…NO Source code can be found anywhere. Why? Well, it didn’t download with that cvs command. See how it’s got “:ext:ffxbld@cvs.mozilla.org:/cvsroot”? Well that doesn’t get me any code, what it does get it timeouts and errors like this.

So now what? I was able to run the command with :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot and pull the code files to their default location – which by the way is not anywhere you would find it by accident. Here’s what I found out about the location that SourceServer puts your code by default:

You may be wondering where Visual Studio puts the source server download cache. The default location is C:Documents and SettingsUsernameLocal SettingsApplication DataSourceServer. This is great because with proper security in place only logged-in users can see that directory.

http://msdn2.microsoft.com/en-us/magazine/cc163563.aspx

So I ran the command in that directory and when VStudio is done asking me over and over again about running cvs commands – I do get the source file I checked out appearing in my VStudio solution.

What now? I don’t know if this is something that needs to be changed in the mozilla code or if this is now about doing local changes with a srcsrv.ini file. Hopefully I will get some good advice about this soon so that I can demo it tomorrow without too much hacking and with a little bit of authority even 🙂

Linux headache…

So my patch was backed out because it broke make buildsymbols on the Mac and Linux platforms. From looking closer at the error message and the patch, I deduce that it’s GetVCSFilename containing the offending line – a return file where a tuple (two return values in python) should be returning, so I change it to return (file, None) and after testing the patch on a clean Mac build I am presented with the successful making of buildsymbols.

Now enter evil Linux (cue evil music)- the one platform I have yet to build on in any serious fashion. I should test this patch on Linux to make sure that it works there too. Here’s the bullet form of what happened (as best I can remember at this point in head bashing on keyboard):

  1. I ssh to ‘Liberia’, one of the Quad’s running Fedora in the ORI lab
  2. Check out, apply patch and build a debug build on it – fast! It takes ~3 mins to checkout and ~13 to build
  3. Run make buildsymbols and I get “make: nothing to do for ‘buildsymbols'” (thanks.)
  4. Clobber build, tweak .mozconfig adding –enable-application=browser
  5. Build – run make buildsymbols – still nothing to do for buildsymbols
  6. After attempting to bike home, getting a flat tire from a massive pothole on Keele St and having to bus it I ssh into Liberia again and start from scratch. At this point both Armen and Dave start builds too, all of us using –enable-debug and other assorted .mozconfig settings
  7. No one can make buildsymbols. Without the patch there are errors and with the patch – same errors.
  8. In objdir/config/autoconf.mk I check and see that MOZ_CRASHREPORTER = 1 so make should be recognizing this.
  9. I try a clean checkout and can’t even build because of errors with dump_symbols.cc

Swimming in a sea of red herrings is not fun. Tomorrow’s another day and another stab at getting this going. At this point I’m convinced that there’s something wrong with locally building and not in fact with the patch since it does not touches dump_symbols.cc and since today’s Linux symbols are up and fine (ted checked) which means that make buildsymbols does in fact work somewhere…just not for me (or Dave).