cpack install problem

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

cpack install problem

Dean Inglis
Hi,
I originally posted this thread to kwwidgets, but have
not had much success and perhaps this is a cpack/cmake
issue Im having.

 
I¹m building stand alone applications using VTK, ITK, GDCM, KWWidgets and I
I'm recently having problems getting my apps to run on windows (XP, Vista 32
bit) platforms where the installer is generated by cpack (NSIS).  The
apps/toolkits tcl/tk are all statically built and linked in Release mode
using MS Visual Studio Express 2005.  I am compiling using the command line
tools (nmake). I keep getting:
 
 The application has failed to start because its side-by-side
 configuration is incorrect.  Please see the application event log for more
 detail.
 
 Installing vcredist_x86.exe does not help as was
 suggested on some MS forums.  As an example, the installer installs
 C:\Program Files\MyApp\bin\myKWWidgetsApp.exe
 C:\Program Files\MyApp\bin\Microsoft.VC80.CRT.manifest
 C:\Program Files\MyApp\bin\ msvcm80.dll
 C:\Program Files\MyApp\bin\ msvcp80.dll
 C:\Program Files\MyApp\bin\ msvcr80.dll

If I run the windows Event Viewer and look at the error:
 
"Activation context generation failed for
"C:Users\Student\Documents\MyApp\bin\myKWWidgetsApp.exe".  Error in manifest
or policy file "" on line.  A component version required by the application
conflicts with another component version already active. Conflicting
components are: Component 1: C:\Windows\WinSxS\manifests\x86
microsoft.vc80.crt 1fc8b3b9a1e18e3b
8.0.50727.3053_none_d08d7bba442a9b36.manifest. Component 2: C:\Program
Files\ MyApp\bin\Microsoft.VC80.CRT.MANIFEST.


Any ideas on how to fix or sort this out would be great, thanks
 
Dean

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: cpack install problem

Bill Hoffman
Dean Inglis wrote:

> Hi,
> I originally posted this thread to kwwidgets, but have
> not had much success and perhaps this is a cpack/cmake
> issue Im having.
>
>  
> I¹m building stand alone applications using VTK, ITK, GDCM, KWWidgets and I
> I'm recently having problems getting my apps to run on windows (XP, Vista 32
> bit) platforms where the installer is generated by cpack (NSIS).  The
> apps/toolkits tcl/tk are all statically built and linked in Release mode
> using MS Visual Studio Express 2005.  I am compiling using the command line
> tools (nmake). I keep getting:
>  
>  The application has failed to start because its side-by-side
>  configuration is incorrect.  Please see the application event log for more
>  detail.
>  
>  Installing vcredist_x86.exe does not help as was
>  suggested on some MS forums.  As an example, the installer installs
>  C:\Program Files\MyApp\bin\myKWWidgetsApp.exe
>  C:\Program Files\MyApp\bin\Microsoft.VC80.CRT.manifest
>  C:\Program Files\MyApp\bin\ msvcm80.dll
>  C:\Program Files\MyApp\bin\ msvcp80.dll
>  C:\Program Files\MyApp\bin\ msvcr80.dll
>
> If I run the windows Event Viewer and look at the error:
>  
> "Activation context generation failed for
> "C:Users\Student\Documents\MyApp\bin\myKWWidgetsApp.exe".  Error in manifest
> or policy file "" on line.  A component version required by the application
> conflicts with another component version already active. Conflicting
> components are: Component 1: C:\Windows\WinSxS\manifests\x86
> microsoft.vc80.crt 1fc8b3b9a1e18e3b
> 8.0.50727.3053_none_d08d7bba442a9b36.manifest. Component 2: C:\Program
> Files\ MyApp\bin\Microsoft.VC80.CRT.MANIFEST.
>
>
> Any ideas on how to fix or sort this out would be great, thanks
>  

Pull up myKWWidgetsApp.exe in text editor and look for the embeded
manifest xml.  Just search for xml.  See if it has two version of the
run time libraries it wants.  If so, you are linking in something that
uses two different version of the run time.

-Bill
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: cpack install problem

John Drescher-2
In reply to this post by Dean Inglis
On Thu, Sep 3, 2009 at 2:13 PM, Dean Inglis<[hidden email]> wrote:

