Re: Gradle build, one step forward, two backward :)

2013-07-09 Thread Mario Torre
On Mon, 2013-07-08 at 09:09 -0700, Richard Bair wrote:

Hi Richard,

> You are on Linux I'm guessing (educated guess). The open source linux
> implementation was I believe just barely pushed. Which repo are you
> building from (master or graphics)?

Ouch, sorry I didn't say that... Yes, working on Linux. Actually, RHEL
6.4, but I'm able to build with Closed JDK so I doubt the actual release
is important.

I'm building from the master repository. I'll give a shot at graphics
too later.

> Ah. OK. The problem here is that a couple of the modules require the
> plugin.jar because of JSObject.java. Possibly if we move the file from
> web module to base (or graphics module) then we wouldn't need this
> dependency. If you edit build.gradle and comment out the plugin
> dependency and do a build, you should see where the build failures
> occur.

Ok, I'll try to do that later and get back to you.

Regarding JSObject, is this netscape.javascript.JSObject? [1]

Upstream OpenJDK doesn't ship with this, but OpenJDK does have an open
plugin options (not just in Linux distribution, apparently this works at
least on Window too). It's called IcedTea-web.

IcedTea-web is kind of separate from OpenJDK, but it comes with a
plugin.jar that is installed in /usr/share/icedtea-web/plugin.jar (not
sure if this path is the same for all Linux distributions btw).

With Oracle also shipping a "server" JDK now (which is very similar to
what we do since ever, just make the plugin optional), it may make sense
to try to pass this file as we do for the others (JDK, closed jfxt
stubs, etc..), via some variable rather than assuming is there.

> I did a search and see JSObject.java in two places, web and graphics
> modules. Yikes.

Time for some refactoring I guess :)

> > 5. *** Running OpenJDK with closed jfxrt.jar ***
> > 
> > This is even nicer:
> 
> This happens if the native libraries cannot be found. They need to be
> located relative to the jfxrt.jar that you are using. How are you
> running this application?
> 
I just put the jfxrt.jar in the classpath and run via Eclipse. I also
copied it in the ext directory of my OpenJDK 8 installation. I though
the .so files where actually embedded in the jfxrt.jar?

Maybe I need to copy them as well or something?

> Actually I think we should start here with just a fully open build.
> Anything using media will fail at runtime, but we should still be able
> to compile and I think the native font stuff for linux is out there,
> along with build changes by Peter to support fully open builds of web
> view. I'm going to fire up a new VM with a completely clean Ubuntu
> system and try building with OpenJDK so I can follow along.

Yes, I also think that having a build is the first step, we can progress
from that point on.

How's going with it? Were you able to reproduce the build errors?

Cheers,
Mario

[1]
https://developer.mozilla.org/en-US/docs/LiveConnect/LiveConnect_Reference/JSObject



RE: Gradle build, one step forward, two backward :)

2013-07-08 Thread John Smith
> I did a search and see JSObject.java in two places, web and graphics modules. 
> Yikes.

A related jira issue is => 
https://javafx-jira.kenai.com/browse/RT-30622  Not able to resolve 
JSObject.getWindow(this) in a java applet project
Caused by a mismatch between the JSObject code included in the plugin and in 
JavaFX.



Re: Gradle build, one step forward, two backward :)

2013-07-08 Thread Danno Ferrin
On Mon, Jul 8, 2013 at 10:09 AM, Richard Bair wrote:
>
> > 4. ***  OpenJDK with just created open jfxrt.jar ***
> >
> > Well, you guessed this fails too... I wonder how the iOS people got
> > their code working at all... Is there any secret repository you guys are
> > using?
>
> Probably the same issue as #3? The iOS folks are skipping media & web I
> believe.
>

 The "secret" backport repository I am maintaing is
https://bitbucket.org/narya/jfx78 (contributors welcome)

Once the build stabilizes I intend to sync up at the weekly master pushes
and possibly publish artifacts somewhere from that.  but right now I am
doing stuff as time allows.  Summers have actually less free time than the
school year surprisingly.


Re: Gradle build, one step forward, two backward :)

