I have protoc --version:
libprotoc 3.12.4
But locate libprotbuf:
locate libprotobuf
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.a
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.23
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.23.0.4
/usr/lib/x86_64-linux-gnu/libprotobuf.a
/usr/lib/x86_64-linux-gnu/libprotobuf.so
/usr/lib/x86_64-linux-gnu/libprotobuf.so.23
/usr/lib/x86_64-linux-gnu/libprotobuf.so.23.0.4
I am confused here, how to check if 23 == 3.12??
The number after the library name is called SOVERSION, which stands for shared object version. It is changed when incompatible changes are made to the library.
For the protobuf 3.x series, SOVERSION equals 11 + x, as defined in update_version.py.
Protobuf 3.12 should therefore be libprotobuf.so.23, like you have.
Another way is to check PROTOBUF_VERSION define in Makefile.am of the specific version. In GitHub you can select the version tag from the dropdown menu at the top.
Related
I am trying to include this package in my project: https://github.com/0xProject/0x-mesh/tags
Here the versions are clearly specified as v11.2.0, v11.1.0 and so on.
However when I am trying to go get it, I get this error:
bash$ go get github.com/0xProject/0x-mesh#v11.2.0
go get: github.com/0xProject/0x-mesh#v11.2.0: invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v11
Why is this happening? There are tags with 11.2.0 and Releases too. So, why not?
The maximum version I can get with go get is v7.1.0-beta+incompatible, it works fine, but above v7 I can't, why is that? Also, is there a clear list on Github that would indicate which versions can be go get-ted and which can't?
When including packages to the project, it is based on the version at pkg.go.dev. The package version Version: v1.0.7. Check it out:
pkg.go.dev/github.com/0xProject/0x-mesh
I need a pre build project and I need a version of protoc-gen-go v1.25.0-devel but I am unable to find command etc to install It , till now I tried to do something like this :
go get -u google.golang.org/protobuf/cmd/protoc-gen-go#v1.25.0-devel
and I am getting this ERROR invalid version: unknown revision cmd/protoc-gen-go/v1.25.0-devel
Is there any way to get this version ?
If you're following this post to create a sample service, you don't need the specific version 1.25.0-devel that appears in the generated files. You should use the latest stable version (currently v1.26.0). Since it is an minor version upgrade, there should be no breaking changes between versions. One thing that you may need to make the examples in the post to work is that you should set the package for the generated code. You can set it in the .proto file as an option, for example option go_package = grpc-example/generated/protos/calc or as a command line argument for the protoc command, for example protoc ...OTHER_OPTS --go_opt=Mprotos/calc.proto=grpc-example/generated/protos/calc.
If you are sure that you absolutely need the specific version v1.25.0-devel you can install the plugin pointing to a specific commit (as that version is not currently available as a tag/branch name). If you're using go 1.16.x you can use go install google.golang.org/grpc/cmd/protoc-gen-go-grpc#a9513eb pointing at this commit. For older go versions, use go get
In my go.mod, I have:
...
require (
...
sigs.k8s.io/controller-runtime v0.2.0-alpha.0
)
and for some reason, when I save my files, my go.sum gets updated to include:
sigs.k8s.io/controller-runtime v0.2.0-alpha.0 h1:WM6lus3SNU4SsMlDYvjJ5fyLsG9nW3ffb/4/FpE2ZGrtnc=
sigs.k8s.io/controller-runtime v0.2.0-alpha.0/go.mod h1:HFAsYoOh6XMV+jKF1rsUjFwrknPbowfyHEHH5fRdJMf2jMX8=
sigs.k8s.io/controller-runtime v0.6.3 h1:SBbr+inLPEKhrf87vlJtrvDcwIpm+uhDvp63Bl72xYJtoOE=
sigs.k8s.io/controller-runtime v0.6.3/go.mod h1:WlZNXcMs40++oyaQt4B7Cs2lEE5JYRs8vJUznj4aRP4N4JpdAY=
The first 2, I understand why they are there. However, why does the latest version (0.6.3) of the package also appear all of a sudden?
When I run, go mod tidy, I get errors suggesting that 2 files in my codebase point to packages in the latest version (0.6.3) of this package. What can I do to strictly use the 0.2.2 version in go modules + in my codebase?
go mod tidy:
<filename here> imports
sigs.k8s.io/controller-runtime/pkg/webhook/admission/builder: module sigs.k8s.io/controller-runtime#latest found (v0.6.3), but does not contain package sigs.k8s.io/controller-runtime/pkg/webhook/admission/builder
v0.2.0-alpha.0 appears to already be the version that your module is using, so you don't need to do anything to “force” it. (The version of the go command that you are using may be erroneously saving the go.sum file before it errors out. If that reproduces with the latest version — currently go1.16rc1 — please file an issue, with steps to reproduce it, at https://golang.org/issue/new .)
The error message is telling you that the go command is looking for a missing package (sigs.k8s.io/controller-runtime/pkg/webhook/admission/builder).
It is checking in the latest version of the modules that may contain that package, but the latest version (which is v0.6.3, whereas your module requires v0.2.0-alpha.0) still does not contain that package.
So the go command is telling you, essentially: “I am missing the package sigs.k8s.io/controller-runtime/pkg/webhook/admission/builder, and I cannot fix it by upgrading because v0.6.3 does not contain that package either”.
I'm trying to install the ghc-mod library on Windows. Using stack install ghc-mod shows this lengthy error message:
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for ghc-mod-5.8.0.0:
Cabal-2.4.1.0 from stack configuration does not match >=1.18 && <1.25 (latest matching version is 1.24.2.0)
base-4.12.0.0 from stack configuration does not match >=4.6.0.1 && <4.10 (latest matching version is 4.9.1.0)
cabal-helper must match <0.8 && >=0.7.3.0, but the stack configuration has no specified version (latest matching
version is 0.7.3.0)
djinn-ghc must match <0.1 && >=0.0.2.2, but the stack configuration has no specified version (latest matching
version is 0.0.2.3)
extra-1.6.17 from stack configuration does not match <1.6 && >=1.4 (latest matching version is 1.5.3)
ghc-8.6.5 from stack configuration does not match >=7.6 && <8.2
ghc-syb-utils must match <0.3 && >=0.2.3, but the stack configuration has no specified version (latest matching
version is 0.2.3.3)
haskell-src-exts-1.20.3 from stack configuration does not match <1.20 && >=1.18 (latest matching version is 1.19.1) hlint-2.1.11 from stack configuration does not match <2.1 && >=2.0.8 (latest matching version is 2.0.15)
monad-journal-0.8.1 from stack configuration does not match <0.8 && >=0.4 (latest matching version is 0.7.2)
optparse-applicative-0.14.3.0 from stack configuration does not match >=0.13.0.0 && <0.14 (latest matching version
is 0.13.2.0)
temporary-1.3 from stack configuration does not match <1.3 && >=1.2.0.3 (latest matching version is 1.2.1.1)
needed since ghc-mod is a build target.
Some different approaches to resolving this:
* Build requires unattainable version of base. Since base is a part of GHC, you most likely need to use a different
GHC version with the matching base.
Apparently, I need to change the version of ghc, but my version is higher than the one required, so updating doesn't help. Should I downgrade? How to do it without messing up the rest of my ghc ecosystem?
Using cabal to install it gives similar results.
Sorry, but you can't do this unless you are willing to downgrade to GHC 8.0. Note in the dependencies list it says ghc (>=7.6 && <8.2). There is no GHC 8.1 (odd numbers are for testing), so its back to GHC 8.0.
Stackage provides a curated list of package versions which are known to compile together, along with a version of GHC. Each Long Term Support (LTS) is a specific set of these versions. As you can see from the list posted by Damián Rafael Lattenero that means going back to LTS-9.21.
The problem is that ghc-mod uses GHC as a library as well as a compiler, so it is very sensitive to the version, and you have to use the same version of the compiler for both ghc-mod and the software you are developing; having got a working version of ghc-mod you can't just switch to a later version of GHC for your own program.
Assuming you still want to do this, get stack installed. Then edit your ~/.stack/config.yaml file (on Windows type stack path --stack-root to find where this is stored). Change it to say resolver: lts-9.21. Then say stack install ghc-mod.
In stackage you can find all the LTS versions and all the possible releases you can download:
and here is the list of all the dependencies you need for ghc-mod:
You need to check that you don't have any outdated or unmatched.
What is the Protobuf version required for the Model user?
AcumosError: A failure occurred while generating source code from protobuf: b'MMGfiPybWYusryVpTePnBbAVjcGAasJx/model.proto:1:10: Unrecognized syntax identifier "proto3". This parser only recognizes "proto2".\n'
Acumos requires Google protocol buffer compiler version 3 or later. The latest is 3.6.1, binaries and source are available from https://github.com/protocolbuffers/protobuf/releases/tag/v3.6.1
My machine happily runs this:
$ protoc --version
libprotoc 3.5.1
P.s. I wish the person who posted -1 on your question would leave a comment about why the downvote seemed appropriate. :/