Node module based on C++ - c++

I just wrote my own node module in C++ with the help of node-gyp. Now I have the following question.
If I want to publish my project now, what has to be in the package.json and can a user install my npm package if he has no Visual Studio (msbuild.exe) installed. Has he recompile it? And if yes, that doesn't really make sense. He should use the binaries only. But how can I achieve this?
Yeah, that are a lot of questions =)
FYI, here is my project: https://github.com/frankred/node-mouzy
Here is my package.json: https://github.com/frankred/node-mouzy/blob/master/package.json
Via the GIT-Repo I only can install the npm package with the following command:
npm install -S "git+https://github.com/frankred/node-mouzy.git"

Related

How to Install ONOS using Bazel in Ubuntu 20.04?

I have been trying to install ONOS using Bazel's new version i.e., Bazel-5.1.1 in Ubuntu 20.04 LTS for mininet/containernet. I have been having issues regarding Bazel build onos command. I have searched for the installation process all over and tried as well many. But have similar issues. Is there any link or article where there is a clear step-by-step procedure to do so? I am having a task for the installation which I need to finish in a week. Any help would be appreciated. Thanks in Advance.
The error I get:
sendate#sendate04:~/onos$ bazel build onos
ERROR: The project you're trying to build requires Bazel 3.7.2 (specified in /home/sendate/onos/.bazelversion), but it wasn't found in /home/sendate/.bazel/bin.
Bazel binaries for all official releases can be downloaded from here:
https://github.com/bazelbuild/bazel/releases
You can download the required version directly using this command:
(cd "/home/sendate/.bazel/bin" && curl -fLO https://releases.bazel.build/3.7.2/release/bazel-3.7.2-linux-x86_64 && chmod +x bazel-3.7.2-linux-x86_64)
I tried doing the steps given like downloading the same version and also tried to change the version in the .bazelversion file. But nothing succeeded in Bazel build.
1.bazel —-version
If you didn’t download bazel version 3.7.x download it. If you download java version 11.You need create java default symbolic link. It will be /bar/lib/jam. . Test echo $PATH it will give ONON path. Then run sudo apt install —-reinstall build-essential. Build onos

How to install Rasa Stack in Windows 10?

Maybe someone else asked the same question too. But this question is difficult. I tried everything. The place I am stuck is with installing dependencies. Some of the dependencies are old and not easily available. But I managed to install them.
The problems lies here.. There are dependencies that need to get the build from their source code. I already installed Visual C++ Build and MSMPI. Also installed HDF5 for H5PY but it doesn't let me build old versions of H5PY. So, I tried installing the latest version of H5PY but still, I am stuck at errors like file not found. Some of the files which the build process cannot find are "h5py/h5f.pyx", "mpi_c", "mpi.h". Solving error for one missing file leads to other and so on..
On trying hard to solve such errors and installing one or the other package to do the same task, I am tired up.. Something I found, at last, was that "mpi_c" file was replaced with some other file in newer versions of MPI4PY. But my dependencies depend on older version. I tried installing an older version of MPI4PY but HDF5 won't let me install that giving other errors. At last, I quit the task with my whole day wasted after this.
So can someone here please provide a step by step guideline for installing Rasa Stack on Windows Machine?
Windows 10 with Python 3.7.. Let me know if I need to downgrade python as well.. It was my first time building some project from source with python on windows. Thanks...
Please try the below steps to install Rasa:
Install Conda
Create a virtual environment:
conda create -n myenv python=3.5
Activate the virtual environment
conda activate myenv
pip install rasa_nlu rasa_core

vcpkg setup errors on command line

I am trying to compile dlib 19.4 using the vcpkg tool
since I am having trouble compiling CMAKE and working with Boost.Python
to fix compiler issues for dlib.
Though I am having problems even running the basic steps
to get the vcpkg package to work:
(I also downloaded Visual Studio 2017 for this tool)
Looking at executed command (git init), you initialized empty git repository for vcpkg - that is likely wrong. This bootstrap.ps1 script fails internally when trying to fetch existing revisions. vcpkg doesn't want to reside in just any git repository, it wants "its" git repository. vcpkg uses git as a distribution platform and later to perform updates.
So instead, you should clone vcpkg repository to some directory, e.g.:
C:\test>git clone https://github.com/Microsoft/vcpkg.git vcpkg_test
Cloning into 'vcpkg_test'...
...
Checking out files: 100% (876/876), done.
C:\test>cd vcpkg_test
C:\test\vcpkg_test>powershell -exec bypass scripts\bootstrap.ps1
https://github.com/Microsoft/vcpkg/
Additionally I see errors regarding VS2017 C++ support. VS2017 is an IDE with multiple optionally supported languages (i.e. you could have only C# support installed). Please make sure you have "Desktop development with C++" workload installed - as vcpkg is for C++. You can update the installation at any time by running installer again (Modify).
https://learn.microsoft.com/en-us/visualstudio/install/install-visual-studio

How to obtain an MRUnit 1.0.0-SNAPSHOT jar built using the hadoop1 classifier?

The latest release of MRUnit is 0.9. This release does not support DistributedCache.
This https://issues.apache.org/jira/browse/MRUNIT-98 shows that 1.0.0 supports DistributedCache. I want to get ahold of an MRUnit 1.0.0 jar that is built for hadoop1, but I cannot find one. So I tried to build it myself, but the required jars are missing from the maven repo.
Here is the command I'm using:
mvn package -DenvClassifier=hadoop1 -DspecificHadoopVersion=1.0.3
It fails with dependency errors. I can get ahold of the required jars manually, but I don't know how to get the build to use them.
How can I get ahold of the jar I want (either build it myself, or download it)?
I figured this out after I posted the question.
The answer is simple. Checkout the hadoop1 branch, and build that:
$ git checkout -b local/trunk-hadoop1 remotes/origin/trunk-hadoop1
$ mvn package

How to build google google-breakpad for windows?

I am trying to build google breakpad for windows. I don't get it. I tried installed autoconf and m4 for Windows which seems to work. But running
m4 CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ./configure
results in
func_dirname ()
{
# Extract subdirectory from the argument.
func_dirname_result=NONE:0: m4: ERROR: EOF in string
after some seconds of executing scripts.
I searched form visual studio solution files, but they have been removed since revision 581.
So i found the related post
How to build google breakpad.
But how do i install gyp? What prerequisites does it require?
Or does anybody have a working (VC2005) sln file for all parts of google-breakpad ?
Can anybody give me a step by step description on how to build it?
This is really poorly explained in the documentation, but actually gyp is already present if you've done an ordinary checkout of breakpad. Open a command prompt and place yourself in the root ( google-breakpad-read-only if you're going by the instructions ). Then just do:
src\tools\gyp\gyp.bat src\client\windows\breakpad_client.gyp
This will generate visual studio sln files for you.
The latest master of breakpad (March 15th 2016) does not include gyp, which is used to generate the solution files. The best thing to do would be to simply check it out and install it; gyp does, however, require Python 2.7 so make sure Python is accessible in the path.
git clone https://chromium.googlesource.com/external/gyp
cd gyp
python setup.py install
Now your gyp installation will work; simply invoke gyp.bat on src\client\windows\breakpad_client.gyp. (gyp is checked out one directory below breakpad in my case; change it accordingly to your setup)
..\gyp\gyp.bat src\client\windows\breakpad_client.gyp --no-circular-check
The solution files should now be present.