<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">sadly replying to my own post now; I am a bit further.<div class=""><br class=""></div><div class="">I discovered&nbsp;<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">--report-unsupported-elements-at-runtime.&nbsp;</span></div><div class=""><br class=""></div><div class="">Now I do a</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>native-image -cp $(CLASSPATH) --report-unsupported-elements-at-runtime org.netrexx.process.NetRexxC</div><div class=""><br class=""></div><div class="">Now an image of 10MB is built instead of the previous 3.8MB. It runs without the .jar now, so my conclusion is that the fallback image only instatiates a JVM and then branches to your main().</div><div class="">The image does not work, and instead of reporting at runtime, it does nothing - when I hand it a source file to compile.</div><div class=""><br class=""></div><div class="">I also discovered&nbsp;-H:+ReportExceptionStackTraces. It tells me about lambda’s when I don’t really do lambda’s.</div><div class=""><br class=""></div><div class=""><div class="">➜ &nbsp;netrexx-code git:(master) ✗ make natives</div><div class="">native-image -cp .:/Users/rvjansen/apps/netrexx-code/ant/jansi-1.17.jar:/Users/rvjansen/apps/netrexx-code/build/lib/NetRexxC.jar:/Users/rvjansen/lib/Enzo-0.3.6.jar:/Users/rvjansen/lib/uuid-3.2.jar:/Users/rvjansen/lib/commons-net-3.3.jar:/Users/rvjansen/papiamento/src/build:/Users/rvjansen/lib/swing-layout-1.0.4.jar:/Users/rvjansen/homebrew/Cellar/kotlin/1.2.10/libexec/lib/kotlin-runtime.jar:/Users/rvjansen/lib/junit-4.12.jar:/Users/rvjansen/lib/hamcrest-core-1.3.jar:/Users/rvjansen/lib/jogl.jar:/Users/rvjansen/lib/antlr-4.5.3-complete.jar:/Users/rvjansen/lib/sqlite-jdbc-3.21.0.1.jar:/Users/rvjansen/lib/postgresql-9.4.1211.jre7.jar:/Users/rvjansen/lib/mail.jar:/Users/rvjansen/lib/activation.jar:/Users/rvjansen/lib/log4j-1.2.16.jar:/Users/rvjansen/lib/fit.jar:/Users/rvjansen/lib/bpjtk-v3.0.2_b20081203.jar:/Users/rvjansen/lib/org.eclipse.paho.client.mqttv3-1.2.2.jar:/Users/rvjansen/lib/commons-codec-1.7.jar:/Users/rvjansen/lib/jsch-0.1.50.jar:/Users/rvjansen/lib/ibmjzos.jar:/Users/rvjansen/lib/jsp-api.jar:/Users/rvjansen/lib/servlet-api-3.0.jar:/Users/rvjansen/lib/java2nrx.jar:/Applications/SWI-Prolog.app/Contents/swipl/lib/jpl.jar:/Users/rvjansen/apps/graalvm-ce-java8-19.3.1/Contents/Home/jre/lib/ext/jfxrt.jar:/Users/rvjansen/lib/pivot-charts-2.0.5.jar:/Users/rvjansen/lib/pivot-core-2.0.5.jar:/Users/rvjansen/lib/pivot-web-2.0.5.jar:/Users/rvjansen/lib/pivot-web-server-2.0.5.jar:/Users/rvjansen/lib/pivot-wtk-2.0.5.jar:/Users/rvjansen/lib/pivot-wtk-terra-2.0.5.jar org.netrexx.process.NetRexxC -H:+ReportExceptionStackTraces</div><div class="">Build on Server(pid: 82860, port: 55394)</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp;classlist: &nbsp; 3,750.00 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; &nbsp; &nbsp;(cap): &nbsp; 1,337.98 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; &nbsp; &nbsp;setup: &nbsp; 1,573.24 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; analysis: &nbsp;32,304.55 ms</div><div class="">Warning: Aborting stand-alone image build due to unsupported features</div><div class="">com.oracle.svm.hosted.FallbackFeature$FallbackImageRequest: Aborting stand-alone image build due to unsupported features</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.FallbackFeature.reportFallback(FallbackFeature.java:213)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.FallbackFeature.reportFallback(FallbackFeature.java:198)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.FallbackFeature.afterAnalysis(FallbackFeature.java:278)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$9(NativeImageGenerator.java:724)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:63)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:724)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:530)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:445)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)</div><div class="">Build on Server(pid: 82860, port: 55394)</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp;classlist: &nbsp; &nbsp; 126.17 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; &nbsp; &nbsp;(cap): &nbsp; 1,404.38 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; &nbsp; &nbsp;setup: &nbsp; 1,604.35 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; (typeflow): &nbsp; 2,153.07 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp;(objects): &nbsp; 2,408.80 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; (features): &nbsp; &nbsp; &nbsp;91.76 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; analysis: &nbsp; 4,720.93 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; (clinit): &nbsp; &nbsp; 101.57 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; universe: &nbsp; &nbsp; 244.72 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; &nbsp;(parse): &nbsp; &nbsp; 211.83 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; (inline): &nbsp; &nbsp; 643.13 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp;(compile): &nbsp; 1,126.10 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; &nbsp;compile: &nbsp; 2,148.40 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; &nbsp; &nbsp;image: &nbsp; &nbsp; 241.02 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; &nbsp; &nbsp;write: &nbsp; &nbsp; 143.82 ms</div><div class="">[org.netrexx.process.netrexxc:82860] &nbsp; &nbsp; &nbsp;[total]: &nbsp; 9,291.60 ms</div><div class="">Warning: Image 'org.netrexx.process.netrexxc' is a fallback image that requires a JDK for execution (use --no-fallback to suppress fallback image generation).</div><div class="">mv org.netrexx.process.NetRexxC nrc</div><div class=""><br class=""></div><div class="">I need to trace why it does not pickup the source file, while it does pick up an option like -help. I have to say it is very fast; but for now to no avail.</div><div class=""><br class=""></div><div class="">In a possible related issue, I tried to native-compile hello world, it fails in the same manner.</div><div class=""><br class=""></div><div class="">say ‘hello world’</div><div class=""><br class=""></div><div class="">when compiling the hellonrx.class file, I get this:</div><div class=""><br class=""></div><div class=""><div class="">➜ &nbsp;test git:(master) ✗ java org.netrexx.process.NetRexxC -replace -keepasjava -format hellonrx.nrx</div><div class="">NetRexx portable processor 3.09-PRE build 137-20200127-1912</div><div class="">Copyright (c) RexxLA, 2011,2019. &nbsp; All rights reserved.</div><div class="">Parts Copyright (c) IBM Corporation, 1995,2008.</div><div class="">Program hellonrx.nrx</div><div class="">Compilation of 'hellonrx.nrx' successful</div><div class="">➜ &nbsp;test git:(master) ✗ native-image hellonrx -H:+ReportExceptionStackTraces</div><div class="">Build on Server(pid: 83895, port: 55676)</div><div class="">[hellonrx:83895] &nbsp; &nbsp;classlist: &nbsp; &nbsp; 130.94 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; &nbsp; &nbsp;(cap): &nbsp; 1,427.32 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; &nbsp; &nbsp;setup: &nbsp; 1,625.63 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; analysis: &nbsp; 5,080.18 ms</div><div class="">Warning: Aborting stand-alone image build due to unsupported features</div><div class="">com.oracle.svm.hosted.FallbackFeature$FallbackImageRequest: Aborting stand-alone image build due to unsupported features</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.FallbackFeature.reportFallback(FallbackFeature.java:213)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.FallbackFeature.reportFallback(FallbackFeature.java:198)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.FallbackFeature.afterAnalysis(FallbackFeature.java:278)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.NativeImageGenerator.lambda$runPointsToAnalysis$9(NativeImageGenerator.java:724)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.FeatureHandler.forEachFeature(FeatureHandler.java:63)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:724)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:530)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:445)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)</div><div class="">Build on Server(pid: 83895, port: 55676)</div><div class="">[hellonrx:83895] &nbsp; &nbsp;classlist: &nbsp; &nbsp; 133.91 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; &nbsp; &nbsp;(cap): &nbsp; 1,245.86 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; &nbsp; &nbsp;setup: &nbsp; 1,444.00 ms</div><div class="">[hellonrx:83895] &nbsp; (typeflow): &nbsp; 2,156.45 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp;(objects): &nbsp; 2,398.44 ms</div><div class="">[hellonrx:83895] &nbsp; (features): &nbsp; &nbsp; &nbsp;94.27 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; analysis: &nbsp; 4,713.77 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; (clinit): &nbsp; &nbsp; &nbsp;77.74 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; universe: &nbsp; &nbsp; 226.43 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; &nbsp;(parse): &nbsp; &nbsp; 208.42 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; (inline): &nbsp; &nbsp; 657.30 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp;(compile): &nbsp; 1,433.88 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; &nbsp;compile: &nbsp; 2,481.49 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; &nbsp; &nbsp;image: &nbsp; &nbsp; 250.00 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; &nbsp; &nbsp;write: &nbsp; &nbsp; 144.30 ms</div><div class="">[hellonrx:83895] &nbsp; &nbsp; &nbsp;[total]: &nbsp; 9,472.80 ms</div><div class="">Warning: Image 'hellonrx' is a fallback image that requires a JDK for execution (use --no-fallback to suppress fallback image generation).</div></div><div class=""><br class=""></div><div class="">when I do:</div><div class=""><br class=""></div><div class="">System.out.println(“hello, world”)</div><div class=""><br class=""></div><div class="">which I also can do in NetRexx, it works:</div><div class=""><br class=""></div><div class=""><div class="">➜ &nbsp;test git:(master) ✗ native-image helloworld -H:+ReportExceptionStackTraces</div><div class="">Build on Server(pid: 83895, port: 55676)</div><div class="">[helloworld:83895] &nbsp; &nbsp;classlist: &nbsp; &nbsp; 199.68 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; &nbsp; &nbsp;(cap): &nbsp; 1,753.73 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; &nbsp; &nbsp;setup: &nbsp; 2,023.70 ms</div><div class="">[helloworld:83895] &nbsp; (typeflow): &nbsp; 2,465.69 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp;(objects): &nbsp; 2,636.65 ms</div><div class="">[helloworld:83895] &nbsp; (features): &nbsp; &nbsp; 128.45 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; analysis: &nbsp; 5,309.33 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; (clinit): &nbsp; &nbsp; &nbsp;90.17 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; universe: &nbsp; &nbsp; 342.11 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; &nbsp;(parse): &nbsp; &nbsp; 317.45 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; (inline): &nbsp; &nbsp; 857.58 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp;(compile): &nbsp; 1,313.64 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; &nbsp;compile: &nbsp; 2,665.60 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; &nbsp; &nbsp;image: &nbsp; &nbsp; 278.61 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; &nbsp; &nbsp;write: &nbsp; &nbsp; 221.28 ms</div><div class="">[helloworld:83895] &nbsp; &nbsp; &nbsp;[total]: &nbsp;11,150.81 ms</div></div><div class=""><br class=""></div><div class="">which makes an awesomely fast hello world.</div><div class=""><br class=""></div><div class="">In short, would it be hard to have the native-image program some understandable error messages? I am stuck for now.</div><div class=""><br class=""></div><div class="">best regards,</div><div class=""><br class=""></div><div class="">René Jansen.</div><div><br class=""><blockquote type="cite" class=""><div class="">On 27 Jan 2020, at 03:49, René Jansen &lt;<a href="mailto:rvjansen@xs4all.nl" class="">rvjansen@xs4all.nl</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi All, I am trying to get some pointers here to help my understanding. I am the current maintainer of the NetRexx translator - see <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__netrexx.org_&d=DwMFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=-GKRD14OV8ZzxoOlXftJmlGgeW2myEevSjiD0IaM8hM&s=6QeIfZhXhPF2lrweXfUAJPmOjySlkkEojZ2T94VHvX8&e=" class="">netrexx.org</a>&nbsp;- and I am struggling with some concepts. NetRexx is a translator and interpreter that either interprets NetRexx or compiles it to class files, with generated java source as an intermediate. It was thoroughly broken by Java 9 and its modules - being from 1996, NetRexx scans all jars and zips on the classpath in order to make decisions over linking which methods for which classes. It cannot find stuff in modules at the moment.<div class=""><br class=""></div><div class="">I need to fix this, of course, but I first have implemented some stopgaps to keep NetRexx usable on current JVMs. The first is a Docker image that contains everything to compile classes. My demography, most are older mainframe programmers, makes this rather hard to support, and some refuse outright to try it. Plan B was the GraalVM and a native image for the compiler, which, to my great relief, works! That is, it works for me, but I do not want to release before I understand it better than I do now.</div><div class=""><br class=""></div><div class="">I have made native images for the needed entrypoints. The native-image process complains that not everything is supported and generates fallback images, which need a JVM to back it up. This is fine with me, because making programs in NetRexx entails using Java classlibraries from different sources - one of the main advantages of NetRexx is the very well working Java integration.</div><div class=""><br class=""></div><div class="">Then everything works as designed. I can install a JDK 13 and run NetRexx, which thinks it runs on Java 8 and can suddenly find all needed signatures. But, now comes the but:</div><div class="">I cannot move this executable without moving the NetRexxC.jar file in a corresponding move with it. If you want to try: git clone <a href="git://git.code.sf.net/p/netrexx/code" class="">git://git.code.sf.net/p/netrexx/code</a> , then run make. This works everywhere and even on a JRE because we include the Eclipse compiler. Well, everywhere that is Java 8.</div><div class=""><br class=""></div><div class="">Now there are some jars in build/lib. These are apparently needed for execution, and if I move the nrc executable to ~/bin , I have to make a ~/bin/build/lib/NetRexxC.jar for it to find, otherwise it will not find the org.netrexx.process.NetRexxC class, which is the entrypoint for the translator. Moreover, I thought it prudent to change the compiler logo line, to make sure I know what I am running, the native executable or the java class. Now I found out that without regenerating the native executable, the changes (in the org.netrexx.rocess.NrVersion class) were picked up. So when starting a native ‘se;lf-contained’ executable, I am actually branching quite fast to a class in a jar.</div><div class=""><br class=""></div><div class="">I have tried reading the documentation. It might be me, but I could not quickly find the technical details that explain this. So to recap:</div><div class=""><br class=""></div><div class="">1) what is actually executed from a native-image generated executable fallback image. Not my classes?</div><div class="">2) how to go about generating a fully self-contained image - that error message does not exactly pinpoint (at all) what the problem is doing this;</div><div class="">3) can I somehow list the symbols in the executable - I did an objdump but I see generic C-library functions and none of my own classes - but a System.getProperty(“java.version”) tells me 8 - while running on a Java 13 JVM.</div><div class="">4) how can the runtime know it is a native executable and no class running in a conventional JVM - this would probably be enough for me to differentiate</div><div class="">5) I see one can make shared object libraries. That would be great, because I have a few entrypoints (nrc, pipe, pipc, nrws) that all uses the same classes. But how to use this? Is there an example?</div><div class="">6) (bonus points) I miss an aarch64 native-image version of JVM8 - is there any chance of this? I am fine with 64-bit only and Raspbian should catch up quickly, but NetRexx on Ubuntu on the Raspi 4 with Java 11 would be great - need a Graal native-image 8 for that. Or do I?</div><div class=""><br class=""></div><div class="">thank you very much in advance,</div><div class=""><br class=""></div><div class="">best regards,</div><div class=""><br class=""></div><div class="">René Jansen.</div></div></div></blockquote></div><br class=""></div></body></html>