saml icon indicating copy to clipboard operation
saml copied to clipboard

'pkg-config' is not recognized as an internal or external command

Open ghost opened this issue 9 years ago • 7 comments

When trying to clone this repository on System running Windows 10 64-bit, the following error is thrown...

'pkg-config' is not recognized as an internal or external command,
operable program or batch file.

ghost avatar Dec 16 '16 16:12 ghost

we have a dependency of github.com/crewjam/go-xmlsec which in turn has a dependency on libxmlsec and libxml2. I'm not 100% sure the best way to make that happen on windows, but I'm not surprised it doesn't work out of the box.

crewjam avatar Dec 17 '16 14:12 crewjam

@crewjam It may be worth mentioning then this package is targeted for unix systems only? Is that accurate?

ghost avatar Dec 19 '16 19:12 ghost

Targeted at unix? I suppose so. I've never tried on Windows.

I don't really know much about how cgo packages ought to work on Windows. It is almost certainly possible to build, but it probably takes some twiddling. If you, or anyone, is motivated to give it a try, I'd be most grateful.

crewjam avatar Dec 20 '16 00:12 crewjam

Could this library be helpful? https://github.com/ma314smith/signedxml

dhoelle avatar Dec 21 '16 03:12 dhoelle

@crewjam I'll give it a shot and link a readme of how I did it or something ;)

ghost avatar Dec 21 '16 18:12 ghost

@crewjam I did the following to get this to properly work-at least on Windows 10 64-bit (markdown doesn't recognize FTP links so I had to put then as text)

  1. Go to the offical xmlsec site (ftp://ftp.zlatkovic.com/libxml/)
  2. depending on your distribution
    • 32-bit (ftp://ftp.zlatkovic.com/libxml/libxmlsec-1.2.18.win32.zip)
    • 64-bit (ftp://ftp.zlatkovic.com/libxml/64bit/xmlsec1-1.2.20-win32-x86_64.7z)
  3. Extract files
    • 32-bit C;\Program Files (x86)\xmlsec1
    • 64-bit C:\Program Files\xmlsec1
  4. Add the extracted xmlsec1\bin folder to %PATH% instructions
  5. open a cmd prompt and type xmlsec1
  6. if you receive no error message then it's working

ghost avatar Dec 21 '16 19:12 ghost

I'm intrigued by @dhoelle 's suggestion. I'm pretty sure this library didn't exist (or if it did, I couldn't find it) when I wrote go-xmlsec. I think a native go implementation of the signature verification required is vastly superior to what we are doing now. I've created issue #37 to track that.

Our dependency on the native libraries is a pain to support, as this issue illustrates.

crewjam avatar Dec 21 '16 20:12 crewjam