Build issues on Ubuntu 16.04, 17.10 and 18.04-daily inside Docker

Karl-Philipp Richter krichter at posteo.de
Wed Dec 6 09:43:56 UTC 2017


Hi,
I'm experiencing the following issues when building OpenJFX following
https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX inside
Ubuntu Docker images `ubuntu:[version]`  which are official and as empty
as possible. Afaik the build instructions or the supported list of OS is
quite old (only Ubuntu LTS version 14.04 and 16.04 are still supported
and up-to-date 17.10 and 18.04-daily are left out of the picture). My
motivation here is to improve the build process of OpenJFX, but not only
me alone. You might have you own CI, but in case you agree that the
following are real issues, I can only recommend GitLab CI (your own
instance or the one at gitlab.com) which allows to test whether build
instructions are working on any docker image you can image and can be
used parallel to existing infrastructure. I used it now to allow you to
reproduce the issues as easily as possible:

For `ubuntu:14.04` and `ubuntu:16.04` I get:

    [ant:taskdef] Could not load definitions from resource
com/sun/javafx/tools/ant/antlib.xml. It could not be found.
    :apps:appsJarLinux FAILED

    FAILURE: Build failed with an exception.

    * Where:
    Build file '/builds/krichter/openjfx-8u-dev-rt/build.gradle' line: 3241

    * What went wrong:
    Execution failed for task ':apps:appsJarLinux'.
    > The following error occurred while executing this line:
      /builds/krichter/openjfx-8u-dev-rt/apps/samples/build.xml:14: The
following error occurred while executing this line:

/builds/krichter/openjfx-8u-dev-rt/apps/samples/Ensemble8/build.xml:158:
Problem: failed to create task or type
javafx:com.sun.javafx.tools.ant:application
      Cause: The name is undefined.
      Action: Check the spelling.
      Action: Check that any custom tasks/types have been declared.
      Action: Check that any <presetdef>/<macrodef> declarations have
taken place.
      No types or tasks have been defined in this namespace yet

For `ubuntu:17.10` and `ubuntu:18.04` I get:


:fxpackager:compileLinuxLibrary/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/LinuxPlatform.cpp:130:9:
warning: invalid suffix on literal; C++11 requires a space between
literal and string macro [-Wliteral-suffix]
             "jre/lib/"JAVAARCH"/client/libjvm.so";
             ^

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/LinuxPlatform.cpp:134:13:
warning: invalid suffix on literal; C++11 requires a space between
literal and string macro [-Wliteral-suffix]
                 "jre/lib/"JAVAARCH"/server/libjvm.so";
                 ^

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/LinuxPlatform.cpp:139:13:
warning: invalid suffix on literal; C++11 requires a space between
literal and string macro [-Wliteral-suffix]
                 "lib/"JAVAARCH"/server/libjvm.so";
                 ^

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/LinuxPlatform.cpp:144:13:
warning: invalid suffix on literal; C++11 requires a space between
literal and string macro [-Wliteral-suffix]
                 "lib/"JAVAARCH"/server/libjvm.so";
                 ^

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/LinuxPlatform.cpp:189:16:
warning: invalid suffix on literal; C++11 requires a space between
literal and string macro [-Wliteral-suffix]
                 _T("/lib/"JAVAARCH"/client/libjvm.so");
                    ^

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/LinuxPlatform.cpp:193:20:
warning: invalid suffix on literal; C++11 requires a space between
literal and string macro [-Wliteral-suffix]
                     _T("/lib/"JAVAARCH"/server/libjvm.so");
                        ^

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp:
In member function 'virtual bool PosixProcess::Wait()':

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp:235:5:
error: 'wait' was not declared in this scope
         wait();
         ^~~~

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/PosixPlatform.cpp:235:5:
note: suggested alternative: 'Wait'
         wait();
         ^~~~
         Wait

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/Java.cpp:
In destructor 'JavaClass::~JavaClass()':

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/Java.cpp:237:46:
warning: throw will always call terminate() [-Wterminate]
             throw JavaException(FEnv, _T("Error"));
                                                  ^

/builds/krichter/openjfx-8u-dev-rt/modules/fxpackager/src/main/native/library/common/Java.cpp:237:46:
note: in C++11 destructors default to noexcept
     FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':fxpackager:compileLinuxLibrary'.
    > Could not call NativeCompileTask.compile() on task
':fxpackager:compileLinuxLibrary'

Details and complete build logs can be found at
https://gitlab.com/krichter/openjfx-8u-dev-rt/pipelines/14781176. The
build script `.gitlab-ci.yml` contains the commands used to build.

-Kalle



More information about the openjfx-dev mailing list