microsoft / go-crypto-openssl

Go crypto backend for Linux using OpenSSL
MIT License
55 stars 14 forks source link

Difficulty building the library #41

Open Smoderin opened 1 year ago

Smoderin commented 1 year ago

I am trying to use the library in my project, the folder structure looks roughly like this:

crypto/
├── main.go
├── go-crypto-openssl
   ├── ....h
   ├── ....c 
   ├── ....go
   └── ...._test.go

When trying to run tests from inside the library package, everything works fine, but when i try to build from inside my project and execute it, it fails with a SIGSEG.

I tried to see what's going on with gdb, it looks like i am missing the cgo types definitions for some reason:

(r1=<optimized out>) at _cgo_gotypes.go:1018
1018    _cgo_gotypes.go: No such file or directory.

Any idea on how to resolve this? (i am not that familiar with the workings of cgo)

dagood commented 1 year ago

@qmuntal is more of a cgo expert than me, but I think these questions will help get this going: