Comments (4)
Ah, I've dug a bit more and realised this is the same issue as #115. Going to close this one as I've got more info there.
from go-rules.
Was about to open an issue for this too! Not sure if any of this helps but this is as far as I've got so far:
go build
supposedly handles this by dynamically emitting ago_asm.h
file- Bazel had a similar issue before: bazelbuild/rules_go#1262 but it looks like they fixed it by adding
-asmhdr <path to create go_asm.h>
togo tool compile
. - I followed https://maori.geek.nz/how-go-build-works-750bb2ba6d8e to see what happens when building klauspost/compress' example (zstd requires the
cpuinfo
pkg), but it looks like the generatedgo_asm.h
s are all empty anyway. So i've just done this as a really hacky workaround VJftw@40e82a2 which seems to work.
from go-rules.
Yeah I remember solving this issue for go_module now. go build
just does this:
go build -x github.com/klauspost/compress/internal/cpuinfo
WORK=/tmp/go-build4167323964
mkdir -p $WORK/b001/
cat >$WORK/b001/go_asm.h << 'EOF' # internal
please_go install
just does touch /home/jpoole/please-servers/plz-out/tmp/third_party/go/_zstd#a_rule._build/_work/third_party/go/zstd/internal/cpuinfo/go_asm.h
Do you want to open a PR with the fix then? I think that's good enough for almost all use cases it seems.
from go-rules.
Ah, I can see the tools update the file:
cat _work/third_party/go/zstd/internal/cpuinfo/go_asm.h
// generated by compile -asmhdr from package cpuinfo
I think it might emit things in that file on different platforms? Not sure. Seems like we just have to make sure the file is there though.
from go-rules.
Related Issues (20)
- go_repo duplicates subrepos when subrepo'ing another Please project HOT 1
- `go_repo` rules not correctly importing `google.golang.org/api` HOT 2
- `modinfo` not using Go tool as expected HOT 1
- Handle ${SRCDIR} in go_repo
- go-rules >= v1.7.0 breaks `plz query graph`
- Weird path issues from please_go install
- cgo_library adds -Wno-error
- Unbuildable: github.com/klauspost/pgzip HOT 2
- Invalid Go module version numbers in `go_mod_download` cause vulnerability scanner noise HOT 1
- Unbuildable: github.com/wailsapp/wails/v2/cmd/wails HOT 1
- Delve defined using go_repo cannot be used as DelveTool
- Move cgo_test to cgo.build_defs
- Config option for language version HOT 1
- please_go tool panics when no version is supplied HOT 1
- unknown directive: toolchain
- Cannot build github.com/go-llsqlite/crawshaw HOT 2
- `go.opentelemetry.io/otel` no longuer compiles in 16.2 but compiles in 15.2 HOT 2
- V2 HOT 1
- Upgrading from go_get: mage binary HOT 3
- Treating (a subset of) current repository as go_repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-rules.