> Hi,
> I originally posted this thread to kwwidgets, but have
> not had much success and perhaps this is a cpack/cmake
> issue Im having.
>
>
> I¹m building stand alone applications using VTK, ITK, GDCM, KWWidgets and I
> I'm recently having problems getting my apps to run on windows (XP, Vista 32
> bit) platforms where the installer is generated by cpack (NSIS).  The
> apps/toolkits tcl/tk are all statically built and linked in Release mode
> using MS Visual Studio Express 2005.  I am compiling using the command line
> tools (nmake). I keep getting:
>
>  The application has failed to start because its side-by-side
>  configuration is incorrect.  Please see the application event log for more
>  detail.
>
>  Installing vcredist_x86.exe does not help as was
>  suggested on some MS forums.  As an example, the installer installs
>  C:\Program Files\MyApp\bin\myKWWidgetsApp.exe
>  C:\Program Files\MyApp\bin\Microsoft.VC80.CRT.manifest
>  C:\Program Files\MyApp\bin\ msvcm80.dll
>  C:\Program Files\MyApp\bin\ msvcp80.dll
>  C:\Program Files\MyApp\bin\ msvcr80.dll
>

BTW, I do not think you can just copy those msvc dlls anymore. I have
my CMakeLsts.txt package vcredist and install that automatically for
me:

So I have this in my CPack setup for my main project:

IF(CMAKE_CL_64)
     SET(CMAKE_MSVC_ARCH amd64)
   ELSE(CMAKE_CL_64)
     SET(CMAKE_MSVC_ARCH x86)
ENDIF(CMAKE_CL_64)

IF(MSVC80)

    FIND_PROGRAM(MSVC_REDIST NAMES
vcredist_${CMAKE_MSVC_ARCH}/vcredist_${CMAKE_MSVC_ARCH}.exe
      PATHS
      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../SDK/v2.0/BootStrapper/Packages/"
      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../SDK/v2.0/BootStrapper/Packages/"
      )
    GET_FILENAME_COMPONENT(vcredist_name "${MSVC_REDIST}" NAME)
    INSTALL(PROGRAMS ${MSVC_REDIST} COMPONENT Runtime DESTINATION bin)
    SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait
'\\\"$INSTDIR\\\\bin\\\\${vcredist_name}\\\"'")
ENDIF(MSVC80)

John
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: cpack install problem

Dean Inglis
In reply to this post by Bill Hoffman
Hi Bill,

within the exe there appear to be two versions:

 <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
version="8.0.50727.4053" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
version="8.0.50727.762" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

Not sure what to do to correct this.  Why would the linker/compiler
embed two different assembly identities?

Dean

-----Original Message-----
From: Bill Hoffman [mailto:[hidden email]]
Sent: September-03-09 2:38 PM
To: [hidden email]
Cc: [hidden email]
Subject: Re: [CMake] cpack install problem

Dean Inglis wrote:
> Hi,
> I originally posted this thread to kwwidgets, but have
> not had much success and perhaps this is a cpack/cmake
> issue Im having.
>
>  
> I¹m building stand alone applications using VTK, ITK, GDCM, KWWidgets and
I
> I'm recently having problems getting my apps to run on windows (XP, Vista
32
> bit) platforms where the installer is generated by cpack (NSIS).  The
> apps/toolkits tcl/tk are all statically built and linked in Release mode
> using MS Visual Studio Express 2005.  I am compiling using the command
line
> tools (nmake). I keep getting:
>  
>  The application has failed to start because its side-by-side
>  configuration is incorrect.  Please see the application event log for
more

>  detail.
>  
>  Installing vcredist_x86.exe does not help as was
>  suggested on some MS forums.  As an example, the installer installs
>  C:\Program Files\MyApp\bin\myKWWidgetsApp.exe
>  C:\Program Files\MyApp\bin\Microsoft.VC80.CRT.manifest
>  C:\Program Files\MyApp\bin\ msvcm80.dll
>  C:\Program Files\MyApp\bin\ msvcp80.dll
>  C:\Program Files\MyApp\bin\ msvcr80.dll
>
> If I run the windows Event Viewer and look at the error:
>  
> "Activation context generation failed for
> "C:Users\Student\Documents\MyApp\bin\myKWWidgetsApp.exe".  Error in
manifest
> or policy file "" on line.  A component version required by the
application
> conflicts with another component version already active. Conflicting
> components are: Component 1: C:\Windows\WinSxS\manifests\x86
> microsoft.vc80.crt 1fc8b3b9a1e18e3b
> 8.0.50727.3053_none_d08d7bba442a9b36.manifest. Component 2: C:\Program
> Files\ MyApp\bin\Microsoft.VC80.CRT.MANIFEST.
>
>
> Any ideas on how to fix or sort this out would be great, thanks
>  

