SublimeText error - sublimetext2

I keep getting this error when I try to save a file in sublime text 2 after installing a few packages:
[Error 2] The system cannot find the file specified
[cmd: [u'node', u'C:\\Users\\johndoe\\AppData\\Roaming\\Sublime Text 2\\Packages/JSLint/linter.js', u'--predef', u"['angular', 'document', '$', '_', 'JQuery', 'FB']", u'--sloppy', u'--indent', u'2', u'--node', u'--nomen', u'--vars', u'--plusplus', u'--stupid', u'--todo', u'V:\\editFormDisableColumns.js']]
[dir: V:\]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\]
[Finished]

If you check out the README for JSLint you'll notice that it requires Node.js to be installed and in your PATH (this option is enabled by default in the Windows installer). Once you've done that, restart Sublime and you should be all set.
On a larger note, SublimeLinter includes jslint built in, so the two packages are essentially redundant. Visit the Package Control website, look up your various packages, and read all about them so you don't end up with redundancies or conflicts.

Related

Cythonize ends with 'fatal error C1002: compiler is out of heap space in pass 2'

I try to cythonize a .py script. It is a PyQt5 gui with a large number of QToolButtons, and a working EventFilter. The c module is built successfully, however, the compilation fails with the following error:
d:\stuff\mapform2a.c(11338) : fatal error C1002: compiler is out of heap space in pass 2
LINK : fatal error LNK1257: code generation failed
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe' failed with exit status 1257
The compiler comes from Visual Studio 2019. Python 3.5.5 (yes, old, I know, but I have reasons...).
Is there any way to increase the heap space when trying to "cythonize -i script.py" ?
Cython documentation is really not clear on this (for a non-C-expert at least...)
EDIT
The full log is as follows:
C:\temp\MapForm>python setup.py build_ext --inplace Compiling
MapForm2A.py because it changed. [1/1] Cythonizing MapForm2A.py
C:\Anaconda3\lib\site-packages\Cython\Compiler\Main.py:369:
FutureWarning: Cython directive 'language_level' not set, using 2 for
now (Py2). This will change in a later release! File:
C:\temp\MapForm\MapForm2A.py tree = Parsing.p_module(s, pxd,
full_module_name) running build_ext building 'MapForm2A' extension
creating build creating build\temp.win-amd64-3.5 creating
build\temp.win-amd64-3.5\Release C:\Program Files (x86)\Microsoft
Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL
/DNDEBUG /MD -IC:\Anaconda3\include -IC:\Anaconda3\include
"-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE"
"-IC:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows
Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows
Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows
Kits\10\include\10.0.18362.0\winrt" /TcMapForm2A.c
/Fobuild\temp.win-amd64-3.5\Release\MapForm2A.obj MapForm2A.c creating
C:\temp\MapForm\build\lib.win-amd64-3.5 C:\Program Files
(x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo
/INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO
/LIBPATH:C:\Anaconda3\libs /LIBPATH:C:\Anaconda3\PCbuild\amd64
"/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64" "/LIBPATH:C:\Program Files
(x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64" "/LIBPATH:C:\Program
Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64"
/EXPORT:PyInit_MapForm2A
build\temp.win-amd64-3.5\Release\MapForm2A.obj
/OUT:build\lib.win-amd64-3.5\MapForm2A.cp35-win_amd64.pyd
/IMPLIB:build\temp.win-amd64-3.5\Release\MapForm2A.cp35-win_amd64.lib
MapForm2A.obj : warning LNK4197: export 'PyInit_MapForm2A' specified
multiple times; using first specification Creating library
build\temp.win-amd64-3.5\Release\MapForm2A.cp35-win_amd64.lib and
object build\temp.win-amd64-3.5\Release\MapForm2A.cp35-win_amd64.exp
Generating code c:\temp\mapform\mapform2a.c(7545) : fatal error C1002:
compiler is out of heap space in pass 2 LINK : fatal error LNK1257:
code generation failed error: command 'C:\Program Files
(x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe'
failed with exit status 1257
I can only add that the process gets stuck on the "Generating code" message for about 90 seconds before raising the C1002 exception.
The setup file is rather standard:
from setuptools import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize("MapForm2A.py")
)
The module is pure PyQt5 (pyuic5 output) with no other dependencies and works fine if interpreted directly with no Cython.
EDIT: SOLUTION (Maybe someone will need it).
Thanks to #DavidW (discussion in the comments below).
Setup.py has to be modified in the following way:
from distutils import _msvccompiler
_msvccompiler.PLAT_TO_VCVARS['win-amd64'] = 'amd64'
from setuptools import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize("MapForm2A.py"),
)
The first two lines force 64-bit toolchain.
For the purposes of giving a little more explanation to something solved in the comments: the basic problem looks to be that you're compiling something large and complicated and MSVC has run out of memory at the linking step.
Microsoft has a page about this error which suggests a number of options, with the main one being to use a 64-bit compiler. (Note that this is independent of whether you're compiling a 32-bit or 64-bit module - it's merely the choice of compiler executable)
When compiling Python extension modules (especially with setup.py) the compiler setup is typically selected by distutils. Unfortunately, it looks like distutils chooses to force a 32-bit compiler (see https://github.com/python/cpython/blob/e488e300f5c01289c10906c2e53a8e43d6de32d8/Lib/distutils/_msvccompiler.py#L160).
My suggestion was to dig into the distutils internals at the top of setup.py (before any real setup takes place) to override this setting
from distutils import _msvccompiler
_msvccompiler.PLAT_TO_VCVARS['win-amd64'] = 'amd64'
Essentially all you're really doing is passing the option amd64 to the vcvarsall.bat script that microsoft supply to set up their compiler, thus getting a 64-bit compiler to build a 64-bit extension.

Sublime Text 3 - can't build reactjs into chrome

i created a new build system inside a sublime text3 and saved it as follow :
{ "cmd": ["‪‪C:\Program
Files\Google\Chrome\Application\chrome.exe","$file"] }
but when i choose it in the build system and press :control+b" to build it all i get is:
[WinError 2] The system cannot find the file specified [cmd:
['\u202a\u202aC:\Program
Files\Google\Chrome\Application\chrome.exe',
'C:\Programing\ReduxSimpleStarter-master1\ReduxSimpleStarter-master\src\index.js']]
[dir:
C:\Programing\ReduxSimpleStarter-master1\ReduxSimpleStarter-master\src]
[path: C:\ProgramData\Oracle\Java\javapath;C:\Program Files\NVIDIA
Corporation\PhysX\Common;D:\WampDeveloper\Components\Apache\bin;D:\WampDeveloper\Components\Php;D:\WampDeveloper\Components\Mysql\bin;D:\WampDeveloper\Tools\Perl\perl\bin;C:\Program
Files\Common Files\Microsoft Shared\Windows
Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
Files\Windows Live\Shared;C:\Program Files\Microsoft SQL
Server\90\Tools\binn\;C:\Program Files\QuickTime\QTSystem\;C:\Program
Files\AMD\ATI.ACE\Core-Static;C:\Program Files\ATI
Technologies\ATI.ACE\Core-Static;C:\Program Files\Microsoft\Web
Platform Installer\;C:\Program Files\DevDesktop\drush;C:\Program
Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program
Files\cURL\bin;C:\Program Files\Skype\Phone\;C:\Program Files\Windows
Kits\10\Windows Performance Toolkit\;C:\Program
Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\CSR\CSR
Harmony Wireless Software
Stack\;C:\RoR\Rails\RailsInstaller\Git\cmd;C:\RoR\Rails\RailsInstaller\Ruby2.1.0\bin;C:\Program
Files\Microsoft VS
Code\bin;C:\Users\Daniel.Daniel-PC\AppData\Roaming\npm;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;]
[Finished].
how to i set the build system properly with chrome output ?
If you look at your error, you'll see that there are two invisible Unicode characters \u202a before the path to Chrome. Open your build system, put your cursor after the C in C:\Program Files\..., press backspace a few times to delete the C and the invisible characters, up until you delete the opening double quotes ". Now, retype "C, save the build system, and rerun it.

Winexe installation in Linux

I am trying to compile and build winexe. I have downloaded the samba source and ran the following command to compile the winexe.
./waf configure --samba-dir=../../samba --samba-inc-dirs=../../samba/ --samba-lib-dirs=../../samba/
I am getting the following error. Please suggest me to resolve the error.
[3326/3810] Compiling default/source/smb_static/smb_static.objlist.empty.c
Waf: Leaving directory `/root/samba/bin'
Build failed: could not find 'source/smb_static/smb_static.objlist.empty.c' for
{task: cc smb_static.objlist.empty.c -> smb_static.objlist.empty_2.o}
Checking for library smb_static : not found
Build of static winexe : disabled
Cannot continue! Please either install Samba shared libraries and re-run waf, or download the Samba source code and re-run waf with the "--samba-dir" option.
(complete log in /root/winexe/source/build/config.log)
execfile is deprecated,
edit the file "smb_static/wscript",
remove the line with execfile and use exec(open("wscript").read()) instead

Sublime Text 2 Error saving css [ERROR 2]

so for no reason at all, today when I tried to save my css I recieved the following error:
[Error 2] The system cannot find the file specified
[cmd: [u'node', u'C:\\Users\\Weber\\AppData\\Roaming\\Sublime Text 2\\Packages/JSLint/linter.js', u'--predef', u"['angular', 'document', '$', '_', 'JQuery', 'FB']", u'--sloppy', u'--indent', u'2', u'--node', u'--nomen', u'--vars', u'--plusplus', u'--stupid', u'--todo', u'C:\\Users\\Weber\\AppData\\Roaming\\Sublime Text 2\\Projects\\Blog\\stylesheet.css']]
[dir: C:\Users\Weber\AppData\Roaming\Sublime Text 2\Projects\Blog]
[path: C:\Python27\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Panda Security\WaAgent\Common;C:\Program Files (x86)\QuickTime\QTSystem\;C:\cygnus\cygwin-b20\H-i586-cygwin32\bin;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\Java\jdk1.7.0_51\bin]
[Finished]
And so yesterday it worked, but after doing some python and c++ stuff, I came back to HTML/CSS and I get this error with CSS, not HTML. HTML saves fine.
Edit: when I save it saves the file but the console pops up saying this error, which gets greatly annoying.
Thanks.
The JSLint plugin is upset about some configuration. You can either delete the plug-in and reinstall it, or update the settings:
Type ctrl + P to open packages menu and select 'list packages', then pick JSlint. Look for the config file and edit it.

How to create .snk file for Mono android

I have done android project in the mono develop It working fine in debug mode but when I am Trying to run project in release mode then it is giving following error:
C:\Users\Administrator.EDZ0138\Documents\Projects\IdooctopusNew\IdooctopusNew\SGEN: Error: Could not load file or assembly 'Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=c4c4237547e4b6cd' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) (IdooctopusNew)
Can anyone please help me ?
I got a solution for this issue.
You just have to do is, put the mono.android.dll in to the C:\Program
Files\Microsoft SDKs\Windows\v7.0A\bin folder, open a command prompt and do
following steps:
cd C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin
sn -Vr Mono.Android.dll
gacutil -i C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin
Then build the project.
If you get the error for another DLL like System.xml.dll etc. then repeat above
procedure for respective DLL.
All the best.......!