Turns out that the native compiler 'compiler' is a UPX packed exe and
after unpacking it functions normally. Don't know enough about Maven
to figure out how to add an 'unpack' step, nor how to avoid updating
NPM package with each Maven run so after resorting to some crude
configuration hacks I'm able to successfully compile the client...
On Mon, 2023-11-20 at 22:00 -0500, Leslie Mann wrote:
> After a bit of digging I see that the closure compiler is using a
> 'native' program, "compiler", which is segfaulting. This results in
> an empty string being passed into JSON.parse()
>
> [INFO] SyntaxError: Unexpected end of JSON input
> [INFO] at JSON.parse (<anonymous>)
> [INFO] at ChildProcess.<anonymous> (/home/lmann/dev/guacamole-
> client/guacamole/src/main/frontend/node_modules/closure-webpack-
> plugin/src/closure-compiler-plugin.js:1007:34)
>
> Looks like the closure compiler can use Java or Javascript instead of
> native
>
> const ClosurePlugin = require('closure-webpack-plugin');
> module.exports = { optimization: { minimizer: [ new
> ClosurePlugin({mode: 'STANDARD'}, { // compiler flags here // // for
> debugging help, try these: // // formatting: 'PRETTY_PRINT' // debug:
> true, // renaming: false }) ] }
> };
>
> Options *
> platform - native, java or javascript. Controls which version to use
> of closure-compiler. By default the plugin will attempt to
> automatically choose the fastest option available.
> JAVASCRIPT does not require the JVM to be installed. Not all flags
> are supported.
> JAVA utilizes the jvm. Utilizes multiple threads for parsing and
> results in faster compilation for large builds.
> NATIVE only available on linux or MacOS. Faster compilation times
> without requiring a JVM.
>
> but I can't get either JAVA or JAVASCRIPT to work, for example:
>
> // Minify using Google Closure Compiler
> new ClosureWebpackPlugin({ mode: 'STANDARD'}, { platform: 'JAVA'}, {
>
> Anyone have suggestions on how to force the use of a Java compiler??
>
>
>
> On Mon, 2023-11-20 at 07:51 -0500, Leslie Mann wrote:
> > I'm building on x86_64 GNU/Linux:
> > Almalinux9 (binary compatible with RHEL)
> >
> > $ java -version
> > openjdk version "20.0.2" 2023-07-18
> > OpenJDK Runtime Environment (Red_Hat-20.0.2.0.9-1.rolling.el9)
> > (build 20.0.2+9)
> > OpenJDK 64-Bit Server VM (Red_Hat-20.0.2.0.9-1.rolling.el9) (build
> > 20.0.2+9, mixed mode, sharing)
> >
> > javac -version
> > javac 20.0.2
> >
> > $mvn -v
> > Apache Maven 3.6.3 (Red Hat 3.6.3-15)
> > Maven home: /usr/share/maven
> > Java version: 20.0.2, vendor: Red Hat, Inc., runtime:
> > /usr/lib/jvm/java-20-openjdk-20.0.2.0.9-1.rolling.el9.x86_64
> > Default locale: en, platform encoding: UTF-8
> > OS name: "linux", version: "5.14.0-362.8.1.el9_3.x86_64", arch:
> > "amd64", family: "unix"
> >
> >
> >
> > On Sun, 2023-11-19 at 21:27 -0800, Michael Jumper wrote:
> > > On 11/19/23 21:21, Leslie Mann wrote:
> > > > I'm trying to build guacamole-client 1.5.3 but the build fails
> > > > due to a
> > > > " SyntaxError: Unexpected end of JSON input" . Same error
> > > > occurs when I
> > > > try building the 1.5.2 client.
> > > >
> > > > Build system is AlmaLinux release 9.3. Am I missing some
> > > > programs
> > > > needed for the build? Build configuration change perhaps?
> > > >
> > >
> > > What architecture are you building on? IIRC, closure compiler has
> > > no ARM
> > > version available. The closure compiler webpack plugin might not
> > > be
> > > handling that kind of failure well.
> > >
> > > - Mike
> > >
> > > -----------------------------------------------------------------
> > > ----
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
> > >
> >
>