Matt created GUACAMOLE-1828:
-------------------------------
Summary: Ubuntu 22.04 build issues with deprecation
Key: GUACAMOLE-1828
URL: https://issues.apache.org/jira/browse/GUACAMOLE-1828
Project: Guacamole
Issue Type: Bug
Components: guacamole
Affects Versions: 1.5.2
Reporter: Matt
I'm running into an issue with compilation on a Ubuntu 22.04 system. Starting
from a fresh system, this is my build process....
{code:java}
apt update && apt upgrade -y && apt install -y libcairo2-dev libjpeg-turbo8-dev
libpng-dev libtool-bin uuid-dev libvncclient1 freerdp2-dev libssh2-1-dev
libtelnet-dev libtelnet2 ffmpeg libavcodec-dev libavformat-dev libavutil-dev
libswscale-dev libvncserver-dev libwebsockets-dev libpulse-dev libssl-dev
libvorbis-dev libwebp-dev libpango1.0-dev wget build-essential maven
libjavacc-maven-plugin-java libmaven-javadoc-plugin-java openjdk-19-jdk-headless
wget -O guac-server.tar.gz
https://apache.org/dyn/closer.lua/guacamole/1.5.2/source/guacamole-server-1.5.2.tar.gz?action=download
tar -zxvf guac-server.tar.gz
cd guacamole-server-1.5.2 ./configure --with-systemd-dir=/lib/systemd/system/
make
make install
systemctl daemon-reload
systemctl enable --now guacdcd
wget -O guac-client.tar.gz
https://apache.org/dyn/closer.lua/guacamole/1.5.2/source/guacamole-client-1.5.2.tar.gz?action=download
tar -zxvf guac-client.tar.gz
cd guacamole-client-1.5.2/
cat << EOL > ~/.mavenrc
export JAVA_HOME=/usr/lib/jvm/java-19-openjdk-amd64
EOL
mvn package
{code}
This works most of the way through the build process but then stop and produces
this output:
{code:java}
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ guacamole ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 189 source files to
/root/guacamole-client-1.5.2/guacamole/target/classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING]
/root/guacamole-client-1.5.2/guacamole/src/main/java/org/apache/guacamole/extension/DirectoryClassLoader.java:[27,20]
[removal] AccessController in java.security has been deprecated and marked for
removal
[WARNING]
/root/guacamole-client-1.5.2/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionClassLoader.java:[32,20]
[removal] AccessController in java.security has been deprecated and marked for
removal
[WARNING]
/root/guacamole-client-1.5.2/guacamole/src/main/java/org/apache/guacamole/extension/DirectoryClassLoader.java:[62,19]
[removal] AccessController in java.security has been deprecated and marked for
removal
[WARNING]
/root/guacamole-client-1.5.2/guacamole/src/main/java/org/apache/guacamole/extension/ExtensionClassLoader.java:[111,19]
[removal] AccessController in java.security has been deprecated and marked for
removal
[INFO] 4 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] error: warnings found and -Werror specified
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for guacamole-client 1.5.2:
[INFO]
[INFO] guacamole-client ................................... SUCCESS [ 8.450 s]
[INFO] guacamole-common ................................... SUCCESS [ 21.450 s]
[INFO] guacamole-ext ...................................... SUCCESS [ 29.944 s]
[INFO] guacamole-common-js ................................ SUCCESS [ 21.187 s]
[INFO] guacamole .......................................... FAILURE [01:41 min]
[INFO] extensions ......................................... SKIPPED
[INFO] guacamole-auth-duo ................................. SKIPPED
[INFO] guacamole-auth-header .............................. SKIPPED
[INFO] guacamole-auth-jdbc ................................ SKIPPED
[INFO] guacamole-auth-jdbc-base ........................... SKIPPED
[INFO] guacamole-auth-jdbc-mysql .......................... SKIPPED
[INFO] guacamole-auth-jdbc-postgresql ..................... SKIPPED
[INFO] guacamole-auth-jdbc-sqlserver ...................... SKIPPED
[INFO] guacamole-auth-jdbc-dist ........................... SKIPPED
[INFO] guacamole-auth-json ................................ SKIPPED
[INFO] guacamole-auth-ldap ................................ SKIPPED
[INFO] guacamole-auth-quickconnect ........................ SKIPPED
[INFO] guacamole-auth-sso ................................. SKIPPED
[INFO] guacamole-auth-sso-base ............................ SKIPPED
[INFO] guacamole-auth-sso-cas ............................. SKIPPED
[INFO] guacamole-auth-sso-openid .......................... SKIPPED
[INFO] guacamole-auth-sso-saml ............................ SKIPPED
[INFO] guacamole-auth-sso-dist ............................ SKIPPED
[INFO] guacamole-auth-totp ................................ SKIPPED
[INFO] guacamole-history-recording-storage ................ SKIPPED
[INFO] guacamole-vault .................................... SKIPPED
[INFO] guacamole-vault-base ............................... SKIPPED
[INFO] guacamole-vault-ksm ................................ SKIPPED
[INFO] guacamole-vault-dist ............................... SKIPPED
[INFO] guacamole-example .................................. SKIPPED
[INFO] guacamole-playback-example ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:03 min
[INFO] Finished at: 2023-07-04T13:34:46Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile)
on project guacamole: Compilation failure
[ERROR] error: warnings found and -Werror specified
[ERROR]
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile)
on project guacamole: Compilation failure
error: warnings found and -Werror specified at
org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:81)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke
(DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:578)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch
(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main
(Launcher.java:347)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException:
Compilation failure
error: warnings found and -Werror specified at
org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute
(AbstractCompilerMojo.java:1220)
at org.apache.maven.plugin.compiler.CompilerMojo.execute
(CompilerMojo.java:187)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo
(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject
(LifecycleModuleBuilder.java:81)
at
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke
(DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:578)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
(Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch
(Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
(Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main
(Launcher.java:347)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :guacamole
{code}
I'm assuming the AccessController being deprecated is the issue. If I'm going
about this wrong, please let me know. First time trying to get this project
rolling.
Thanks for any help in advance!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)