I'm getting a few warnings and fatal error when I try to build omaha on windows 10 machine.
C:\updater\omaha\omaha>hammer
scons: warning: No installed VCs
File "C:\chromium\upd\swtoolkit\site_scons\site_init.py", line 426, in SiteInitMain
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\chromium\upd\swtoolkit\site_scons\site_init.py", line 426, in SiteInitMain
scons: Reading SConscript files ...
scons: warning: No installed VCs
File "C:\chromium\upd\swtoolkit\site_scons\site_tools\target_platform_windows.py", line 283, in generate
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\chromium\upd\swtoolkit\site_scons\site_tools\target_platform_windows.py", line 283, in generate
Using precompiled headers.
Building versions: 1.3.99.0
python C:\chromium\upd\omaha\omaha\tools\proxy_clsid_utils.py
AttributeError: SConsEnvironment instance has no attribute 'WiX':
File "C:\chromium\upd\omaha\omaha\main.scons", line 992:
BuildEnvironments(_environments)
File "C:\chromium\upd\swtoolkit\site_scons\site_init.py", line 276:
e.ExecuteDefer()
File "C:\Python24\Lib\site-packages\scons-1.3.1\SCons\Environment.py", line 224:
return apply(self.method, nargs, kwargs)
File "C:\chromium\upd\swtoolkit\site_scons\site_tools\defer.py", line 171:
func(fenv)
File "C:\chromium\upd\swtoolkit\site_scons\site_init.py", line 203:
exports={'env': ec}, duplicate=0)
File "C:\Python24\Lib\site-packages\scons-1.3.1\SCons\Script\SConscript.py", line 553:
return apply(_SConscript, [self.fs,] + files, subst_kw)
File "C:\Python24\Lib\site-packages\scons-1.3.1\SCons\Script\SConscript.py", line 262:
exec _file_ in call_stack[-1].globals
File "C:\chromium\upd\omaha\omaha\recovery\build.scons", line 104:
env.BuildSConscript('repair_exe')
File "C:\Python24\Lib\site-packages\scons-1.3.1\SCons\Environment.py", line 224:
return apply(self.method, nargs, kwargs)
File "C:\chromium\upd\swtoolkit\site_scons\site_tools\environment_tools.py", line 191:
env.SConscript(script_file, exports={'env': env.Clone()})
File "C:\Python24\Lib\site-packages\scons-1.3.1\SCons\Script\SConscript.py", line 553:
return apply(_SConscript, [self.fs,] + files, subst_kw)
File "C:\Python24\Lib\site-packages\scons-1.3.1\SCons\Script\SConscript.py", line 262:
exec _file_ in call_stack[-1].globals
File "C:\chromium\upd\omaha\omaha\recovery\repair_exe\build.scons", line 37:
env.BuildSConscript(subdir)
File "C:\Python24\Lib\site-packages\scons-1.3.1\SCons\Environment.py", line 224:
return apply(self.method, nargs, kwargs)
File "C:\chromium\upd\swtoolkit\site_scons\site_tools\environment_tools.py", line 191:
env.SConscript(script_file, exports={'env': env.Clone()})
File "C:\Python24\Lib\site-packages\scons-1.3.1\SCons\Script\SConscript.py", line 553:
return apply(_SConscript, [self.fs,] + files, subst_kw)
File "C:\Python24\Lib\site-packages\scons-1.3.1\SCons\Script\SConscript.py", line 262:
exec _file_ in call_stack[-1].globals
File "C:\chromium\upd\omaha\omaha\recovery\repair_exe\msp\build.scons", line 156:
old_msi, new_msi = CreateMsiInstallerFiles(
File "C:\chromium\upd\omaha\omaha\recovery\repair_exe\msp\build.scons", line 60:
old_unsigned_output = old_unsigned_env.WiX(
I spent a lot of time debugging warnings and seems scons 1.3.1 doesn't support visual studio 2015, however google's build
instructions imply opposite. Also it's not fully clear whether the error depends on the warnings. Please help to solve the issue.
I solved the issue, turns out a new version of wix toolset has bin folder with all the utils and official docs and tutorial contains wrong environment variable. By the way the warnings have no impact on build process at all.
So probably there is no point to debug any code in similar situations, just need to check the environment.
Related
Working on a project that uses pyexcel to read and write .xls files which is compiled using py2exe.
I get this error after compiling and confirming that pyexcel, pyexcel-io and pyexcel-xls are in the library.zip folder.
Traceback (most recent call last):
File "FundDatabase.pyo", line 391, in get_worksheet
File "pyexcel\core.pyo", line 118, in get_book
File "pyexcel\core.pyo", line 137, in _get_book
File "pyexcel\sources\file_source_input.pyo", line 52, in get_data
File "pyexcel_io\io.pyo", line 31, in get_data
File "pyexcel_io\io.pyo", line 118, in load_data_new
File "pyexcel_io\manager.pyo", line 94, in create_reader
File "pyexcel_io\manager.pyo", line 89, in _get_a_handler
IOError: No suitable library found for xls
here is my project library
Short Answer
You will need to tell pyinstaller about the hidden imports about pyexcel-xls.
In order to package pyexcel-xls, you need to specify:
--hidden-import pyexcel_xls
--hidden-import pyexcel_xls.xlsr
--hidden-import pyexcel_xls.xlsw
Reference: mechanism of dynamic load module, confilict with pyinstaller/cx_freeze's execution
Long Answer
Since version 0.5.0, pyexcel uses lazy loading, which creates a problem for pystaller because not all modules are loaded on program's startup. Hence, you will need to tell pyinstaller about the missing imports(a.k.a hidden imports).
Pyinstaller notes
http://pyexcel.readthedocs.io/en/latest/pyinstaller.html
http://pyexcel-io.readthedocs.io/en/latest/pyinstaller.html
I am trying to follow the examples at http://swift.im/swiften/guide/#Example-EchoBot1, for building a simple XMPP client using the swiften library.
Mentioned example needs file Swiften.h. According to the swiften mailing list, this file is generated when building swiften. So, I have tried building it on my windows machine, following the instructions at http://swift.im/git/swift-contrib/tree/Documentation/BuildingOnWindows.txt.
Since they state that Qt and open ssl are optional, I go straight to building by running scons.
This is the output I get:
c:\swift-2.0>scons
scons: Reading SConscript files ...
scons: warning: No installed VCs
File "C:\swift-2.0\SConstruct", line 1, in <module>
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\swift-2.0\SConstruct", line 1, in <module>
scons: warning: No installed VCs
File "C:\swift-2.0\SConstruct", line 1, in <module>
scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "C:\swift-2.0\SConstruct", line 1, in <module>
KeyError: 'MSVS_VERSION':
File "C:\swift-2.0\SConstruct", line 1:
variant_dir = SConscript("BuildTools/SCons/SConscript.boot")
File "c:\swift-2.0\3rdParty\SCons\scons-local-2.0.0.final.0\SCons\Script\SConscript.py", line 614:
return method(*args, **kw)
File "c:\swift-2.0\3rdParty\SCons\scons-local-2.0.0.final.0\SCons\Script\SConscript.py", line 551:
return _SConscript(self.fs, *files, **subst_kw)
File "c:\swift-2.0\3rdParty\SCons\scons-local-2.0.0.final.0\SCons\Script\SConscript.py", line 260:
exec _file_ in call_stack[-1].globals
File "C:\swift-2.0\BuildTools\SCons\SConscript.boot", line 240:
if int(env["MSVS_VERSION"].split(".")[0]) < 10 :
File "c:\swift-2.0\3rdParty\SCons\scons-local-2.0.0.final.0\SCons\Environment.py", line 409:
return self._dict[key]
How do I set the script to find my version of Visual Studio?
Thanks,
best regards,
c
SCons should automatically find the installed version of VisualStudio, but you have to open a "VisualC++ command prompt", as described in the BuildingOnWindows.txt, and start the build within this environment.
I think we've not updated scons to handle VS 2013 yet. I've got a pending patch to add support for some newer VSs, which I'll try to check includes 2013 and get integrated in the next couple of days.
I am rather new to Linux (Ubuntu) and installing (Python) packages. I'm having trouble with mkvirtualenv and can not solve it:
~$ mkvirtualenv mysite70
New python executable in mysite70/bin/python
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 562, in <module>
main()
File "/usr/lib/python2.7/site.py", line 544, in main
known_paths = addusersitepackages(known_paths)
File "/usr/lib/python2.7/site.py", line 271, in addusersitepackages
user_site = getusersitepackages()
File "/usr/lib/python2.7/site.py", line 246, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
File "/usr/lib/python2.7/site.py", line 236, in getuserbase
USER_BASE = get_config_var('userbase')
File "/usr/lib/python2.7/sysconfig.py", line 577, in get_config_var
return get_config_vars().get(name)
File "/usr/lib/python2.7/sysconfig.py", line 476, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python2.7/sysconfig.py", line 355, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /home/sietse/.virtualenvs/mysite70/local/include/python2.7/pyconfig.h (No such file or directory)
ERROR: The executable mysite70/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/home/usr/.virtualenvs' (should be u'/home/usr/.virtualenvs/mysite70')
ERROR: virtualenv is not compatible with this system or executable
Did I install something wrong?
This is likely a permissions error with your current logged in user on the Linux machine.
Try
sudo mkvirtualenv mysite70
This will often prompt for the password of the root user.
If that does not work, you may want to look at the article below:
http://noelusion.com/2013/Fixing-the-mysterious-virtualenv-error-IOError-invalid-Python-installation/
But note, that the article is a hack on a fairly specific instance.
I think I messed up the installation. I reinstalled Ubuntu, virtualenv etc. It works fine now.
Make sure your username has accents or special characters. If yes, change directory creating environments creating an environment variable WORKON_HOME with value equal to the new path. Ex .: C:\Envs
I am building the Chromium source code on a Windows 7 x64 computer. I downloaded the source using the build instructions provided and set up the environment as told by the instruction pages. I can open the solution in VS2010Pro successfully (albeit taking a while), and I can edit the code.
When I try to build the solution, I get thousands of errors (last time, 2703). The first batch are that Cmd.exe exited with error code 1; there are about 20 of those. Then most of the rest complain that C++ header files are not found by the compiler. Here are a few randomly selected from throughout the long error list.
Error 138: error C1083: Cannot open include file: 'EventInterfaces.h': No such file or directory D:\Chromium\src\third_party\WebKit\Source\core\dom\EventNames.h in project webcore_rendering
Error 1952: error C1083: Cannot open include file: 'grit/ui_resources.h': No such file or directory D:\Chromium\src\chrome\browser\ui\chrome_style.cc in project browser_ui
Error 2482: error C1083: Cannot open include file: 'grit/generated_resources.h': No such file or directory D:\Chromium\src\chrome\browser\printing\print_dialog_cloud.cc in project browser
Now, not all projects fail to build. Last time, 526 projects succeeded and only 199 failed. Having followed the instructions word by word, and tried a clean download twice, I really don't see what could be wrong.
EDIT: Still fails, but looking through the Output I noticed the cause of the Cmd.exe errors
28>------ Build started: Project: convert_dict, Configuration: Debug Win32 ------
27> Traceback (most recent call last):
27> File "../tools/grit/grit/format/repack.py", line 27, in <module>
27> main(sys.argv)
27> File "../tools/grit/grit/format/repack.py", line 24, in main
27> grit.format.data_pack.RePack(argv[1], argv[2:])
27> File "../tools/grit/grit/format\../..\grit\format\data_pack.py", line 120, in RePack
27> new_content = ReadDataPack(filename)
27> File "../tools/grit/grit/format\../..\grit\format\data_pack.py", line 54, in ReadDataPack
27> data = util.ReadFile(input_file, util.BINARY)
27> File "../tools/grit/grit/format\../..\grit\util.py", line 207, in ReadFile
27> with open(filename, mode) as f:
27> IOError: [Errno 2] No such file or directory: 'D:/Chromium/src/build/Debug/obj/global_intermediate/content/content_resources.pak'
27>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 1.
I am having lots of trouble trying to compile a wxpython application into an exe file. py2exe keeps giving me errors and won't compile my code to an exe. The following is what happens when I run a simple setup.py script. I am on windows 64 bit and python 2.7 and using py2exe 64 bit. (bundling does not work in 64 bit py2exe. not sure if that poses a problem) I believe I have all the right DLLs installed since I have microsoft visual studio installed. Any help would be appreciated.
*** searching for required modules ***
*** parsing results ***
creating python loader for extension 'P4API' (C:\Python27\lib\site-packages\P4AP
I.pyd -> P4API.pyd)
creating python loader for extension 'wx._misc_' (C:\Python27\lib\site-packages\
wx-2.8-msw-unicode\wx\_misc_.pyd -> wx._misc_.pyd)
creating python loader for extension 'select' (C:\Python27\DLLs\select.pyd -> se
lect.pyd)
creating python loader for extension 'unicodedata' (C:\Python27\DLLs\unicodedata
.pyd -> unicodedata.pyd)
creating python loader for extension 'wx._windows_' (C:\Python27\lib\site-packag
es\wx-2.8-msw-unicode\wx\_windows_.pyd -> wx._windows_.pyd)
creating python loader for extension 'wx._core_' (C:\Python27\lib\site-packages\
wx-2.8-msw-unicode\wx\_core_.pyd -> wx._core_.pyd)
creating python loader for extension 'wx._gdi_' (C:\Python27\lib\site-packages\w
x-2.8-msw-unicode\wx\_gdi_.pyd -> wx._gdi_.pyd)
creating python loader for extension 'wx._controls_' (C:\Python27\lib\site-packa
ges\wx-2.8-msw-unicode\wx\_controls_.pyd -> wx._controls_.pyd)
creating python loader for extension 'bz2' (C:\Python27\DLLs\bz2.pyd -> bz2.pyd)
*** finding dlls needed ***
Traceback (most recent call last):
File "setup.py", line 4, in <module>
setup(windows=['PerforceApp.py'])
File "C:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\py2exe\build_exe.py", line 243, in run
self._run()
File "C:\Python27\lib\site-packages\py2exe\build_exe.py", line 305, in _run
dlls = self.find_dlls(extensions)
File "C:\Python27\lib\site-packages\py2exe\build_exe.py", line 389, in find_dl
ls
self.dll_excludes)
File "C:\Python27\lib\site-packages\py2exe\build_exe.py", line 1064, in find_d
ependend_dlls
bin_depends(loadpath, images + [sys.executable], excludes_use)
File "C:\Python27\lib\site-packages\py2exe\build_exe.py", line 1441, in bin_de
pends
if isSystemDLL(dll):
File "C:\Python27\lib\site-packages\py2exe\build_exe.py", line 1498, in isSyst
emDLL
raise Exception, "Seems not to be an exe-file"
Exception: Seems not to be an exe-file
I had the same problem that was caused by the "MSVCP90.dll" file, so i added this directive to my setup.py and now it works like a charm!
dll_excludes = ['MSVCP90.dll']