Pull up myKWWidgetsApp.exe in text editor and look for the embeded
manifest xml.  Just search for xml.  See if it has two version of the
run time libraries it wants.  If so, you are linking in something that
uses two different version of the run time.

-Bill

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: cpack install problem

David Cole
Likely comes from a build tree produced with an original Visual Studio, then an upgrade to a SP1 (or 2 or 3) of the same Visual Studio, then an incremental build of the tree...

Produces some obj files that came from the original, some that came with SP1 and the blend causes dependencies on both versions of the runtime.

If that's the cause, the solution is to do a clean build (of *everything* that you link).

It could also be caused by linking in 3rd party binaries that depend on a different version of the runtime than your built binaries. If that's the cause, the solution is again a full rebuild using the same version as your 3rd party binaries.

If that's not possible, for whatever reason, then I'm not sure what the solution is.... :-(


On Thu, Sep 3, 2009 at 3:21 PM, Dean Inglis <[hidden email]> wrote:
Hi Bill,

within the exe there appear to be two versions:

 <dependency>
   <dependentAssembly>
     <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
version="8.0.50727.4053" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
   </dependentAssembly>
 </dependency>
 <dependency>
   <dependentAssembly>
     <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
version="8.0.50727.762" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
   </dependentAssembly>
 </dependency>
</assembly>

Not sure what to do to correct this.  Why would the linker/compiler
embed two different assembly identities?

Dean

-----Original Message-----
From: Bill Hoffman [mailto:[hidden email]]
Sent: September-03-09 2:38 PM
To: [hidden email]
Cc: [hidden email]
Subject: Re: [CMake] cpack install problem

Dean Inglis wrote:
> Hi,
> I originally posted this thread to kwwidgets, but have
> not had much success and perhaps this is a cpack/cmake
> issue Im having.
>
>
> I¹m building stand alone applications using VTK, ITK, GDCM, KWWidgets and
I
> I'm recently having problems getting my apps to run on windows (XP, Vista
32
> bit) platforms where the installer is generated by cpack (NSIS).  The
> apps/toolkits tcl/tk are all statically built and linked in Release mode
> using MS Visual Studio Express 2005.  I am compiling using the command
line
> tools (nmake). I keep getting:
>
>  The application has failed to start because its side-by-side
>  configuration is incorrect.  Please see the application event log for
more
>  detail.
>
>  Installing vcredist_x86.exe does not help as was
>  suggested on some MS forums.  As an example, the installer installs
>  C:\Program Files\MyApp\bin\myKWWidgetsApp.exe
>  C:\Program Files\MyApp\bin\Microsoft.VC80.CRT.manifest
>  C:\Program Files\MyApp\bin\ msvcm80.dll
>  C:\Program Files\MyApp\bin\ msvcp80.dll
>  C:\Program Files\MyApp\bin\ msvcr80.dll
>
> If I run the windows Event Viewer and look at the error:
>
> "Activation context generation failed for
> "C:Users\Student\Documents\MyApp\bin\myKWWidgetsApp.exe".  Error in
manifest
> or policy file "" on line.  A component version required by the
application
> conflicts with another component version already active. Conflicting
> components are: Component 1: C:\Windows\WinSxS\manifests\x86
> microsoft.vc80.crt 1fc8b3b9a1e18e3b
> 8.0.50727.3053_none_d08d7bba442a9b36.manifest. Component 2: C:\Program
> Files\ MyApp\bin\Microsoft.VC80.CRT.MANIFEST.
>
>
> Any ideas on how to fix or sort this out would be great, thanks
>

Pull up myKWWidgetsApp.exe in text editor and look for the embeded
manifest xml.  Just search for xml.  See if it has two version of the
run time libraries it wants.  If so, you are linking in something that
uses two different version of the run time.

-Bill

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: cpack install problem

John Drescher-2
In reply to this post by Dean Inglis
On Thu, Sep 3, 2009 at 3:21 PM, Dean Inglis<[hidden email]> wrote:

> Hi Bill,
>
> within the exe there appear to be two versions:
>
>  <dependency>
>    <dependentAssembly>
>      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
> version="8.0.50727.4053" processorArchitecture="x86"
> publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
>    </dependentAssembly>
>  </dependency>
>  <dependency>
>    <dependentAssembly>
>      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
> version="8.0.50727.762" processorArchitecture="x86"
> publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
>    </dependentAssembly>
>  </dependency>
> </assembly>
>

I believe .762 is 2005sp1 and .4053 was a security pack that was
released by microsoft 2 to 4 weeks ago. Applying the service pack to
visual studio via microsoft update put the new vcredist_x86 for that
in my Visual Studio 2005 tree and installing this to client machines
works with the 0.4053 versions allows them to run my applications.

Here is what I have for my latest application:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
version="8.0.50727.762" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
version="8.0.50727.4053" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
version="8.0.50608.0" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>

John
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: cpack install problem

Bill Hoffman
John Drescher wrote:

> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
>   <dependency>
>     <dependentAssembly>
>       <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
> version="8.0.50727.762" processorArchitecture="x86"
> publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
>     </dependentAssembly>
>   </dependency>
>   <dependency>
>     <dependentAssembly>
>       <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
> version="8.0.50727.4053" processorArchitecture="x86"
> publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
>     </dependentAssembly>
>   </dependency>
>   <dependency>
>     <dependentAssembly>
>       <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
> version="8.0.50608.0" processorArchitecture="x86"
> publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
>     </dependentAssembly>
>   </dependency>
>

The fix is to rebuild everything with the same version (SP) of visual
studio.  A single exe should not have more than one of these things in
it.  If it does then you have to do the redist thing.  If it only has
one, which is possible, then you can ship the libraries and not have to
install into the system with redist.  If there is one .obj or one .dll
that was built with a slight different version of VS, then you get this
problem, and the side by side manifest will not work.  The redist.exe
works by installing all of them into the system.  It requires
administrator rights to do this, and installs them for the whole computer.

-Bill
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: cpack install problem

John Drescher-2
> The fix is to rebuild everything with the same version (SP) of visual
> studio.  A single exe should not have more than one of these things in it.
>  If it does then you have to do the redist thing.  If it only has one, which
> is possible, then you can ship the libraries and not have to install into
> the system with redist.  If there is one .obj or one .dll that was built
> with a slight different version of VS, then you get this problem, and the
> side by side manifest will not work.  The redist.exe works by installing all
> of them into the system.  It requires administrator rights to do this, and
> installs them for the whole computer.
>
Bill,
Thank You. Good to know, I will rebuild ITK, Qt and VTK probably at
the next release of ITK which should be in the next few weeks.
John
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: cpack install problem

Dean Inglis
In reply to this post by Bill Hoffman
that was the problem.  I didn't realize that
security updates to MSVSE would change the versioning.  I was
rebuilding vtk etc. but overlooked tcl/tk.  Once
I rebuilt *everything* apps install and run fine.
Thanks for all your help.
Dean



-----Original Message-----
From: Bill Hoffman [mailto:[hidden email]]
Sent: September-03-09 4:36 PM
To: John Drescher
Cc: [hidden email]; [hidden email]
Subject: Re: [CMake] cpack install problem

John Drescher wrote:

> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
>   <dependency>
>     <dependentAssembly>
>       <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
> version="8.0.50727.762" processorArchitecture="x86"
> publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
>     </dependentAssembly>
>   </dependency>
>   <dependency>
>     <dependentAssembly>
>       <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
> version="8.0.50727.4053" processorArchitecture="x86"
> publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
>     </dependentAssembly>
>   </dependency>
>   <dependency>
>     <dependentAssembly>
>       <assemblyIdentity type="win32" name="Microsoft.VC80.CRT"
> version="8.0.50608.0" processorArchitecture="x86"
> publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
>     </dependentAssembly>
>   </dependency>
>

The fix is to rebuild everything with the same version (SP) of visual
studio.  A single exe should not have more than one of these things in
it.  If it does then you have to do the redist thing.  If it only has
one, which is possible, then you can ship the libraries and not have to
install into the system with redist.  If there is one .obj or one .dll
that was built with a slight different version of VS, then you get this
problem, and the side by side manifest will not work.  The redist.exe
works by installing all of them into the system.  It requires
administrator rights to do this, and installs them for the whole computer.

-Bill

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake