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

build.go has hardcoded paths for osx/darwin #133

Open
Radisovik opened this issue Jan 21, 2020 · 2 comments
Open

build.go has hardcoded paths for osx/darwin #133

Radisovik opened this issue Jan 21, 2020 · 2 comments

Comments

@Radisovik
Copy link

Is it intentional though? build.go has these two hardcoded paths for darwin:

// #cgo darwin CFLAGS: -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/openssl/include
// #cgo darwin LDFLAGS: -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto

Shouldn't it instead use pkg-config like windows and linux?

// #cgo linux darwin windows pkg-config: libssl libcrypto

@Rikkuru
Copy link

Rikkuru commented May 3, 2023

I think this would fix various problems on darwin issue

@Rikkuru
Copy link

Rikkuru commented May 3, 2023

#160

How about this ?

Tests work on macos with openssl & pkgconfig from homebrew with exception of TestGenerateEd25519 where Ed25519 is marshalled to PEM.

d.fedorova@d-fedorova openssl % PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3.1/lib/pkgconfig" go test ./...            
--- FAIL: TestGenerateEd25519 (0.00s)
    key_test.go:192: failed dumping private key
--- FAIL: TestMarshalEd25519 (0.00s)
    key_test.go:436: failed dumping private key
FAIL
FAIL	github.com/spacemonkeygo/openssl	3.217s
?   	github.com/spacemonkeygo/openssl/utils	[no test files]
FAIL

Another pull request says it can't be done and deletes this check from key_test.go

f5ecaf4#diff-8c1034328da97bb01b73d9ee0012aa03595841ddf1786805eee40b7ce333dadeR431

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