Changes between Version 20 and Version 21 of CompileApp


Ignore:
Timestamp:
May 9, 2008, 11:57:42 AM (17 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CompileApp

    v20 v21  
    88Achieving these goals can be challenging. However, BOINC provides tools and example files that simplify the task.
    99
    10 Whether you're creating a new application or adapting an existing application to BOINC, we recommend that you start by building the BOINC sample application '''upper_case''' on all the platforms you want to support. When this is done, you can use the sample application and its associated project files as a basis for your own application.
     10Whether you're creating a new application or adapting an existing application to BOINC,
     11we recommend that you start by building the BOINC sample application
     12'''example_app''' on all the platforms you want to support.
     13When this is done, you can use the example application
     14and its associated project files as a basis for your own application.
    1115
    12 The first step in building the sample application on a given host is to check out the boinc and boinc_samples modules on that host. Put them in the same parent directory.
     16The first step in building the example application on a given host is to check
     17out the boinc and boinc_samples modules on that host.
     18Put them in the same parent directory.
    1319
    1420== Windows ==
     
    1622
    1723=== Microsoft Visual Studio ===
    18 Go to boinc_samples/win_build. If you're using Visual Studio 2005, open samples.sln. If you're using Visual Studio 2003, open samples_2003.sln. Select 'Build/Build Solution', or hit F7. That's it!
     24Go to boinc_samples/win_build. If you're using Visual Studio 2005, open samples.sln.
     25If you're using Visual Studio 2003, open samples_2003.sln.
     26Select 'Build/Build Solution', or hit F7.
     27That's it!
    1928
    20 There is a free version, [http://msdn2.microsoft.com/en-us/express/aa975050.aspx Visual C++ 2008 Express Edition], which works with the BOINC project file (after it is converted). You'll also need the [http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en Microsoft Platform SDK] and some [http://msdn2.microsoft.com/en-us/express/aa700755.aspx changes to your Visual Studio Express] installation to include the SDK. Warning: you cannot use more recent versions of the SDK (which do not include glaux).
     29There is a free version, [http://msdn2.microsoft.com/en-us/express/aa975050.aspx Visual C++ 2008 Express Edition],
     30which works with the BOINC project file (after it is converted).
     31You'll also need the [http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en Microsoft Platform SDK]
     32and some [http://msdn2.microsoft.com/en-us/express/aa700755.aspx changes to your Visual Studio Express]
     33installation to include the SDK.
     34Warning: you cannot use more recent versions of the SDK (which do not include glaux).
    2135
    2236If you use your own project file:
     
    3549=== Cygwin ===
    3650
    37 In order to run a cygwin application from BOINC, you need to supply
    38 all the cygwin DLLs that the application requires in addition to the
    39 executable.
     51Cygwin is an alternative to Visual Studio for building Windows apps.
     52In order to run a cygwin application from BOINC,
     53you need to supply all the cygwin DLLs that the application requires
     54in addition to the executable.
    4055You can get LISTDLLS from http://www.sysinternals.com/.  It will tell
    4156you what DLLs a running executable has loaded.
     
    4358TODO: links to required software?
    4459
    45 TODO: develop a Makefile for building uppercase under Cygwin. It can assume that the libraries in boinc/lib and boinc/api have already been built. Verify that _autosetup/configure/make work in boinc/.
     60TODO: develop a Makefile for building example_app under Cygwin.
     61It can assume that the libraries in boinc/lib and boinc/api have already been built.
     62Verify that _autosetup/configure/make work in boinc/.
    4663
    4764Information from CERN is [https://uimon.cern.ch/twiki/bin/view/LHCAtHome/BoincPort#WinInstr here].
     
    5370[http://www.bloodshed.net/devcpp.html Dev-C++] is an open-source development environment based on the GCC compilers.
    5471
    55 TODO: develop a project file for Dev-C++. It should be similar to the Visual Studio project file (i.e. it should include what it needs from boinc/).
     72TODO: develop a project file for Dev-C++.
     73It should be similar to the Visual Studio project file
     74(i.e. it should include what it needs from boinc/).
    5675
    5776SETI@home used Dev-C++ for its Windows build; you can get the [http://setiathome.berkeley.edu/cgi-bin/cvsweb.cgi/seti_boinc/client/win_build/Attic/seti_boinc.dev?rev=1.1.2.23;content-type=text%2Fplain.dev project file] on SETI CVS repository. (''outdated'').
    5877}}}
     78
     79== Symbol Stores ==
     80
     81=== Introduction ===
     82
     83In order to obtain useful diagnostic information in the event of an application crash,  it is necessary to dump a callstack and any other relevant information about what was  going on at the time of the crash.  Symbols are only needed during a crash event,  therefore they are stripped from most applications to cut down on the binary size and  bandwidth requirements to deploy a new release.
     84
     85Without symbols, callstacks tend to be nothing more than a list of function pointers  in memory.  A developer has to load the un-stripped executable in memory using the  same operating system and similar processor to jump to that memory address in order  to determine the function name and parameters.  This is very labor intensive and  generally not a very fun job.
     86
     87Microsoft created a technology called a 'Symbol Store' to use with their debugger  technology which allows Windows debuggers to locate and download compressed symbol  files to diagnose problems and convert function pointers into human readable text.  This greatly speeds up the process of diagnosing and fixing bugs.
     88
     89With the BOINC Runtime Debugger for Windows framework a project can publish their  symbol files and only have to distribute the application to each of the BOINC  clients.  When a crash event occurs the runtime framework will download the symbol  file from the symbol store and then proceed to dump as much diagnostic information  as possible to help projects diagnose the failure.
     90
     91=== Requirements ===
     92You'll need the latest stable release of the  [http://www.microsoft.com/whdc/devtools/debugging/default.mspx Debugging Tools for Windows. ]
     93
     94Verify that your executable is setup to generate PDB debugging symbols for a release build.
     95
     96Verify that the advance linker option to generate a checksum is enabled for a release build.
     97
     98You'll need to explicitly name both your EXE and PDB before compilation since the debugger bases the name of the PDB file off of information that is stored in the executable header.
     99
     100=== Project Symbol Store ===
     101
     102Specifying a project wide symbol store is as easy as adding the symstore element to your config.xml file for the project.
     103
     104Below is an XML shred with an example symstore element.
     105
     106{{{
     107<boinc>
     108    <config>
     109        <symstore>http://sample.example.com/symstore</symstore>
     110    </config>
     111</boinc>
     112}}}
     113
     114=== Adding symbols to the symbol store ===
     115 [http://msdn.microsoft.com/en-us/library/cc266480.aspx Symstore] is a utility to manage symbol stores.  You'll want to create a local symbol store on your Windows build machine in which you'll initially add new symbol files with each revision of your application.
     116
     117Symstore will compress the symbol file and then copy it into your local symbol store.
     118
     119Below is an example command which you can run from the Windows command line or cygwin command line.
     120
     121{{{
     122symstore.exe add /l /f c:\SampleSrc\*.pdb /s c:\symstore /compress /t "Sample" /v "5.02" /o /c "Application Release"
     123}}}
     124
     125=== Uploading symbols to the symbol store ===
     126
     127Most projects tend to use scp to copy files between Windows machines and their project server.
     128
     129The example below copies the entire symstore to the target location.  After the copy operation you can delete all the subdirectories except '000Admin' to save time uploading for future application symbols.
     130
     131{{{
     132pscp.exe -r -C -batch c:\symstore sample@project.example.com:projects/sample/html/user/symstore
     133}}}
     134
     135
    59136== Mac OS X ==
    60137