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

Unable to build influx DB library on OSx #24367

Open
Shnitzelil opened this issue Sep 13, 2023 · 8 comments
Open

Unable to build influx DB library on OSx #24367

Shnitzelil opened this issue Sep 13, 2023 · 8 comments

Comments

@Shnitzelil
Copy link

Steps to reproduce:
List the minimal actions needed to reproduce the behavior.

  1. Build any program that use github.com/influxdata/influxdb v1.11.1 on OSx
  2. The library process start to run but fails

Expected behavior:
Complete the build process successfully

Actual behavior:

go: downloading github.com/google/flatbuffers v23.5.26+incompatible
go build github.com/influxdata/flux/libflux/go/libflux:
# pkg-config --cflags  -- flux
Started pkg-config	{"arg0": "/Users/kobigana/go/bin/pkg-config", "args": ["--cflags", "--", "flux"]}
Found pkg-config executable	{"path": "/usr/local/bin/pkg-config"}
Determined module root	{"path": "/Users/kobigana/go/pkg/mod/github.com/influxdata/[email protected]"}
finding module	{"modfile": "[module github.com/influxdata/flux]"}
Flux module is the main module	{"modroot": "/Users/kobigana/go/pkg/mod/github.com/influxdata/[email protected]"}
Executing cargo build	{"dir": "/Users/kobigana/Library/Caches/go-build/pkgconfig/github.com/influxdata/[email protected]/libflux", "target": "x86_64-apple-darwin"}
warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
   Compiling flux v0.154.0 (/Users/kobigana/Library/Caches/go-build/pkgconfig/github.com/influxdata/[email protected]/libflux/flux)
error: private item shadows public glob re-export
  --> flux/src/lib.rs:12:16
   |
12 | use fluxcore::{Database, Flux};
   |                ^^^^^^^^
   |
note: the name `Database` in the type namespace is supposed to be publicly re-exported here
  --> flux/src/lib.rs:16:46
   |
16 | pub use fluxcore::{ast, formatter, semantic, *};
   |                                              ^
note: but the private item here shadows it
  --> flux/src/lib.rs:12:16
   |
12 | use fluxcore::{Database, Flux};
   |                ^^^^^^^^
note: the lint level is defined here
  --> flux/src/lib.rs:1:38
   |
1  | #![cfg_attr(feature = "strict", deny(warnings, missing_docs))]
   |                                      ^^^^^^^^
   = note: `#[deny(hidden_glob_reexports)]` implied by `#[deny(warnings)]`
error: private item shadows public glob re-export
  --> flux/src/lib.rs:12:26
   |
12 | use fluxcore::{Database, Flux};
   |                          ^^^^
   |
note: the name `Flux` in the type namespace is supposed to be publicly re-exported here
  --> flux/src/lib.rs:16:46
   |
16 | pub use fluxcore::{ast, formatter, semantic, *};
   |                                              ^
note: but the private item here shadows it
  --> flux/src/lib.rs:12:26
   |
12 | use fluxcore::{Database, Flux};

   |                          ^^^^
error: could not compile `flux` (lib) due to 2 previous errors
Error installing library	{"name": "flux", "error": "exit status 101"}
pkg-config: exit status 1

Environment info:
MacBook Pro (OSx version: 13.5.1) Golang 1.20.5 and also 1.21.1

I saw the same issue hre NixOS/nixpkgs#253877

@Antiz96
Copy link

Antiz96 commented Sep 13, 2023

Same issue on Arch Linux:

@loqs
Copy link

loqs commented Sep 16, 2023

@Marwes the rust warning relating to the Database private import https://github.com/influxdata/flux/blob/726bf0653f99083a7486fc00a2be6abc3f859050/libflux/flux/src/lib.rs#L12 was introduced by
influxdata/flux@114647d could you please take a look into this?

@Shnitzelil
Copy link
Author

Is there a workaround? I cannot use the library...

@loqs
Copy link

loqs commented Sep 20, 2023

@Shnitzelil install rustup, downgrade rust or patch flux and have influx use that patched flux see 1.

@chenrui333
Copy link

essentially the same issue as influxdata/kapacitor#2769

@Shnitzelil
Copy link
Author

Hi,
Any updates for this?

@chenrui333
Copy link

this should be the fix, influxdata/kapacitor#2811

@loqs
Copy link

loqs commented Apr 9, 2024

How does that resolve the shadowing?

Edit:
Answering my own question the shadowing was fixed in influxdata/flux@8d1d6c8 and influxdata/kapacitor#2811 updates flux to v0.194.5 containing that commit while v0.191.0 as suggested as the fix in influxdata/kapacitor#2769 does not.

3688c45 updated flux to v0.194.5, so the issue was fixed in v2.7.5.

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

4 participants