-
Notifications
You must be signed in to change notification settings - Fork 67
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
google-closure-compiler-linux
throwing Java exceptions.
#234
Comments
I've tried to reproduce this problem without success using a JS file I had hanging around. npx google-closure-compiler \
regex_test.js \
--language_in=ECMASCRIPT_2017 \
--language_out=ECMASCRIPT5 \
--compilation_level=SIMPLE_OPTIMIZATIONS \
--rewrite_polyfills=true \
--warning_level=QUIET \
--jscomp_off=checkVars \
--create_source_map test.sourcemap I got the output I expected. Here's relevant version information
|
I also started running to this today. I'm not on computer right now so can't check all the specs for you yet, but what I do notice right away is that, like OP, I'm also using Manjaro |
I'm also having the exact same issue, on ArchLinux (inside WSL). |
Since I was unable to reproduce this problem with the latest release, and I doubt any of my coworkers can either. |
Here is a single command that will reproduce the problem:
|
I've reproduced it also - you must specifically install $ npx google-closure-compiler to get the issue. This immediately reproduces the problem, though doesn't make clear what the failure actually was. Next I downloaded the actual executable from npmjs.com Untarred, this contains a file package/compiler.jar, which starts up correctly. In the debug logs for the failure above, I also found a different link, which better matches the issue's title: This apparently contains an x86 linux binary in package/compiler, according to https://www.npmjs.com/package/google-closure-compiler-linux this is a
Running this file is what results in the failure seen above. https://github.com/google/closure-compiler/#getting-started also references this binary distribution, as does https://www.npmjs.com/package/google-closure-compiler#user-content-native-binary-version. I don't know how to build this distribution from the git repo with bazel, so I'm limited to stopping there and letting someone else take a look as to why the copy at npmjs.com might be corrupt somehow. |
@ChadKillingsworth does this look like there's something wrong with the Graal build to you? |
I'm not sure. It could be. |
When I use |
Add the If we think it's Graal, we can use the nightly builds to find out when it was first introduced:
https://www.npmjs.com/package/google-closure-compiler (look at the versions tab) |
I created a minimal reproducible example of this using Docker: noppa/google-closure-compiler-npm-issue234-mre Everything works fine with Ubuntu as the base image, but fails with Arch Linux |
It's going to be challenging to figure out what is causing this. This feels less like an issue with the binary and more that a system library of some sort is missing. |
I tested an old version (2022-01-01) of google-closure-compiler and it still errored. I'm pretty sure I've successfully used a later version of the library on Arch so, like @ChadKillingsworth suspected, it's probably not an issue in a version of google-closure-compiler but rather the platform. So I did a little experiment with git bisect that uses Arch Linux Archive to install packages from an archive of a specific date between today and 2022-03-01. Turns out 2022-03-30 is the first date whose archives reproduce this error. Installing packages from 03-29 first and then upgrading to archives of 03-30 shows that the changed packages are (drum roll... 🥁)
Given that the error message is a ZipException, this seems like pretty damning evidence that one of these two package updates is the culprit. Zlib changelog is here and the libarchive release is here. Edit: Actually, there seems to already be several issues of the 1.2.12 build in zlib issues, both Java-related and not. |
Yeah, looks like it's probably madler/zlib#426 |
It looks more related to madler/zlib#613. Nice find btw. Since this is clearly not closure-compiler at this point, I'm going to close the issue. |
If any of the Arch users here want to get things working right away without waiting for the next release of zlib, you can manually rebuild the package with this zlib patch applied to it: git clone -b packages/zlib --depth 1 https://github.com/archlinux/svntogit-packages.git
cd svntogit-packages/trunk
curl -O https://github.com/madler/zlib/commit/ec3df00224d4b396e2ac6586ab5d25f673caa4c2.patch
curl -o- https://gist.githubusercontent.com/noppa/cb606d86b458ee30b7da8cd73c143a18/raw/6ac6e3faf12d06fc85bab105ade59c55214a76c0/zlib-PKGBUILD.patch | git apply
gpg --recv-key 783FCD8E58BCAFBA
makepkg --clean --syncdeps --rmdeps
sudo pacman -U zlib-1:1.2.12-1-x86_64.pkg.tar.zst After running these, google-closure-compiler should work normally again. |
Thank you all for your help. It is a problem with |
Executing the following command:
produces the following error statement:
I confirmed that the native compiler is executed in this case (from
google-closure-compiler-linux
package). Force refresh and reinstallation of modules doesn't fix the problem.Versions:
"20220202.0.0", "20220405.0.0"
Operating system:
Linux 5.10.105-1-MANJARO x86_64
Java version:
openjdk 11.0.14 2022-01-18
OpenJDK Runtime Environment Temurin-11.0.14+9 (build 11.0.14+9)
OpenJDK 64-Bit Server VM Temurin-11.0.14+9 (build 11.0.14+9, mixed mode)
The text was updated successfully, but these errors were encountered: