i m getting below error while running learn-chaincode example on my local system please provide me the suitable solution for the mentioned error
$ go build
# github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11
exec: "gcc": executable file not found in %PATH%
Looks like the Fabric team introduced "nopkcs11" tag to bypass the problem - https://jira.hyperledger.org/browse/FAB-2854
I used the following command to build my chain code:
go build -tags nopkcs11
My understanding is that the Learn Chaincode example from https://github.com/IBM-Blockchain/learn-chaincode was being followed. Note that this example is for use with Hyperledger Fabric version 0.6.
The message is related to a PKCS11 package that is referenced by the example. This PKCS package requires a gcc compiler in order to build. I would suggest obtaining a gcc compiler and then trying to build the example again.
Related
I attempted to check the version of my go executable with go version on an Ubuntu machine, however I got the following error:
No version set for command go
Consider adding one of the following versions in your config file at
golang 1.16.8
golang 1.17.1
How do I resolve this? I have no prior experience with config file, I searched on google but I found nothing which could solve this issue.
That seems to be an error message from asdf-vm/asdf, a tool which manages multiple runtime versions with a single CLI tool, extendable via plugins.
You can see that error message in asdf-vm/asdf issue 838.
The config file should be in $HOME/.tool-versions
To resolve this, as in this example:
asdf plugin add go
asdf install go latest
Trying to build go application using bazel. It fails due to multiple packages and source files present within the application.
OS: Mac OS (High Sierra)
Bazel version : 0.11.1 (homebrew)
Go rules: 0.11.0
Defined local_repository in WORKSPACE to get external dependencies
Running following command
bazel build //go-app
leads to error
Action failed to execute: java.io.IOException: Cannot run program
"/usr/bin/sandbox-exec" (in directory
"/TEMP_DIR/PATH"):
error=7, Argument list too long
Target //go-app:go-app failed to build
I came across https://docs.bazel.build/versions/master/skylark/lib/Args.html#use_param_file and thought it would fix my issue. Could anyone point me in the direction of how and where to implement this in my BUILD file and make it work? Thanks.
I think it's not in your BUILD file but rather in rules_go.
I'd recommend opening them an issue since AFAIK this is something the rule implementation needs to support.
For example in rules_scala we write the arguments to a file and then pass that file to the worker exactly like how you mention above.
https://github.com/bazelbuild/rules_scala/blob/master/scala/private/rule_impls.bzl#L274
I'm trying to setup chaincode environment and start learning to develop chaincode, I followed the setup steps here and tested my setup environment as mentioned here
When I'm trying to add the Hyperledger shim to my environment (as explained here ), I'm getting the following error :
package google/protobuf: unrecognized import path "google/protobuf"
I've protobuf installed. The protoc --version command gives me libprotoc 2.6.1 as output. Can anyone tell me where I'm going wrong.
The instructions for establishing a development environment that were cited in the original question are pretty clear that Go 1.6 or above is a prerequisite. Upgrading to 1.6.2, per #jimb comment above resolved the issue.
I have access to a large IBM Power8 machine (running Ubuntu), and would like to build Bazel on it. However, when I try to do it as their installation instructions suggest, I get:
me#machine:~/bazel-0.1.5$ ./compile.sh
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO: ./compile.sh compile /path/to/bazel
🍃 Building Bazel from scratch.
Compiling Java stubs for protocol buffers...
third_party/protobuf/protoc-linux-x86_32.exe -Isrc/main/protobuf/ --java_out=/tmp/bazel.T9C83cNa/src src/main/protobuf/android_studio_ide_info.proto
scripts/bootstrap/buildenv.sh: line 63: third_party/protobuf/protoc-linux-x86_32.exe: cannot execute binary file: Exec format error
pv#sardonis:~/bazel-0.1.5$ ^C
Clearly, part of the problem is the compiler trying the 32-bit compiler. I tried the following things to no avail.
Replacing the third_party/protobuf/protoc-linux-x86_32.exe by a copy of third_party/protobuf/protoc-linux-x86_64.exe. This gave the same error.
Replacing third_party/protobuf/protoc-linux-x86_32.exe by a symbolic link to /usr/local/bin/protoc, which came with my distribution (this is version libprotoc 3.0.0 according to protoc --version). However, this gave a large amount of errors: http://pastebin.com/HN0MQiC4
Following the instructions on http://www.cnblogs.com/rodenpark/p/5007744.html to compile Protobuf from source and then building Bazel with the modifications on http://www.cnblogs.com/rodenpark/p/5007846.html but this resulted in a similar large amount of errors: http://pastebin.com/KjkseaGx for reference.
So, I'm out of inspiration. How can I compile Bazel on the IBM Power8 machines?
(PS: I've posted this as a part of resolving installing TensorFlow on the IBM power8, so it's not a duplicate question, just one aspect in order to solve it stepwise.)
The version of protobuf you're using must match the protobuf runtime that is checked in. In this case, that's protobuf-java-3.0.0-beta-1.jar [1], so you have to use the compiler version 3.0.0-beta-1.
(I work on Bazel.)
[1] https://github.com/bazelbuild/bazel/tree/master/third_party/protobuf
I am following the doc (http://mesos.apache.org/gettingstarted/) and trying to install Mesos on my mac. When I try to configure it, it gives me the error:
checking python extra linking flags... -u _PyMac_Error Python.framework/Versions/2.7/Python
checking consistency of all components of python development environment... no
configure: error: in `/Users/syang/Desktop/git/mesos/build':
configure: error:
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure,
via the LDFLAGS environment variable.
Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib"
============================================================================
ERROR!
You probably have to install the development version of the Python package
for your distribution. The exact name of this package varies among them.
============================================================================
I use Python 2.7.8 and I am trying to install Mesos 0.23.0. I did some search, it looks like after installing command tools using xcode, the linking problem should get handled. However, it doesn't look like that to me. Is there anyone who has similar experience and can help me?
Thank you.
The easiest way of running Mesos on local machine is to use https://github.com/bobrik/mesos-compose (Docker) or https://github.com/mesosphere/playa-mesos (Vagrant)
There are a bit different when build it in OSX. You could use "brew install mesos" to install it directly. https://github.com/Homebrew/homebrew/tree/master/Library/Formula/mesos.rb also show how to build mesos in osx.
I dont know if you have resolved this issue but for future reference I would like to suggest the below steps based on this blog http://gwikis.blogspot.com/2015/08/building-mesos-0230-on-os-x-yosemite.html
$ cd mesos-0.x./build/
$ PYTHON=/usr/bin/python ../configure
Moreover in case that you receive any errors like libapr-1 is required for mesos to build. or libsubversion-1 is required for mesos to build. then you could do the following, assuming that apr and subversion libs are installed with brew.
$ PYTHON=/usr/bin/python ../configure -with-svn=/usr/local/Cellar/subversion/1.8.13/ -with-apr=/usr/local/Cellar/apr/1.5.2/libexec/
To verify why the Python path is not correct and the compile fails in the first place please go once through the blogpost.