Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficulty building the library #41

Open
Smoderin opened this issue Oct 9, 2022 · 1 comment
Open

Difficulty building the library #41

Smoderin opened this issue Oct 9, 2022 · 1 comment

Comments

@Smoderin
Copy link

Smoderin commented Oct 9, 2022

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
Copy link
Member

dagood commented Oct 10, 2022

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

  • Can you show the output of go env so we can get an idea of what OS/ARCH/Go version you're using?
  • What command do you run to build your project?
  • Why are you copying the library's source code into your project?
    • This is a little unusual: normally you'd have your Go module depend on this one (github.com/microsoft/go-crypto-openssl/openssl), and use go mod vendor if you need to store the source code locally. This makes it easier to update and keep track of your dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants