Igor L.
Igor L.

Reputation: 3445

Can't compile fabric on windows - missing ltdl.h

I am trying to build a chaincode using go build.

Environment:

When I run go build I get the following error:

# github.com/hyperledger/fabric/vendor/github.com/miekg/pkcs11
..\..\github.com\hyperledger\fabric\vendor\github.com\miekg\pkcs11\pkcs11.go:29:18: fatal error: ltdl.h: No such file or directory
compilation terminated.

I checked and my GCC installation does not contain the ltdl.h file in the include folder.

I found a SO post with a solution for Linux, but not one for Windows.

Can someone help?

Upvotes: 3

Views: 1085

Answers (2)

nilakantha singh deo
nilakantha singh deo

Reputation: 1006

Try running the following command

sudo apt install libtool libltdl-dev

Make sure go get -u github.com/hyperledger/fabric/core/chaincode/shim throws no error then go build it.

Upvotes: 0

deimus
deimus

Reputation: 9865

On windows you can build without PKCS

go build --tags nopkcs11

Upvotes: 4

Related Questions