Node.js npm installing websocket fails - node.js

I am installing websocket through npm in Windows 7 64 bit. The websocket version is 1.0.8
I am getting a linking error even though I have Visual Studio 2010 and Python 2.7 :
C:\Windows\system32\node_modules\websocket>node "C:\Program Files (x86)\nodejs\n
ode_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" r
ebuild
validation.cc
C:\Users\User\.node-gyp\0.10.30\deps\v8\include\v8.h(184): warning C4506: no d
efinition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Hand
le<T>)' [C:\Windows\system32\node_modules\websocket\build\validation.vcxproj]
with
[
T=v8::Object
]
LINK : fatal error LNK1104: cannot open file 'C:\Windows\system32\node_modules\w
ebsocket\build\Release\validation.node' [C:\Windows\system32\node_modules\websoc
ket\build\validation.vcxproj]
xor.cpp
C:\Users\User\.node-gyp\0.10.30\deps\v8\include\v8.h(179): warning C4506: no d
efinition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Hand
le<T>)' [C:\Windows\system32\node_modules\websocket\build\xor.vcxproj]
with
[
T=v8::Object
]
LINK : fatal error LNK1104: cannot open file 'C:\Windows\system32\node_modules\w
ebsocket\build\Release\xor.node' [C:\Windows\system32\node_modules\websocket\bui
ld\xor.vcxproj]
gyp[websocket v1.0.8]
Native code compile failed!!
Please note that this module DOES NOT REQUIRE the native components
and will still work without them, though not quite as efficiently.
On Windows, native extensions require Visual Studio and Python.
On Unix, native extensions require Python, make and a C++ compiler.
Start npm with --websocket:verbose to show compilation output (if any).
websocket#1.0.8 node_modules\websocket
C:\Windows\system32>
Is there a way to skip this compilation stuff and just use this module right away ? Or someway to fix this error ?
PS: the command prompt was started with Admin rights.

Related

Trying to install python-mbedtls on Windows using VSCode

I am trying to install the python-mbedtls package using pip installer in my venv on Windows, but I am getting the below error:
build\3.10.2\temp.win-amd64-3.10\Release\pyrex\mbedtls\exceptions.c(685): fatal error C1083: Cannot open include file: 'mbedtls/error.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-mbedtls
Failed to build python-mbedtls
ERROR: Could not build wheels for python-mbedtls, which is required to install pyproject.toml-based projects
I know that this library uses the C lib mbedtls and I have no experience using C, or C libraries in my python code directly.
I have made sure to install the C/C++ build tools on my VSCode, and I'm using Python 3.10. I am completely lost on how to proceed

Visual C++ 2017 link error due to -Ot flag?

I am trying to get a Visual Studio 2017 project to link, but I'm stuck on the following linker error:
LINK : fatal error C1007: unrecognized flag '-Ot' in 'p2'
I've read questions on what the cause could be, but I couldn't come to a solution for my project.
The details are that, due to an external component we have no control over (component A), this Visual Studio 2017 project is forced to use the v14.13 version of the C++ toolchain, i.e. not the latest one (v14.14). However, the latest release of another external precompiled static lib we have no control over either (component B), is built with the v14.14 version (I checked via a dumpbin extract of the debug version of the lib). Switching my project over to the v14.14 toolchain indeed makes the link error go away on component B, but this unfortunately isn't a solution for me due to component A. Taking an earlier version of component B isn't desirable either, since we need the functionality in the latest release...
However, what strikes me, is that the /Ot ("optimize for speed") flag has been around since the middle ages... Why wouldn't v14.13 recognize it? Or is it just an (awkwardly manifested) matter of a mismatched obj file layout due to the version differences? And, probably related, what does the 'p2' stand for anyway?
Update
I've checked the linker output by using the /verbose flag, and all seems normal (3600 lines of Searching <lib>, Found <function>, Referenced in <obj> and Loaded <lib>).
Right up until the end that is, where I get the following 6 lines:
1> Searching C:\PathToExternalLib\TheirStatic.lib:
1> Found UsedFunctionName
1> Referenced in MyOwnStatic.lib(MyOwnCompileUnit.obj)
1>LINK : fatal error C1007: unrecognized flag '-Ot' in 'p2'
1>LINK : fatal error LNK1257: code generation failed
1>Done building project "MyProject.vcxproj" -- FAILED.
And that's that.
When visiting the command line setting of the link properties of the project, the only thing listed is (broken up in separate lines for convenience):
/OUT:"MyProject.dll"
/MANIFEST
/NXCOMPAT
/PDB:"MyProject.pdb"
/DYNAMICBASE "C:\PathToMyStatic.lib"
/IMPLIB:"MyProject.lib"
/DLL
/MACHINE:X64
/PGD:"MyProject.pgd"
/MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/ManifestFile:"MyProject.prm.intermediate.manifest"
/ERRORREPORT:PROMPT
/NOLOGO
/LIBPATH:"C:\PathToExternalStaticLib"
/LIBPATH:"C:\PathToAnotherExternalStaticLib"
/TLBID:1
So no trace of any -Ot flag there as well...?
I had this problem. LINK : fatal error C1007: unrecognized flag '-Ot' in 'p2'
while building a project with Visual Studio 2015.
I had to rebuild any library or sub library the project linked to which were built with Visual Studio 2017.
Once I rebuild the dependent libraries with Visual Studio 2015 the first project was able to link against them.
project
--------\
---------lib1(unable to rebuild lib1 until its dependencies were also rebuilt with VS2015
--------------\lib_linked_by_lib1_which_was_build_with_VS2017_and_had_to_be_rebuilt
--------------\another_lib_which_had_to_be_rebuilt_for_lib1_with_VS2015
--------\lib2
--------\lib3

Build message - Unknown compiler version, for dealii-4.8.1 library on visual studios

My build output gives many error messages of:
"Unknown compiler version - please run the configure tests and report the results"
...when attempting to build INSTALL for the dealii-8.4.1 library (open source, finite element library - graphics library) on Visual studios 14.0 (v 2015) c++.
A portion of the build is shown below.
Can anyone advise on what this means? and how to: "run the configure tests and report the results?" I Configured dealii-8.4.1 using cmake to start with.
Using deal.II on native Windows (dealii webpage and instructions)
https://github.com/dealii/dealii/wiki/Windows
PORTION OF BUILD OUTPUT on Visual Studios
44> vector_tools_point_value.cc
44> Unknown compiler version - please run the configure tests and report the results
44>C:\dealii-8.4.1\source\numerics\vector_tools_point_value.cc(22): fatal error C1083: Cannot open include file: 'vector_tools_point_value.inst': No such file or directory
44> vector_tools_point_gradient.cc
44> Unknown compiler version - please run the configure tests and report the results
44>C:\dealii-8.4.1\source\numerics\vector_tools_point_gradient.cc(22): fatal error C1083: Cannot open include file: 'vector_tools_point_gradient.inst': No such file or directory
44> vector_tools_project.cc
44> Unknown compiler version - please run the configure tests and report the results
44>C:\dealii-8.4.1\source\numerics\vector_tools_project.cc(22): fatal error C1083: Cannot open include file: 'vector_tools_project.inst': No such file or directory
44> vector_tools_rhs.cc
44> Unknown compiler version - please run the configure tests and report the results
44>C:\dealii-8.4.1\source\numerics\vector_tools_rhs.cc(83): fatal error C1083: Cannot open include file: 'vector_tools_rhs.inst': No such file or directory
The issue may be due to deal.II on native Windows, as for the windows version it states:
"Warning: please be aware that the following is experimental and you will likely encounter bugs in compilers and deal.II itself. Only continue if you are willing to experiment."
https://github.com/dealii/dealii/wiki/Windows
And: "deal.II is mostly developed on Linux using the GCC compiler."
http://www.dealii.org/8.4.1/readme.html
So it may be better to install Linux (Ubuntu) to see if that solves it.

LNK 1194 building node-ofe on windows7 with msbuild 14.0 (msvc 2015), node 6.5.0

I get this when I say
npm install ofe
LINK : fatal error LNK1194: cannot delay-load 'node.exe' due to import of data symbol '"__declspec(dllimport) const v8::OutputStream::`vftable'" (__imp_??_7OutputStream#v8##6B#)'; link without /DE
LAYLOAD:node.exe [C:\tmp\ofe\node_modules\ofe\build\ofe.vcxproj]
Any ideas how to fix this problem?

Missing variable FLTK_FLUID_EXECUTABLE

While compiling ITKSNAP using ITK,VTK and FLTK on my computer(Windows 7 and Microsft visual studio 2012) shows following error:
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
FLTK_FLUID_EXECUTABLE
CMake Error at CMakeLists.txt:570 (ITK_DISABLE_FLTK_GENERATED_WARNINGS):
Unknown CMake command "ITK_DISABLE_FLTK_GENERATED_WARNINGS".
I don't know how to link fluid executable.
Please suggest some solution.

Resources