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
Install fails on OpenBSD #3523
Comments
Downloading the binary directly doesn't work either - running it just returns WASM version works as a workaround. |
I see. I’m sorry to hear that. What processor are you using, and how did you install node? Another question: if you don’t mind, can you install the Go compiler and run this?
Basically I’m trying to determine if it’s an mis-configuration in the node package or if the Go compiler has a bug when targeting OpenBSD. In the second case, the “fix” for this would be to remove esbuild’s OpenBSD support (if it’s known to not work). I don’t have access to OpenBSD myself so I am unable to do engineering work to support OpenBSD. |
After putting the executable made from |
That sounds like it's not a problem with the Go compiler. Now I'm wondering if the esbuild executable that was installed is somehow different than what it should be. The executable that should have been installed is the one from $ curl -O https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3865k 100 3865k 0 0 6094k 0 --:--:-- --:--:-- --:--:-- 6154k
$ tar xf openbsd-x64-0.19.5.tgz
$ file package/bin/esbuild
package/bin/esbuild: ELF 64-bit LSB executable, x86-64, version 1 (OpenBSD), dynamically linked, interpreter /usr/libexec/ld.so, for OpenBSD, Go BuildID=XnYgCSarTaj8kE1lRO7g/qy62QapPhwD5Td3kJgqs/llvMaMNAk8T6HOVrNEL9/induGlCALmy2PktrMRA8, stripped
$ shasum package/bin/esbuild
b673cf4cb77cac0fa5e7662e6e5bf62396190fe8 package/bin/esbuild It would be very strange if that was different, since that's what npm should be downloading. Another thing to check is whether this is the same executable that the $ git clone https://github.com/evanw/esbuild
$ cd esbuild
$ git checkout v0.19.5
HEAD is now at a7fcc43f publish 0.19.5 to npm
$ CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 go build "-ldflags=-s -w" -trimpath ./cmd/esbuild
$ file ./esbuild
./esbuild: ELF 64-bit LSB executable, x86-64, version 1 (OpenBSD), dynamically linked, interpreter /usr/libexec/ld.so, for OpenBSD, Go BuildID=XnYgCSarTaj8kE1lRO7g/qy62QapPhwD5Td3kJgqs/llvMaMNAk8T6HOVrNEL9/induGlCALmy2PktrMRA8, stripped
$ shasum ./esbuild
b673cf4cb77cac0fa5e7662e6e5bf62396190fe8 ./esbuild It would also be very strange if that were different, or if that executable didn't run on your system (e.g. if |
Downloaded 0.19.5:
Built version (using v0.19.5 git tag):
Maybe the go compiler version is different, or there's an issue with cross-platform building? Since I'm building it on OpenBSD directly. |
Ah, sorry. The version of Go that esbuild 0.19.5 used was Go 1.20.10, not 1.21.1. |
You'll need a go compiler with https://go-review.googlesource.com/c/go/+/568435 to be able to build OpenBSD binaries that will run on recent intel CPUs. It hasn't landed upstream yet, but has been in the version in OpenBSD packages for a while now. |
Using OpenBSD 7.4, latest patches installed.
package.json
has"esbuild": "^0.19.5"
.The text was updated successfully, but these errors were encountered: