IBM Blockchain platform cannot rebuild native dependencies - visual-studio-code

I trying to get the IBM Blockchain platform to work in Visual studio code (on Linux), but it keeps coming back with:
Could not rebuild native dependencies Failed to execute command "npm" with arguments
"rebuild, grpc, --target=6.1.5, --runtime=electron, --update-binary, --fallback-to-build, --
target_arch=x64, --dist-url=https://atom.io/download/electron" return code 1. Please ensure
that you have node and npm installed
I have node and npm installed
node -v
v10.17.0
and
npm -v
6.11.3
satisfying the constraints. I have visual studio code version 1.41.1. What could be thie issue?

The problem you are experiencing is described in this issue https://github.com/IBM-Blockchain/blockchain-vscode-extension/issues/1621
The issue is that there are no pre-built versions of grpc used by the fabric node sdk for electron 6 currently and due to changes in newer versions of gcc the grpc node module fails to compile when it falls back to using source because of no pre-built versions
The easiest solution is to downgrade for vscode 1.39 and install the extension.
Alternative options are to install gcc version 7 and make that the default in your linux environment or you could install a version of linux that has gcc version 7 as the default for example ubuntu 18.04 (which would allow grpc to compile from source)

Related

Installing librdkafka on Ubuntu 19.10

I am trying to build two different applications that both depend on librdkafka. The applications are written in .NET Core and Go.
I have installed the confluent platform using apt, and installed it from the confluent repository. I assume that installing this platform includes librdkafka (and makes it available for .NET and> GO packages).
When i try to build either, i receive two different errors.
For the Go app:
# pkg-config --cflags -- rdkafka
Package rdkafka was not found in the pkg-config search path.
Perhaps you should add the directory containing `rdkafka.pc'
to the PKG_CONFIG_PATH environment variable
No package 'rdkafka' found
pkg-config: exit status 1
For the .NET Core app:
System.DllNotFoundException : Failed to load the librdkafka native library.
Stack Trace:
at Confluent.Kafka.Impl.Librdkafka.Initialize(String userSpecifiedPath)
at Confluent.Kafka.Producer`2..ctor(ProducerBuilder`2 builder)
at Confluent.Kafka.ProducerBuilder`2.Build()
Are there any subsequent steps one has to take after installing the confluent platform, to make librdkafka available for applications?

How snapcraft nodejs plugin handle the Node.js environment when you create an app snap for different OS?

I'm try to understand how the nodejs plugin i'm using to create snap node.js app handle the Node.js environment ? Example in this application :
parts:
webserver:
source: .
plugin: nodejs
nodejs-version: "12.13.1"
nodejs-package-manager: "yarn"
nodejs-yarn-version: "v1.21.1"
I'm defining to use Node.js v12.13.1 and Yarn v1.21.1 lunching the snapcraft commands:
snapcraft clean
snapcraft --debug
snap install my-snap-file.snap --dangerous
Now i'm able to run the command/service on my machine (amd64 Ubuntu 16.04 LTS) with Node.js v12.2.0 installed but i cant find the node.js env not in multipass instance not in another machine with installed Ubuntu Core 18, i mean i can't run command as node --version and so on and even the snap app doesn't work neither command neither service.
Other problem i've discovered digging in the Ubuntu Core 18 env installed on RaspBerry Pi3 is : When i've installed my snap with nodejs app in the folder /snap//bin i cannot run the ./node exec ! i get the error :
./node: 1: ./node: Syntax error: "(" unexpected
My questions are :
Why i get the ./node error ?
my-snap-file.snap bundle the Node.js v12.3.1 inside the mysnap ?
how i can test the node.js is working with the right version in multipass and other machine where i've installed only the snap bundling node.js ?
THks
Thanks to forum.snapcraft.io i've solved the issue ... i'm posting here to help people to solve these kind of issues too. This error is due to the snap that is NOT build on the actual target architecture you want to run it on. Make sure you build eg. armhf (raspberry pi3) actually on an armhf architecture device.
architectures:
- build-on: amd64
run-on: [amd64, armhf]
here you tell snapcraft that building on amd64 produces binary snaps that can run on amd64 and armhf … which is indeed not true (since building on amd64 will pull in only amd64 binaries). i’d drop that statement completely and make sure to build the armhf version on an armhf device (or on build.snapcraft.io). (Credits Ogra)
Read the Link about architectures in snapcraft.yaml
https://forum.snapcraft.io/t/architectures/4972

Migration from wxWidgets 3.1.3 to wxWidgets 2.8.12 - wx-config isn't generated

I am using centOS 8 and trying to install pgAgent in version 3.4.0 on my server.
What I have done so far:
Successfully installed cmake, cpack, ctest, wxWidgets-3.1.3, wxGTK-2.8.12.
Uninstalled wxWidgets-3.1.3 by using 'make uninstall' after applying 'make install'.
Deleted wx-config, wxrc, wxrc-3.1 from /usr/local/bin/.
Installed wxWidgets-2.8.12 by using 'make install', and 'sudo ldconfig' has been applied.
Current status:
pgAgent cannot be installed and returns "No wxWidgets installation could be found."
wxWidgets-2.8.12 cannot be installed with cmake as it is "not in CMakeLists.txt".
"wx-config --version" is not found and the file wx-config is not created when wxWidgets-2.8.12 is installed. (This is also true before the deletion of wx-config, as the old config for version 3.1.3 remains and no 2.9 config file appears during installation.
Desired result: Get pgAgent installed.
PS. Some website suggests me to "completely uninstall" the old wxWidgets and then install the new one, which I don't understand how to achieve that. (The official website said I should uninstall it in the way I install it, which does not modify wx-config.)

How to deploy a package in another operating system

I have a project written in C++ 14 (compiled in my machine with GCC 6.2) and my machine run on Fedora 26. Now I need to deploy into customer's server that run RedHat 6, and GCC 4.8. I can not change or install new things in this server (except my package). But this server doesn't contain 2 package that required to my project is numactl and hwloc.
If I build these library as static library and import into my project (in Fedora 26), then package these library with my project into a RPM package, will it run on the server.
Is it the best way? I never do this work before.
I'm sorry for my English.
You need to build your package for RedHat 6. Create source rpm (src.rpm) and run:
mock -r epel-6-x86_64 your-package.src.rpm
This way you will get package which can be installed on RHEL6.

Error F_SETLK when building bazel on CentOS 6.5

I am working on building and installing tensorflow on my institution's cluster computer, which is running CentOS 6.5.
Obviously, the first step is building and installing bazel. The build works just fine, but when I try to run the bazel binary, I get the following error:
Error: unexpected result from F_SETLK: Function not implemented
gcc version is 4.7.2
java version is jdk1.8.0_65
edit: I have also tried compiling gcc 4.9.4 and building with this version, and I have tried building both the latest dist of bazel, and the 0.3.1 from the git repo. All variants get the same error.
This happens if the filesystem where Bazel tries to install itself (unpack its embedded tools) doesn't support locking.
Workaround (until the relevant issue is resolved) is to specify a path on a local, writable (and file-lockable) filesystem for --output_user_root, for example:
bazel --output_user_root=/usr/local/$USER/bazelout build <targets>