9 ms·
The Deletion of gcj
- myhf 10y agoGoogle cache: http://webcache.googleusercontent.com/search?q=cache:zFK8UNRnBpkJ:tromey.com/blog/%3Fp%3D911 http://webcache.googleusercontent.com/search?q=cache:zFK8UNR...
- okket 10y agoGCJ was deemed obsolete in 2010, amazing that it was still around until now... http://stackoverflow.com/questions/3032727/java-jre-vs-gcj http://stackoverflow.com/questions/3032727/java-jre-vs-gcj Did anyone used GCJ for something in production?
- marktangotango 10y agoI evaluated gcj to use in a shareware desktop application in the 2000's. The goal was to compile java + SWT into native binaries for distribution. The goal was a slim installer that didn't require the user to futz with installing java, or bunding a jre. Ended up going with Excelsior JET which is a fantastic project. In the end, the full java spec doesn't lend itself to aot, because if you claim to be "real" java you have to include support for runtime classloading, which means there has to be a bytecode interpreter embedded in there somewhere. My thoughts are now, if you really want a java/c# style aot language, vala is the way forward.
- amyjess 10y ago> My thoughts are now, if you really want a java/c# style aot language, vala is the way forward. What about D?
- my123 10y agoC# fully supports AOT since a while.
- swift 10y agoI'm pretty sure that C# AOT does not eliminate the need for a JIT in the runtime system. Just as one example, how could expression trees be implemented without one?
- pjmlp 10y agoYou cannot use them. In .NET Native you have to explicitly inform the compiler of any kind of reflection behavior you might require.
- zgramana 10y agoNot quite right. Mono has the lovely mkbundle tool which can do what the poster wants: AOT your intermediate/byte code and build a statically linked executable containing your app, the runtime, and all your deps (except for key system dynamic libraries like libc or Security.framework, similar to how go works). No restrictions on reflection, unlike .NET Native (which has slightly different design goals). I've used it many times for just this reason with great results. Plus, the runtime was re-licensed to MIT/X11.
- pjmlp 10y agoMy .NET experience is only on Windows, thanks for the clarification.
- krylon 10y agoIIRC, Fedora at one point shipped some Java programs compiled with GCJ, for example Eclipse.
- lmm 10y agoI was part of a student society that used GCJ for the code that ran everything (including generating the website). I have not-so-fond memories of the porting effort to get it working on Sun Java and MySQL 5 (it had originally used 4). It was a different time to be sure.
- int_19h 10y agoOne nice thing that GCJ had was fairly smooth integration with C++ via CNI - much higher level than JNI, and easier to use. https://gcc.gnu.org/onlinedocs/gcj/About-CNI.html#About-CNI https://gcc.gnu.org/onlinedocs/gcj/About-CNI.html#About-CNI Could be used for scripting and extensibility purposes.
- dragonquest 10y agoThis is why you should always create something, even if you think it will never be accepted by a large audience. It is worth it for the journey itself. Reading this post made me wish I had spent more time with 'gcj'. Though in all honesty I know I gave up on it because I didn't want to go the tougher way - the the normal JDK was just there. Creation is beautiful, and its ending bittersweet for the creator and the witnesses.
- TheCondor 10y agoI live in the moment! Enjoy and cherish those magical times when the work is right, the team is right, and you're having fun. Don't let the stupid stuff bother you. You can rebuild teams like that, find those projects, etc.. but it feels like an eternity when you've had it and then don't have it for a while.
- rekado 10y agoThis is a little sad because this means we will have to keep around old versions of GCC with GCJ in order to be able to bootstrap the JDK from source (without a binary bootstrap JDK). Only OpenJDK6 (with the extensive IcedTea patches) can be bootstrapped with GCJ alone, so we also have to keep OpenJDK6 around in order to be able to build the latest JDK. Bootstrapping becomes harder and more legacy software needs to be accumulated in order to actually build new software from source. (I'm working on GNU Guix, a functional package manager, and I wrote the package definitions for the JDKs.)
- josteink 10y agoAs someone who worked on porting Microsoft .NET Core to new platforms, that's definitely a pain I felt. At first, very few assumptions was made about the Unix bootstrapping process, and the mantra was that you should build the managed components on a Windows machine which already had .NET. Just to get something going, the Unix community decided to use mono to bootstrap the process on non-Windows platforms. This effectively meant you could bootstrap .NET Core on almost any platform where mono was around. That gave quite some platform reach out of the box, and on overall an improvement much welcomed by Microsoft. But later, after Unixes like Linux and OSX become better supported, the bootstrapping method changed to downloading a previous build of .NET Core for the current platform and using that to build the latest sources. I.e. going self-bootstrapping, which sounds fancy on paper. The cost of that? Suddenly it just wasn't doable (without considerable knowledge and effort) to bootstrap .NET Core from source any more on platforms not currently considered first class. I'm not just talking about "strange" outlier OSes like FreeBSD, NetBSD or Alpine Linux or whatever. Just trying to build for Fedora 24 (which doesn't have published packages) fails. This is because the Fedora 23 packages are linked against library-versions which are no longer in Fedora 24. You'd think that be easy to fix, but now, even with Fedora 25 betas starting to ship, there's still no official Fedora 24 package exists from Microsoft, so Fedora users (and developers, and porters, etc) are SOL. So now basically just trying to bootstrap for a previously supported mainstream Linux-distro is seriously PITA, next to impossible. In my honest opinion that's a major regression just for the sake of being self-bootstrapping. So yeah. You should never underestimate the value of having secondary platforms available for bootstrapping your own. You may come to depend on it.
- aardvark179 10y agohttp://openjdk.java.net/jeps/8166089 http://openjdk.java.net/jeps/8166089 One Java AOT option goes away, and a new one is arriving.
- bcg1 10y agoThere is Avian too https://readytalk.github.io/avian/ https://readytalk.github.io/avian/
- iso-8859-1 10y agoHopefully the new one can replace RoboVM as well...
- chrisseaton 10y agoI'm afraid the job of the new AOT is not to produce standalone binaries - it's code to be loaded into the JVM, not to run without it.
- lsd5you 10y agoIt was used for creating the native builds of XWT [1] 15 years ago. At the time I found it amazing to see Java programs becoming native (a lot snappier and generally faster too). It seemed (naively) to be beyond what was possible. However, the main problem with GCJ was it used conservative garbage collection - boehm GC - and as such was fundamentally broken for long running programs (what java is good for). Without wanting to denigrate it too much, it seems to me that a lot of 'good' work has been put into this approach which was essentially a cul-de-sac. I had a related rather general thought recently about documenting features in projects. Sometimes the hardest thing to know is whether something is in fact a good idea or not (both in theory and in practice) and the amount of effort/quality of documentation is probably not a good indicator of this. So in the case of the GCJ garbage collector, there was always a lot of talk about how clever the garbage collector was and all the technical aspects, but unless you were already an expert, how would you know if it was infact a good idea or not. [1] That is this one, there are several now doing similar things (!). http://www.xwt.org/ http://www.xwt.org/ The code lives on here https://sourceforge.net/projects/vexi/ https://sourceforge.net/projects/vexi/
- correktlogic 10y agoAnyone know if gcj ever experimented with a precise GC? Or did the design of GCC simply not allow for a non-conservative GC implementation?
- gumby 10y agoHistorical. We implemented the Bohm GC at Cygnus, funded by Metaphor back around 92/93 if I remember. GCC is / was very conservative.
- mclovingoat1 10y agoI like to fuck sheeps and goats. I love to fuck goat asses and lick sheeps pussies. I like to fuck them all day long. I like to fuck them with gcj – goatfucking_compiler_jerkoff goatfucking_compiler_jerkoff
- mclovingoat1 10y agoI like to fuck sheeps and goats. I love to fuck goat asses and lick sheeps pussies. I like to fuck them all day long. I like to fuck them with gcj – goatfucking_compiler_jerkoff goatfucking_compiler_jerkoff
- wodencafe 10y agoIt seems the most beloved feature of GCJ was its ability to compile Java to native code. Is this something that could be implemented in the Java JDK / OpenJDK? Understandably a lot of work, but Oracle is looking at AOT now, for performance reasons. The performance improvements could be taken even further by something like this, Java to native code compilation.
- correktlogic 10y agoWhat a shame about gcj being dropped. I remember using GCJ with CNI to interface with native C++ code was a much more pleasant experience than using JNI. https://gcc.gnu.org/onlinedocs/gcj/About-CNI.html#About-CNI https://gcc.gnu.org/onlinedocs/gcj/About-CNI.html#About-CNI
- fake-name 10y agoI skimmed the article, and all the comments here, and I still have no fucking idea what "gcj" is. It's apparently related to java. Maybe at least define your acronym once?
- tombert 10y agoYeah, I mean, it's just incredibly hard to go on Wikipedia and look up "gcj". All I got was this extremely informative page about an open source java compiler: https://en.wikipedia.org/wiki/GNU_Compiler_for_Java https://en.wikipedia.org/wiki/GNU_Compiler_for_Java.
- akx 10y agogcj being killed means someone needs to reimplement pdftk in... well, something else. D:
- LukeShu 10y agoIndeed, that was my concern as well. The best solution is probably to replace the C++ bits with Java, and go full JVM.
- akx 10y agoYep. I recently had to get pdftk running on an old Centos-or-whatever system, and that ended up being a big fat no-go, so I reimplemented the functionality we needed from pdftk (filling forms) with just Java: https://github.com/akx/foofdf https://github.com/akx/foofdf
- pritambarhate 10y agoNot directly related to topic, has anybody used Excelsior JET to compile Java apps to native code? How was your experience? Did it improve the start up time of the app? Did you find it any faster than using a JVM?