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

Viewed 980

I am trying to build a chaincode using go build.

Environment:

  • installed go 1.8.3 windows/amd
  • Windows 10

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?

2 Answers

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.

Related