-
Notifications
You must be signed in to change notification settings - Fork 222
Labels
type: bugSomething isn't workingSomething isn't working
Description
Description
When using vendoring (go mod vendor) and then compiling dependencies, an error appears regarding missing .s files.
I'll demonstrate the compilation error using the gowaves project as an example.
When attempting to build the executable, the following error messages appear from the go compiler.
Go compiler output
# github.com/consensys/gnark-crypto/ecc/bls12-377/fp
vendor/github.com/consensys/gnark-crypto/ecc/bls12-377/fp/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_6w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bls12-381/fp
vendor/github.com/consensys/gnark-crypto/ecc/bls12-381/fp/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_6w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bls24-315/fp
vendor/github.com/consensys/gnark-crypto/ecc/bls24-315/fp/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_5w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bls24-317/fp
vendor/github.com/consensys/gnark-crypto/ecc/bls24-317/fp/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_5w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bn254/fp
vendor/github.com/consensys/gnark-crypto/ecc/bn254/fp/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_4w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bw6-633/fp
vendor/github.com/consensys/gnark-crypto/ecc/bw6-633/fp/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_10w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bw6-761/fp
vendor/github.com/consensys/gnark-crypto/ecc/bw6-761/fp/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_12w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bn254/fr
vendor/github.com/consensys/gnark-crypto/ecc/bn254/fr/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_4w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bls12-377/fr
vendor/github.com/consensys/gnark-crypto/ecc/bls12-377/fr/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_4w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bls12-381/fr
vendor/github.com/consensys/gnark-crypto/ecc/bls12-381/fr/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_4w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bls24-315/fr
vendor/github.com/consensys/gnark-crypto/ecc/bls24-315/fr/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_4w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bls24-317/fr
vendor/github.com/consensys/gnark-crypto/ecc/bls24-317/fr/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_4w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bw6-633/fr
vendor/github.com/consensys/gnark-crypto/ecc/bw6-633/fr/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_5w_amd64.s: no such file or directory
# github.com/consensys/gnark-crypto/ecc/bw6-761/fr
vendor/github.com/consensys/gnark-crypto/ecc/bw6-761/fr/element_amd64.s:10: #include: open /usr/local/opt/go/field/asm/element_6w_amd64.s: no such file or directory
The issue does not occur when vendoring is not used.
Expected Behavior
Successful compilation both with and without vendoring.
Actual Behavior
Compilation works fine without vendoring.
With go mod vendor compilation fails with the error described above.
Steps to Reproduce
- Clone gowaves
- Run
go get github.com/consensys/[email protected]in the project directory (it also updatesgnark-cryptoto0.15.0) - Run
go mod tidy && go mod vendorin the project directory - Run
make build-node-nativein the project directory which is equivalent togo build -o build/bin/native/node ./cmd/node - Observe the output
Context
Vendoring support is necessary for us in the gowaves project.
Your Environment
- gnark-crypto version used: 0.15.0
- go version (e.g. 1.20.6): go1.23.5 and go1.22.11
- Operating System and version: macOS 14.7.2 and ubuntu-24.04
alexeykiselev and banjostevegbotrel
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't workingSomething isn't working