2013-07-08 Thread Richard Bair
> Caused by: java.lang.NullPointerException
>   at
> com.sun.javafx.font.PrismFontLoader.loadFont(PrismFontLoader.java:220)
>   at javafx.scene.text.Font.(Font.java:318)
>   at javafx.scene.text.Font.getDefault(Font.java:85)
>   at javafx.scene.CssStyleHelper.(CssStyleHelper.java:1329)
> 
> :(
> 
> Was't the font code open sourced?

You are on Linux I'm guessing (educated guess). The open source linux 
implementation was I believe just barely pushed. Which repo are you building 
from (master or graphics)?

> 2. ***  OpenJDK with closed jfxrt.jar ***
> 
> The OpenJDK build fails before getting anywhere, which is very
> surprising to me:
> 
> JAVA_HOME=/open/jdk-8/
> BINARY_STUB=/closed/jdk-8-ea-96/jre/lib/ext/jfxrt.jar
> 
> [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on
> artifact cache (/home/neugens/.gradle/caches/artifacts-23).
> [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]
> Finished executing task ':graphics:compileJava'
> [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with
> an exception.
> * What went wrong:
> Could not resolve all dependencies for configuration
> ':graphics:compile'.
>> Could not find :plugin:.
> Required by: rt:graphics:unspecified
> * Exception is:
> org.gradle.api.artifacts.ResolveException: Could not resolve all
> dependencies for configuration ':graphics:compile'.
> at
> org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:52)
> at
> org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.rethrowFailure(DefaultResolvedConfiguration.java:36)
> 
> Any help here would be great... I don't see why OpenJDK is not able to
> build OpenJFX, even having the closed jar in the path.

Ah. OK. The problem here is that a couple of the modules require the plugin.jar 
because of JSObject.java. Possibly if we move the file from web module to base 
(or graphics module) then we wouldn't need this dependency. If you edit 
build.gradle and comment out the plugin dependency and do a build, you should 
see where the build failures occur.

I did a search and see JSObject.java in two places, web and graphics modules. 
Yikes.

> 3. *** Closed JDK with openjfxrt.jar ***
> 
> This fails. I expected this, but the build goes very far it seems:
> 
> public final class AudioClipBuilder implements
> javafx.util.Builder
> [...]
> 
> symbol:   class WebEvent
> location: class WebEngineBuilder
> error: cannot find symbol
> […]

I guess this is looking for media files. When they are open sourced hopefully 
this will work.

> 4. ***  OpenJDK with just created open jfxrt.jar ***
> 
> Well, you guessed this fails too... I wonder how the iOS people got
> their code working at all... Is there any secret repository you guys are
> using?

Probably the same issue as #3? The iOS folks are skipping media & web I believe.

> 5. *** Running OpenJDK with closed jfxrt.jar ***
> 
> This is even nicer:
> 
> Graphics Device initialization failed for :  es2, sw
> Error initializing QuantumRenderer: no suitable pipeline found
> java.lang.RuntimeException: java.lang.RuntimeException: Error
> initializing QuantumRenderer: no suitable pipeline found
> [...]
> Caused by: java.lang.RuntimeException: No toolkit found
>   at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:213)
>   at
> com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:181)
>   at
> com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:637)
>   at
> com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:345)
>   at
> com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:304)

This happens if the native libraries cannot be found. They need to be located 
relative to the jfxrt.jar that you are using. How are you running this 
application?

> I think the OpenJDK build (2.) and running closed jfrt.jar + OpenJDK
> (5.) are the most serious issues at the moment.
> 
> I remember that running closed jfx with OpenJDK used to work, but maybe
> I'm wrong.
> 
> Any plans to address that, or hints where I can start looking to help
> out?

Actually I think we should start here with just a fully open build. Anything 
using media will fail at runtime, but we should still be able to compile and I 
think the native font stuff for linux is out there, along with build changes by 
Peter to support fully open builds of web view. I'm going to fire up a new VM 
with a completely clean Ubuntu system and try building with OpenJDK so I can 
follow along.

Richard

Gradle build, one step forward, two backward :)

2013-07-08 Thread Mario Torre
Hi all!

I tried to compile JavaFX with the gradle build, and here are my
results, with different settings:

 1. *** Closed Everything ***

JAVA_HOME=/closed/jdk-8-ea-96/
BINARY_STUB=/closed/jdk-8-ea-96/jre/lib/ext/jfxrt.jar

[neugens@galactica rt]$ gradle jfxrt
> Loading
...

:jfxrtLinux
:jfxrt

BUILD SUCCESSFUL

Running an Hello World with the same configuration, but removing the
closed jfxrt.jar still fails:

Caused by: java.lang.NullPointerException
at
com.sun.javafx.font.PrismFontLoader.loadFont(PrismFontLoader.java:220)
at javafx.scene.text.Font.(Font.java:318)
at javafx.scene.text.Font.getDefault(Font.java:85)
at javafx.scene.CssStyleHelper.(CssStyleHelper.java:1329)

:(

Was't the font code open sourced?


 2. ***  OpenJDK with closed jfxrt.jar ***

The OpenJDK build fails before getting anywhere, which is very
surprising to me:

JAVA_HOME=/open/jdk-8/
BINARY_STUB=/closed/jdk-8-ea-96/jre/lib/ext/jfxrt.jar

[org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on
artifact cache (/home/neugens/.gradle/caches/artifacts-23).
[org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]
Finished executing task ':graphics:compileJava'
[ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with
an exception.
* What went wrong:
Could not resolve all dependencies for configuration
':graphics:compile'.
> Could not find :plugin:.
Required by: rt:graphics:unspecified
* Exception is:
org.gradle.api.artifacts.ResolveException: Could not resolve all
dependencies for configuration ':graphics:compile'.
at
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:52)
at
org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.rethrowFailure(DefaultResolvedConfiguration.java:36)

Any help here would be great... I don't see why OpenJDK is not able to
build OpenJFX, even having the closed jar in the path.

3. *** Closed JDK with openjfxrt.jar ***

This fails. I expected this, but the build goes very far it seems:

public final class AudioClipBuilder implements
javafx.util.Builder
[...]

symbol:   class WebEvent
location: class WebEngineBuilder
error: cannot find symbol
[...]

4. ***  OpenJDK with just created open jfxrt.jar ***

Well, you guessed this fails too... I wonder how the iOS people got
their code working at all... Is there any secret repository you guys are
using?

5. *** Running OpenJDK with closed jfxrt.jar ***

This is even nicer:

Graphics Device initialization failed for :  es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error
initializing QuantumRenderer: no suitable pipeline found
[...]
Caused by: java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:213)
at
com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:181)
at
com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:637)
at
com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:345)
at
com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:304)

I think the OpenJDK build (2.) and running closed jfrt.jar + OpenJDK
(5.) are the most serious issues at the moment.

I remember that running closed jfx with OpenJDK used to work, but maybe
I'm wrong.

Any plans to address that, or hints where I can start looking to help
out?

Cheers,
Mario