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

PKG_CONFIG_PATH in go bindings #3159

Open
markus2330 opened this issue Nov 5, 2019 · 10 comments
Assignees

Comments

@markus2330
Copy link
Contributor

@markus2330 markus2330 commented Nov 5, 2019

> dpkg -L libelektra-dev | grep pc                                                                                                                                                  /usr/lib/x86_64-linux-gnu/pkgconfig/elektra-codegen.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/elektra-highlevel.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/elektra-io.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/elektra-notification.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/elektra.pc
> PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig go test -run "^(TestKeySetMemory)\$"   
 can't load package: package github.com/ElektraInitiative/go-elektra: unknown import path "github.com/ElektraInitiative/go-elektra": cannot find module providing package github.com/ElektraInitiative/go-elektra
@markus2330

This comment has been minimized.

Copy link
Contributor Author

@markus2330 markus2330 commented Nov 5, 2019

Why do I need this PKG_CONFIG_PATH at all? IIRC I did not provide it the last time running the tests.

@raphi011

This comment has been minimized.

Copy link
Contributor

@raphi011 raphi011 commented Nov 5, 2019

You may not need this env var if the package config path is already set.

Are you in the ./kdb subdirectory of go-elektra?

You could also try to run the command with GO111MODULE=on

@markus2330

This comment has been minimized.

Copy link
Contributor Author

@markus2330 markus2330 commented Nov 5, 2019

No, I was not in the kdb subdirectory. Then I get:

# go.libelektra.org/kdb_test [go.libelektra.org/kdb.test]
./kdb_test.go:128:13: undefined: errors.Is
FAIL    go.libelektra.org/kdb [build failed]

Can you add in README.md about how to execute TestKeySetMemory? Is it disabled by default?

@raphi011

This comment has been minimized.

Copy link
Contributor

@raphi011 raphi011 commented Nov 5, 2019

You need go v1.13

@markus2330

This comment has been minimized.

Copy link
Contributor Author

@markus2330 markus2330 commented Nov 6, 2019

In Debian stable (buster) is only golang 1.11~1. Which features require a newer go?

@raphi011

This comment has been minimized.

Copy link
Contributor

@raphi011 raphi011 commented Nov 6, 2019

The errors package

@markus2330

This comment has been minimized.

Copy link
Contributor Author

@markus2330 markus2330 commented Nov 6, 2019

What exactly does the errors package provide that it is worth this limitation? In general it is good if the bindings have as little deps as possible.

@raphi011

This comment has been minimized.

Copy link
Contributor

@raphi011 raphi011 commented Nov 6, 2019

That's why I upgraded to go 1.13 - because I wanted no external dependencies and the new version added a useful errors package.

@markus2330

This comment has been minimized.

Copy link
Contributor Author

@markus2330 markus2330 commented Nov 6, 2019

Ok, sounds like a good idea then. How can I get go 1.13 in Debian Buster (and also for our Docker images)?

@raphi011

This comment has been minimized.

Copy link
Contributor

@raphi011 raphi011 commented Nov 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.