Unable to build flux repl in WSL - read-eval-print-loop

I am trying to build the flux repl into wsl in Window 10
I followed the instructions as per the repo (https://github.com/influxdata/flux/#requirements)
When I run the build command
$ go build ./cmd/flux
I get an error
# pkg-config --cflags -- flux
Package flux was not found in the pkg-config search path.
Perhaps you should add the directory containing `flux.pc'
to the PKG_CONFIG_PATH environment variable
No package 'flux' found
pkg-config: exit status 1
I couldn't find a flux.pc in the repo.
How do I fix it?

After search I needed to run the following command before building.
export PKG_CONFIG=./pkg-config.sh

Related

exec: "gcc": executable file not found in %PATH%

I'm trying to start writing code in Golang. Whenever I try to run my code or build it I get the following error.
github.com/ethereum/go-ethereum/crypto/secp256k1
cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%
I'm using windows so I followed some steps from a previous problem and installed TDM-GCC. Inside the files in the bin folder there is a gcc.exe file that should be fixing my issue.
In my path variables and also my system variables I've added C:\TDM-GCC-64\bin and I'm still getting the error. I've also restarted my pc to make sure the environment variables were updated.
Anyone have any idea how I could fix this?
It seems like it's asking for the gcc to be installed. Try install GCC by downloading and installing it from (https://gcc.gnu.org/install/index.html) . Once GCC is installed, you should be able to build and run your code without any issues.

Golang testing with dynamic linking for Kafka on M1 chip

I'm trying to write some unit tests for a poc I'm doing in Golang / Kafka on a new M1 Mac. I'm using the official Golang Kafka libs from confluent:
"github.com/confluentinc/confluent-kafka-go/kafka"
Apparently, this package has a dependency on a librdkafka which is not built for M1 (yet?). For the build, there is a work around here, which goes something like this:
% brew install librdkafka openssl zstd
% PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#3/lib/pkgconfig"
% go build -tags dynamic *yadda yadda yadda*
This is fine for build/run. Unfortunately, it doesn't seem to work for tests. In the link describing the workaround, using go test -tags dynamic ./... seems to work, but in my case the test run doesn't seem to read the exported PKG_CONFIG_PATH:
% go test -tags dynamic ./... -v
# pkg-config --cflags -- rdkafka
Package libcrypto was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcrypto.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libcrypto', required by 'rdkafka', not found
pkg-config: exit status 1
FAIL smartAC/shared [build failed]
Even though that env var is set, at least in my shell:
% echo $PKG_CONFIG_PATH
/opt/homebrew/opt/openssl#3/lib/pkgconfig
Is there some trick to get go test tool to see the env var?
Ok, never mind. I sorted this... in my ~/.zshrc I wasn't exporting the PKG_CONFIG_PATH, so I changed this:
PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#3/lib/pkgconfig"
to this:
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl#3/lib/pkgconfig"
Which seems to work. Leaving the question up, just in case it might help some other noob like me :-).

Error in pkg-config when try to download git repository

I was trying to make a facial recognition app using Go and Kagami/go-face repository. It requires dlib-models. And I was used MSYS tool for get the distribution in windows.
But when I try to get the go repository using go get github.com/Kagami/go-face command and it gives an error:
# pkg-config --cflags -- dlib-1
Any one had this issue before in windows 10.
As commented, the README lists the Windows pre-requisites, involving MSYS2.
This was from commit 968bbf9, following issue 5 "Windows support?"
Another approach would be to use Docker, with an Ubuntu image, which would come with dlib, where you can add Go and experiment there.
I also faced the same problem. pkg-config.exe will be found in the path:
C:\msys64\mingw64\bin
if you installed MSYS2 on default path. Export
C:\msys64\mingw64\bin
this path to environment variable then you wont get that error.

Error when i running the application hyperledger fabric

I'm following this tutorial:
https://github.com/ITPeople-Blockchain/auction
and at the step: "Build peer and Orderer binaries and Start Orderer",
at the command: make native
I recived following error:
Makefile:71: *** "No go in PATH: Check dependencies". Arresto.
I'm using Ubuntu on VirtualBox and I set the gopath correctly
GOPATH may be right, but that's not what the error refers to - it's saying that the go command is not in your PATH. You need to add GOROOT/bin to your PATH.
go path is not set.
find installed directory of go lang. (e.g linux )
whereis go
then export below var.
export GOPATH=$HOME/go export PATH=$PATH:$GOPATH/bin
these exported variable scope is limited to current terminal only so better to set into file ~/.bashrc
I'm following this tutorial: https://github.com/ITPeople-Blockchain/auction and at the step: "Build peer and Orderer binaries and Start Orderer", at the command: make native
The repository mentioned above has been updated about 2 months ago, while while you'd better try to follow more recently updated: Get Started.
Makefile:71: *** "No go in PATH: Check dependencies". Arresto.
Also note that ^^^ error actually tells you are missing go binary from your PATH. Check you have configured GOPATH, GOROOT and make sure go binary accessible within PATH.

Error in installation of caffe on fedora 21

I have tried to build caffe for python on my fedora 21(without GPU) for quite some time with no success. Can someone please help me on this?
Few of the commands that I have executed are:
git clone git://github.com/xianyi/OpenBLAS
cd OpenBLAS
make FC=gfortran
make PREFIX=/opt/openblas/ install
make clean
make all
On running the 'make all' command I get the result as shown on the terminal screen.
But OpenBLAS seems to be present at location /opt/openblas and I found cblas.h file at /opt/openblas/include. Then why do I get such an error?
To try to fix this, I added the following lines to my ~/.bashrc file:
export LD_LIBRARY_PATH=$HOME/opt/openblas/lib\:$LD_LIBRARY_PATH
export INCLUDE=$HOME/opt/openblas/include\:$INCLUDE
I also executed the following on the terminal and got the output as below,
[root#parags-pc Parag]# echo $PATH
/opt/openblas/bin:/bin:/usr/local/bin
Note: I have also installed atlas. But nothing has come to my rescue.
What am I missing here?
Edit Make.config file to reflect the changes. You will find a flag to select the BLAS library, set its value as 'open'. Then uncomment the library path and include path and reflect the correct values for those variables.

Resources