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
Dotty cannot parse some jars from Project Panama's Jextract #6051
Comments
The triggered assertion in the first project was removed in scalac and replaced by stub symbol creation, we should do the same: scala/scala@bbd693a#diff-400a2e6482bc824c3840c10ecc43e7b0L1050 |
Leaving @allanrenucci as a proxy until Anatoly arrives to take this over. |
@markehammons, I cannot reproduce the successful compilation of both projects with Scala 2.12.8. Can you please confirm it still works for you? One possibility for the first one not working may be that I need to compile the jar from the second project so that there are no binary incompatibilities. However, I cannot get the second project to run either. First one:
Second one:
|
Anatolii, for the second one you *must* use java openjdk-13-foreign(https://jdk.java.net/panama/) if you want to build from scratch.
A jar file will be generated by the jextract utility bundled with said jdk and inserted into the lib directory that acts as the bridge to wayland and wlroots. Sadly, it's been a while since I built this project so I will almost definitely need to update my code to work with a current version of https://jdk.java.net/panama/. I'll get back to you when I've done that and updated the second project.
The first project doesn't compile because, again, it needs this jar generated by openjdk-13-foreign in the lib folder. Once you get the second compiling with scala 2.12.8, you copy the jar from
it's lib folder into the first project's lib folder.
|
@anatoliykmetyuk I've confirmed that the latest version of java openjdk-13-foreign works with the latest version of the skylight repository. Please try to rerun compilation using that jvm and the binding jar will be generated. If you need me to, I can also just attach the binding jar here. |
Thanks for the clarifications @markehammons, I'll try with openjdk-13-foreign. |
After installing Panama JDK, I am getting the following:
Apparently, the build file tries to launch processes from Wayland, which, as it seems, is not supported by MacOS. Is there any way you can minimise this example so that not to depend on Wayland? |
I've tried but could not succeed. The issue seemed to pop up specifically
with this generated jar. However, merely loading the jar for compilation
kills dotty. What I can do is link the jar that I've built to this issue so
you can use it and trigger the problem
I'll give it a shot on wednesday if that's fine.
…On Mon, May 20, 2019 at 3:03 PM Anatolii Kmetiuk ***@***.***> wrote:
After installing Panama JDK, I am getting the following:
tsf-428-wpa-3-166:Skylight anatolii$ java -version
openjdk version "13-internal" 2019-09-17
OpenJDK Runtime Environment (build 13-internal+0-jdk13-panama.70)
OpenJDK 64-Bit Server VM (build 13-internal+0-jdk13-panama.70, mixed mode, sharing)
tsf-428-wpa-3-166:Skylight anatolii$ sbt compile
[info] Loading settings for project global-plugins from plugins.sbt ...
[info] Loading global plugins from /Users/anatolii/.sbt/1.0/plugins
[info] Loading project definition from /Users/anatolii/Projects/dotty/issues/i6051/Skylight/project
[info] Loading settings for project root from build.sbt ...
[info] Loading settings for project skylight from build.sbt ...
[info] Set current project to Skylight (in build file:/Users/anatolii/Projects/dotty/issues/i6051/Skylight/)
[info] Executing in batch mode. For better performance use sbt's shell
[error] java.io.IOException: Cannot run program "wayland-scanner": error=2, No such file or directory
[error] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
[error] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
[error] at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:71)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:100)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:99)
[error] at $d54a88ba46a3e3c7afc7$.$anonfun$$sbtdef$1(/Users/anatolii/Projects/dotty/issues/i6051/Skylight/skylightWM/build.sbt:124)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:835)
[error] Caused by: java.io.IOException: error=2, No such file or directory
[error] at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
[error] at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:319)
[error] at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:250)
[error] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
[error] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
[error] at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:71)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:100)
[error] at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.run(ProcessBuilderImpl.scala:99)
[error] at $d54a88ba46a3e3c7afc7$.$anonfun$$sbtdef$1(/Users/anatolii/Projects/dotty/issues/i6051/Skylight/skylightWM/build.sbt:124)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:278)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:835)
[error] (root / xdgProtocolGen) java.io.IOException: Cannot run program "wayland-scanner": error=2, No such file or directory
[error] Total time: 0 s, completed May 20, 2019, 2:57:28 PM
Apparently, the build file tries to launch processes from Wayland, which,
as it seems, is not supported by MacOS.
Is there any way you can minimise this example so that not to depend on
Wayland?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6051>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAT5CP2N4G6GOR3T6I6A6ELPWKOR7ANCNFSM4G43LPDA>
.
--
Mark Edgar Hammons II - Research Engineer at the ISCPIF | Contributor to
OpenMOLE <http://www.openmole.org/>
Cell - +33 06 03 69 56 56 | + 1 405 928 8206
|
Ok, let's try with a precompiled jar. Thanks. |
put this in your lib file. also, make sure to comment out this line in your build.sbt so compile doesn't try to regenerate it:
|
I've tried the build with the latest versions of panama and dotty, and the issue still exists.
|
Last night I tested the latest version of project panama (based on jdk 14) with dotty. Jextract's newly generated jar files no longer cause an exception in dotc when compiling. This probably means the issue can be closed. While scala 2.12 was tolerant of broken jars like the one the older version of jextract was producing, maybe that's not particularly important to the dotty project. Please go ahead and close this if you wish. |
So the fix is on Panama's side and Dotty still doesn't work with the older version of Panama? |
Yes. The jars produced by the older version work with scala 2, but not dotty. |
We should leave this open then. Thanks for the update on it! |
Scala 2.12.8 succeeds in compiling code from two projects, with each having a different error in 0.13.0-RC1. I am listing the project along with the stack trace produced when compiling them. The problem seems to stem from a jar file generated by jextract, but this jar file works without error in scala 2.12.8, works with intellij, java, etc.
dottyparse
Please remember to switch the build.sbt to use the dotty 0.13.0-RC1 (commented out) library instead of scala 2.12.8
WaylandMcWayface
in both cases it appears that dotc is having trouble parsing the
usr.include.wayland.wayland_server_core
classes.The text was updated successfully, but these errors were encountered: