Boost logo

Boost-Build :

Subject: Re: [Boost-build] msvc 64-bit test targets vs. maifest files
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-10-13 01:26:08


Mat Marcus wrote:

> On Sun, Oct 12, 2008 at 11:51 AM, Vladimir Prus <ghost_at_[hidden]> wrote:
>> On Thursday 09 October 2008 00:34:13 Mat Marcus wrote:
>>> Second attempt (no answer the first time. if no answer again, will try
>>> boost-users, then boost developers)
>>
>> Hi Mat,
>> I was hoping somebody with windows experience would comment, before
>> impressing the world with my deep lack of knowledge about it, but alas...
>>
>>> On Fri, Oct 3, 2008 at 11:50 AM, Mat Marcus <mat-lists_at_[hidden]> wrote:
>>> > For several years I have been working with a set of libraries, built
>>> > with boost build and dependent upon some boost libraries. I've been
>>> > working on a 32-bit machine, but I have occasionally been building
>>> > 64-bit targets to try to help support clients who will be using my
>>> > library on 64-bit machines. My suite of boost-build test targets
>>> > (unit-test, run, etc.) for my lib is a bit inconvenient when on 32 bit
>>> > machines, since I get an error dialog each time I build, but sometimes
>>> > I want to test as much as possible. The commands I use to build (msvc
>>> > 9) are:
>>> >
>>> > ## 32 bit
>>> > bjam msvc debug
>>> >
>>> > ## 64 bit
>>> > bjam msvc debug architecture=x86 address-model=64
>>> > define=BOOST_DISABLE_ABI_HEADERS
>>> >
>>> > Yesterday, I tried to build/run the 64 bit targets for the same files
>>> > using the same invocation on a 64-bit Vista machine. I thought that
>>> > perhaps my code would exhibit some 64-bit run-time issues, but things
>>> > didn't go that far. Instead, I got manifest/DLL-related problems for
>>> > each test. Here is an example of the error that I receive each time
>>> > boost build tries to run a built artifact:
>>> >
>>> > ====== BEGIN OUTPUT ======
>>> > The application has failed to start because its side-by-side
>>> > configuration is incorrect. Please see the application event log for
>>> > more detail.
>>> >
>>> > EXIT STATUS: 14001
>>> > ====== END OUTPUT ======
>>> >
>>> > The corresponding Application Event Log Entry is:
>>> >
>>> > Activation context generation failed for
>>> > "c
\asl\staff\mmarcus\sandbox\built_artifacts\documentation\examples\enum_ops_example.test\msvc-9.0\debug\address-model-64\architecture-x86\link-static\threading-multi\enum_ops_example.exe".
>>> > Dependent Assembly
>>> >
Microsoft.VC90.DebugCRT,processorArchitecture="amd64",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
>>> > could not be found. Please use sxstrace.exe for detailed diagnosis.
>>
>> So, at the link time, reference to the right library is made, but at runtime, the library is not
>> available.
>
> That sounds correct.
>
>> Do you know the location of the CRT library found at link time?
>
> Some research reveals that one copy is located at:
>
> C:\Program Files (x86)\Microsoft Visual Studio
> 9.0\VC\Debug_NonRedist\amd64\Mcirosoft.VC90.DebugCRT
>
> (For completeness, the path to the 32-bit one replace amd64 with x86)

OK.

>
>> It probably has a .manifest file giving
>> the names of actual .dll files. Are those .dll founds located in directory in PATH?

What are the answers to these questions?

>> Maybe
>> the VisualStudio install process installs those libraries so that they are available to linker,
>> but not at runtime? Does that sxstrace.exe tool tell anything?
>
> The strace didn't seem to shed any new light. The problem seems not
> uncommon, e.g., IIRC
>
>
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/b2aacd05-d9e9-4c6f-95f5-d6c005c9a5c6/

>From that output I see that it tries to find the CRT manifest in the same directory as where
executable is. Is this happening for you? What happens if you place Microsoft.VC90.DebugCRT.MANIFEST
in the same directory where executable is? Or if you copy everything from

   C:\Program Files (x86)\Microsoft Visual Studio
   9.0\VC\Debug_NonRedist\amd64\Mcirosoft.VC90.DebugCRT

in the same directory as the executable?

I know this is shooting at random in the dark, but don't have any other approach now.

>
> Is there other info that I could provide that might help?
>
> Thanks,
> Mat
>
> P.S. FWIW, one other issue was that I think I had to add the path to
> (the 32-bit) cl.exe to my user-config.jam, since the fact that Dev
> Studio gets installed under "Program Files (x86)" by default on vista
> 64 seemed to take boost build by surprise.

Can you go to tools/msvc.jam, find a line reading:

        .ProgramFiles = [ path.make [ common.get-program-files-dir ] ] ;

and add:

        ECHO "Program Files is" $(.ProgramFiles) ;

after it and report what it prints? Are there are two ProgramFiles directories --
for 32 and 64-bit programs?

- Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk