Can't compile omaha..

658 views
Skip to first unread message

Zapbbx

unread,
Sep 15, 2011, 2:04:56 AM9/15/11
to Omaha Discuss
I've followed the developer instructions, but can't seem to compile..
I'm using VS 2010. here is my setup.bat:

@echo off
rem -- Set all environment variables used by Hammer and Omaha. --
set OMAHA_NET_DIR=C:\Windows\Microsoft.NET\Framework\v2.0.50727
set OMAHA_WTL_DIR=D:\Development\OpenSource\WTL81_9127\Include
set OMAHA_WIX_DIR=C:\Program Files (x86)\Windows Installer XML
v3.5\bin
set OMAHA_VISTASDK_DIR=C:\Program Files (x86)\Microsoft SDKs\Windows
\v7.0A
set OMAHA_PSEXEC_DIR=%ProgramFiles%\PSTools
set OMAHA_PYTHON_DIR=C:\Python24
set SCONS_DIR=%OMAHA_PYTHON_DIR%\Lib\site-packages\scons-1.3.1
set SCT_DIR=D:\Development\OpenSource\swtoolkit.0.9.1\swtoolkit
rem -- Add Visual Studio and Python to our path, and set VC env
variables. --
call "D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
\vcvars32.bat"
path %OMAHA_PYTHON_DIR%;%PATH%
rem -- Add ATLServer headers to the Visual C++ include path. --
set INCLUDE=%INCLUDE%D:\Development\OpenSource
\ATL_Server_Source_and_Headers_9_0_70425_Alpha\include;

And the output from Hammer.bat
scons: Reading SConscript files ...
Using precompiled headers.
Building versions: 1.3.23.0
python D:\Development\OpenSource\omaha\tools\proxy_clsid_utils.py
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: scons-out
________Compiling scons-out\dbg-win\obj\mi_exe_stub\mi_mi.obj
mi.cc
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(493) : error C2220: warning treated as error - no 'object'
file generated
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\atlalloc.h(600) : see reference to class template
instantiation 'ATL::CTempBuffer<T,t_nFixedBytes,Allocator>' being
compiled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(493) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(517) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(522) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(180) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\atlconv.h(225) : see reference to class template
instantiation 'ATL::CW2WEX<t_nBufferLength>' being compiled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(185) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(205) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(232) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\atlconv.h(276) : see reference to class template
instantiation 'ATL::CA2AEX<t_nBufferLength>' being compiled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(237) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(257) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(283) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\atlconv.h(309) : see reference to class template
instantiation 'ATL::CA2CAEX<t_nBufferLength>' being compiled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(287) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(316) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\atlconv.h(342) : see reference to class template
instantiation 'ATL::CW2CWEX<t_nBufferLength>' being compiled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(320) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(349) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\atlconv.h(409) : see reference to class template
instantiation 'ATL::CA2WEX<t_nBufferLength>' being compiled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(354) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(374) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(416) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\atlconv.h(476) : see reference to class template
instantiation 'ATL::CW2AEX<t_nBufferLength>' being compiled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(421) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlconv.h(441) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlcomcli.h(1751) : error C2338: CVarTypeInfo< char > cannot be
compiled with /J or _CHAR_UNSIGNED flag enabled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlcomcli.h(1774) : error C2338: CVarTypeInfo< char* > cannot be
compiled with /J or _CHAR_UNSIGNED flag enabled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(493) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\statreg.h(448) : see reference to class template
instantiation 'ATL::CTempBuffer<T,t_nFixedBytes>' being compiled
with
[
T=TCHAR,
t_nFixedBytes=1024
]
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(517) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(522) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(493) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\statreg.h(673) : see reference to class template
instantiation 'ATL::CTempBuffer<T,t_nFixedBytes>' being compiled
with
[
T=char,
t_nFixedBytes=1024
]
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(517) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(522) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(493) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\statreg.h(989) : see reference to class template
instantiation 'ATL::CTempBuffer<T,t_nFixedBytes>' being compiled
with
[
T=TCHAR,
t_nFixedBytes=256
]
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(517) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(522) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(493) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\statreg.h(1060) : see reference to class template
instantiation 'ATL::CTempBuffer<T,t_nFixedBytes>' being compiled
with
[
T=BYTE,
t_nFixedBytes=256
]
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(517) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlalloc.h(522) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlsimpstr.h(947) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\atlsimpstr.h(1017) : see reference to class template
instantiation 'ATL::CStrBufT<BaseType,t_bMFCDLL>' being compiled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlsimpstr.h(958) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2402) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\cstringt.h(2590) : see reference to class template
instantiation 'ATL::CStringT<BaseType,StringTraits>' being compiled
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2411) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2443) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2452) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2402) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\cstringt.h(3047) : see reference to class template
instantiation 'ATL::CStringT<BaseType,StringTraits>' being compiled
with
[
BaseType=char,
StringTraits=ATL::StrTraitATL<char>
]
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\atlstr.h(1282) : see reference to class template
instantiation 'ATL::CStringElementTraits<T>' being compiled
with
[
T=ATL::CAtlStringA
]
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2411) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2443) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2452) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2402) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\cstringt.h(3047) : see reference to class template
instantiation 'ATL::CStringT<BaseType,StringTraits>' being compiled
with
[
BaseType=wchar_t,
StringTraits=ATL::StrTraitATL<wchar_t>
]
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC
\INCLUDE\atlstr.h(1288) : see reference to class template
instantiation 'ATL::CStringElementTraits<T>' being compiled
with
[
T=ATL::CAtlStringW
]
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2411) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2443) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\cstringt.h(2452) : warning C4987: nonstandard extension used: 'throw
(...)'
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(168) : error C2332: 'struct' : missing tag name
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(168) : error C2989: '<unnamed-tag>' : class template
has already been declared as a non-class template
D:\Development\OpenSource\omaha\third_party\chrome\base/
basictypes.h(300) : see declaration of '<unnamed-tag>'
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(168) : error C2011: '<unnamed-tag>' : 'enum' type
redefinition
D:\Development\OpenSource\omaha\third_party\chrome\base/
basictypes.h(300) : see declaration of '<unnamed-tag>'
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(168) : error C2143: syntax error : missing ';' before
'static_assert'
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(168) : error C3113: an 'enum' cannot be a template
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(168) : error C2059: syntax error : ';'
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(171) : error C2332: 'struct' : missing tag name
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(171) : error C2989: '<unnamed-tag>' : class template
has already been declared as a non-class template
D:\Development\OpenSource\omaha\third_party\chrome\base/
basictypes.h(300) : see declaration of '<unnamed-tag>'
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(171) : error C2011: '<unnamed-tag>' : 'enum' type
redefinition
D:\Development\OpenSource\omaha\third_party\chrome\base/
basictypes.h(300) : see declaration of '<unnamed-tag>'
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(171) : error C2143: syntax error : missing ';' before
'static_assert'
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(171) : error C3113: an 'enum' cannot be a template
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(171) : error C2059: syntax error : '<'
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(172) : error C2143: syntax error : missing ';' before
'{'
d:\development\opensource\omaha\third_party\smartany
\smart_any_fwd.h(172) : error C2447: '{' : missing function header
(old-style formal list?)
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlsimpstr.h(947) : warning C4987: nonstandard extension used: 'throw
(...)'
mi_exe_stub\mi.cc(159) : see reference to class template
instantiation 'ATL::CStrBufT<TCharType>' being compiled
with
[
TCharType=TCHAR
]
d:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\ATLMFC\INCLUDE
\atlsimpstr.h(958) : warning C4987: nonstandard extension used: 'throw
(...)'
scons: building terminated because of errors.

Ryan Myers

unread,
Sep 15, 2011, 6:12:08 PM9/15/11
to omaha-...@googlegroups.com
Hi Gavin,

Unfortunately, this is a bug in a Microsoft-provided header.  Visual C++ 2010 includes partial support for a new C++ standard ("C++0x"), in which static_assert is added as a language keyword.  The header in question uses that string as a type name, and so it fails to compile.

We'll need to get a new version of the library, or modify our copy of it.  Please file a bug and we'll try to address it soon; in the meantime, try this: open the file omaha\third_party\smartany\smart_any_fwd.h and replace all appearances of "static_assert" with some other string (for example, "my_static_assert".)  Alternately, you can build Omaha with Visual C++ 2008, which does not support C++0x and will not have this problem.

~rjm


--
You received this message because you are subscribed to the Google Groups "Omaha Discuss" group.
To post to this group, send email to omaha-...@googlegroups.com.
To unsubscribe from this group, send email to omaha-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/omaha-discuss?hl=en.


soundararajan dhakshinamoorthy

unread,
Oct 30, 2014, 3:47:21 PM10/30/14
to omaha-...@googlegroups.com
You can just remove the definition of static_assert and the build continues (line 168 ... line 175).
Reply all
Reply to author
Forward
0 new messages