influxdata / influxdata/influxdb

Unable to build influx DB library on OSx

Open
#24,367 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

__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/influxdata/influxql v1.1.1-0.20230421033731-802555d6b3a3
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/flux@v0.194.3"}
finding module {"modfile": "[module github.com/influxdata/flux]"}
Flux module is the main module {"modroot": "/Users/kobigana/go/pkg/mod/github.com/influxdata/flux@v0.194.3"}
Executing cargo build {"dir": "/Users/kobigana/Library/Caches/go-build/pkgconfig/github.com/influxdata/flux@v0.194.3/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/flux@v0.194.3/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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Go build of github.com/influxdata/influxdb v1.11.1 and the generated Flux dependency, then inspect flux/src/lib.rs around the fluxcore imports and public re-export. Reproduce the failure on macOS with the reported Go versions and verify that the Flux library builds without the Rust compiler errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, rust
Domain
build-system, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.