From maurodewit at gmail.com Mon Apr 23 08:56:48 2018 From: maurodewit at gmail.com (Mauro de Wit) Date: Mon, 23 Apr 2018 10:56:48 +0200 Subject: status of OpenJDK on Haiku Message-ID: Hello, I'm trying to find some info about the status of the OpenJDK port for Haiku. Can anyone tell me what the current supported Java version is on Haiku? I installed JamVM which mentions 1.5 compatibility (I've read that JamVM can be 'plugged' with a recent OpenJDK). By the way, I found this repository: https://bitbucket.org/hamishm/haiku-jdk8u-jdk is this a working Java 8 port? Regards Mauro -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamishm53 at gmail.com Mon Apr 23 16:57:35 2018 From: hamishm53 at gmail.com (Hamish Morrison) Date: Mon, 23 Apr 2018 17:57:35 +0100 Subject: status of OpenJDK on Haiku In-Reply-To: References: Message-ID: The Java 8 port was indeed working. You can refer to the Haikuports recipe for build instructions: https://github.com/haikuports/haikuports/blob/master/dev-lang/openjdk/openjdk-1.8.u40_b27.recipe It may have bit-rotted somewhat since I worked on it though! On Mon, Apr 23, 2018 at 9:56 AM, Mauro de Wit wrote: > Hello, > > I'm trying to find some info about the status of the OpenJDK port for Haiku. > Can anyone tell me what the current supported Java version is on Haiku? I > installed JamVM which mentions 1.5 compatibility (I've read that JamVM can > be 'plugged' with a recent OpenJDK). > > By the way, I found this repository: > https://bitbucket.org/hamishm/haiku-jdk8u-jdk > > is this a working Java 8 port? > > Regards > > Mauro > From maurodewit at gmail.com Mon Apr 23 17:41:42 2018 From: maurodewit at gmail.com (Mauro de Wit) Date: Mon, 23 Apr 2018 17:41:42 +0000 Subject: status of OpenJDK on Haiku In-Reply-To: References: Message-ID: Thanks, I'll check it out. Op ma 23 apr. 2018 18:57 schreef Hamish Morrison : > The Java 8 port was indeed working. You can refer to the Haikuports > recipe for build instructions: > > > https://github.com/haikuports/haikuports/blob/master/dev-lang/openjdk/openjdk-1.8.u40_b27.recipe > > It may have bit-rotted somewhat since I worked on it though! > > On Mon, Apr 23, 2018 at 9:56 AM, Mauro de Wit > wrote: > > Hello, > > > > I'm trying to find some info about the status of the OpenJDK port for > Haiku. > > Can anyone tell me what the current supported Java version is on Haiku? I > > installed JamVM which mentions 1.5 compatibility (I've read that JamVM > can > > be 'plugged' with a recent OpenJDK). > > > > By the way, I found this repository: > > https://bitbucket.org/hamishm/haiku-jdk8u-jdk > > > > is this a working Java 8 port? > > > > Regards > > > > Mauro > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From humdingerb at googlemail.com Tue Apr 24 15:24:35 2018 From: humdingerb at googlemail.com (Humdinger) Date: Tue, 24 Apr 2018 17:24:35 +0200 Subject: status of OpenJDK on Haiku In-Reply-To: References: Message-ID: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> On Monday, 23 April 2018 18:57:35 GMT+2, Hamish Morrison wrote: > The Java 8 port was indeed working. You can refer to the Haikuports > recipe for build instructions: > > https://github.com/haikuports/haikuports/blob/master/dev-lang/openjdk/openjdk-1.8.u40_b27.recipe > > It may have bit-rotted somewhat since I worked on it though! As I understand it, bootstrapping v1.8 from scratch isn't possible. It needs OpenJDK v1.7 to be installed. Unfortunately, v1.7 can't be built with the existing recipe, not sure if it only hangs on the SOURCE_URI pointing to a non-existing dropbox archive... Hamish, do you happen to have a working v1.7 OpenJDK still laying around somewhere? If that one were to be installed on the buildbots, the v1.8 recipe should work, I think. -- Regards, Humdinger -- Meet up at BeGeistert 031 in Hamburg Details at https://discuss.haiku-os.org/t/begeistert-031/6750 Help translating 3rd party Haiku applications Go to http://i18n.kacperkasper.pl From hamishm53 at gmail.com Tue Apr 24 17:44:02 2018 From: hamishm53 at gmail.com (Hamish Morrison) Date: Tue, 24 Apr 2018 18:44:02 +0100 Subject: status of OpenJDK on Haiku In-Reply-To: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> References: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> Message-ID: On Tue, Apr 24, 2018 at 4:24 PM, Humdinger wrote: > Hamish, do you happen to have a working v1.7 OpenJDK still laying around > somewhere? If that one were to be installed on the buildbots, the v1.8 > recipe should work, I think. I don't have any myself, but there should be many hpkgs of 1.7 around (maybe even 1.8). Isn't there one on Haiku Depot? It's possible these packages no longer run on recent Haiku builds, but it might be possible to work around this with various hackery. If there are no working JDKs to use I think the best bet would be to cross-compile from Linux. Support for cross-compiling is supposedly much improved in JDK 1.8, so it might not be too tricky. From humdingerb at googlemail.com Wed Apr 25 16:58:05 2018 From: humdingerb at googlemail.com (Humdinger) Date: Wed, 25 Apr 2018 18:58:05 +0200 Subject: status of OpenJDK on Haiku In-Reply-To: References: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> Message-ID: On Tuesday, 24 April 2018 19:44:02 GMT+2, Hamish Morrison wrote: > I don't have any myself, but there should be many hpkgs of 1.7 around > (maybe even 1.8). Isn't there one on Haiku Depot? Nope. The buildbots that populate HaikuDepot create all packages from working recipes. The 1.7 recipes try to download from the not anymore available dropbox URLs, the 1.8 relies on an installed 1.7. > If there are no working JDKs to use I think the best bet would be to > cross-compile from Linux. Support for cross-compiling is supposedly > much improved in JDK 1.8, so it might not be too tricky. Never done that before and wouldn't know how to start trying this... -- Regards, Humdinger -- Meet up at BeGeistert 031 in Hamburg Details at https://discuss.haiku-os.org/t/begeistert-031/6750 Help translating 3rd party Haiku applications Go to http://i18n.kacperkasper.pl From hamishm53 at gmail.com Thu Apr 26 12:49:11 2018 From: hamishm53 at gmail.com (Hamish Morrison) Date: Thu, 26 Apr 2018 13:49:11 +0100 Subject: status of OpenJDK on Haiku In-Reply-To: References: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> Message-ID: On Wed, Apr 25, 2018 at 5:58 PM, Humdinger wrote: > Nope. The buildbots that populate HaikuDepot create all packages from > working recipes. The 1.7 recipes try to download from the not anymore > available dropbox URLs, the 1.8 relies on an installed 1.7. Hmm, there were definitely packages on HaikuDepot at one point. Perhaps someone deleted them because of ABI breakage - or they got automatically deleted when the recipes stopped building. > Never done that before and wouldn't know how to start trying this... A starting point would be the 'Cross-compiling' section in http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html for anyone interested. From maurodewit at gmail.com Thu Apr 26 13:07:37 2018 From: maurodewit at gmail.com (Mauro de Wit) Date: Thu, 26 Apr 2018 15:07:37 +0200 Subject: status of OpenJDK on Haiku In-Reply-To: References: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> Message-ID: I still haven't had time to dig in any further, but I tried following your discussion. Do the haikuports buildbots even support cross compiling from Linux? But if I understood correctly viable route (besides cross compiling) would be first fixing the OpenJDK 7 recipe and then the OpenJDK 8 recipe, right? On 26 April 2018 at 14:49, Hamish Morrison wrote: > On Wed, Apr 25, 2018 at 5:58 PM, Humdinger > wrote: > > Nope. The buildbots that populate HaikuDepot create all packages from > > working recipes. The 1.7 recipes try to download from the not anymore > > available dropbox URLs, the 1.8 relies on an installed 1.7. > > Hmm, there were definitely packages on HaikuDepot at one point. > Perhaps someone deleted them because of ABI breakage - or they got > automatically deleted when the recipes stopped building. > > > Never done that before and wouldn't know how to start trying this... > > A starting point would be the 'Cross-compiling' section in > http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html > for anyone interested. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hamishm53 at gmail.com Thu Apr 26 16:21:38 2018 From: hamishm53 at gmail.com (Hamish Morrison) Date: Thu, 26 Apr 2018 17:21:38 +0100 Subject: status of OpenJDK on Haiku In-Reply-To: References: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> Message-ID: On Thu, Apr 26, 2018 at 2:07 PM, Mauro de Wit wrote: > I still haven't had time to dig in any further, but I tried following your > discussion. > Do the haikuports buildbots even support cross compiling from Linux? > > But if I understood correctly viable route (besides cross compiling) would > be first fixing the OpenJDK 7 recipe and then the OpenJDK 8 recipe, right? (Resending to include the mailing list) No I don't think the haikuports buildbots support this. You'd have to do this cross-compilation build manually, build a tarball of the result, and then download this as part of the haikuports recipe to build the final result. So your options are basically: 1) Manually cross-compile OpenJDK 8 from Linux targetting Haiku. Use the resulting JDK to build a new OpenJDK 8 hpkg on Haiku itself. 2) Find an old hpkg of OpenJDK 7 or 8 and use this as a bootstrap JDK to build a new OpenJDK 8 package. Someone must have one lying around somewhere - although whether it still works I don't know. 3) Use JamVM, Classpath and the Eclipse Java Compiler to build OpenJDK 7. This is tricky and requires lots of hacks to the code to make it Java 1.5-compatible. I would not recommend it if you value your free time :) I would go for the cross-compiling option myself. From humdingerb at googlemail.com Thu Apr 26 16:26:14 2018 From: humdingerb at googlemail.com (Humdinger) Date: Thu, 26 Apr 2018 18:26:14 +0200 Subject: status of OpenJDK on Haiku In-Reply-To: References: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> Message-ID: On Thursday, 26 April 2018 15:07:37 GMT+2, Mauro de Wit wrote: > Do the haikuports buildbots even support cross compiling from Linux? I don't think so. > But if I understood correctly viable route (besides cross compiling) would > be first fixing the OpenJDK 7 recipe and then the OpenJDK 8 recipe, right? Hamish mentioning it being at HaikuDepot once, reminded me of the old location of the HaikuPorts repo (before the auto-buildbots get going). v1.7 packages are indeed still there, see: http://packages.haiku-os.org/haikuports/master/hpkg/ I installed openjdk_x86-1.7.u80_b32-3-x86_gcc2.hpkg and its _devel package. Unfortunately, building the v1.8 recipe fails with: Making /sources/hamishm-haiku-jdk8u-6e3a7c2446ea/build/haiku-x86-normal-server-release/hotspot/haiku_i486_compiler2/product/../generated/sa-jdi.jar warning: [options] bootstrap class path not set in conjunction with -source 1.6 /sources/hamishm-haiku-jdk8u-6e3a7c2446ea/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/win32/coff/COFFFileParser.java:290: error: error while writing COFFFileParser.COFFFileImpl.COFFHeaderImpl.OptionalHeaderStandardFieldsImpl: /sources/hamishm-haiku-jdk8u-6e3a7c2446ea/build/haiku-x86-normal-server-release/hotspot/haiku_i486_compiler2/product/../generated/saclasses/sun/jvm/hotspot/debugger/win32/coff/COFFFileParser$COFFFileImpl$COFFHeaderImpl$OptionalHeaderStandardFieldsImpl.class (File name too long) class OptionalHeaderStandardFieldsImpl implements OptionalHeaderStandardFields { ^ Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error 1 warning make[7]: *** [/sources/hamishm-haiku-jdk8u-6e3a7c2446ea/build/haiku-x86-normal-server-release/hotspot/haiku_i486_compiler2/product/../generated/sa-jdi.jar] Error 1 /sources/hamishm-haiku-jdk8u-6e3a7c2446ea/hotspot/make/haiku/makefiles/sa.make:70: recipe for target '/sources/hamishm-haiku-jdk8u-6e3a7c2446ea/build/haiku-x86-normal-server-release/hotspot/haiku_i486_compiler2/product/../generated/sa-jdi.jar' failed /sources/hamishm-haiku-jdk8u-6e3a7c2446ea/hotspot/make/haiku/makefiles/sa.make:64: recipe for target 'all' failed make[6]: *** [all] Error 2 /sources/hamishm-haiku-jdk8u-6e3a7c2446ea/hotspot/make/haiku/makefiles/top.make:103: recipe for target 'sa_stuff' failed make[5]: *** [sa_stuff] Error 2 make[4]: *** [product] Error 2 /sources/hamishm-haiku-jdk8u-6e3a7c2446ea/hotspot/make/haiku/Makefile:293: recipe for target 'product' failed Makefile:230: recipe for target 'generic_build2' failed make[3]: *** [generic_build2] Error 2 make[2]: *** [product] Error 2 Makefile:177: recipe for target 'product' failed HotspotWrapper.gmk:44: recipe for target '/sources/hamishm-haiku-jdk8u-6e3a7c2446ea/build/haiku-x86-normal-server-release/hotspot/_hotspot.timestamp' failed make[1]: *** [/sources/hamishm-haiku-jdk8u-6e3a7c2446ea/build/haiku-x86-normal-server-release/hotspot/_hotspot.timestamp] Error 2 /sources/hamishm-haiku-jdk8u-6e3a7c2446ea//make/Main.gmk:108: recipe for target 'hotspot-only' failed make: *** [hotspot-only] Error 2 Warning: Command '['bash', '-c', '. /wrapper-script']' returned non-zero exit status 2 Error: Build has failed - stopping. So, "File name too long"? -- Regards, Humdinger -- Meet up at BeGeistert 031 in Hamburg Details at https://discuss.haiku-os.org/t/begeistert-031/6750 Help translating 3rd party Haiku applications Go to http://i18n.kacperkasper.pl From humdingerb at googlemail.com Thu Apr 26 18:34:53 2018 From: humdingerb at googlemail.com (Humdinger) Date: Thu, 26 Apr 2018 20:34:53 +0200 Subject: status of OpenJDK on Haiku In-Reply-To: References: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> Message-ID: <30cc99e9-18c3-4d07-ac97-608c3f4e9a2f@gmail.com> On Thursday, 26 April 2018 18:26:14 GMT+2, Humdinger wrote: > So, "File name too long"? I uncommented this section in the 1.8 recipe: #OpenJDK has an internal limitation of 256 characters in a path. #And with the default src dir we go past it. cd .. mv $sourceDir src cd src ln -s src $sourceDir Now it acutally compiles! I still run into a problem though: # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (malloc) failed to allocate 201326600 bytes for Chunk::new # An error report file with more information is saved as: # /sources/src/hs_err_pid1566.log Certificate was added to keystore This keeps repeating. This is one of those logs: http://ix.io/18Nx -- Regards, Humdinger -- Meet up at BeGeistert 031 in Hamburg Details at https://discuss.haiku-os.org/t/begeistert-031/6750 Help translating 3rd party Haiku applications Go to http://i18n.kacperkasper.pl From hamishm53 at gmail.com Thu Apr 26 19:05:36 2018 From: hamishm53 at gmail.com (Hamish Morrison) Date: Thu, 26 Apr 2018 20:05:36 +0100 Subject: status of OpenJDK on Haiku In-Reply-To: <30cc99e9-18c3-4d07-ac97-608c3f4e9a2f@gmail.com> References: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> <30cc99e9-18c3-4d07-ac97-608c3f4e9a2f@gmail.com> Message-ID: <713d3696-3bb5-19ef-9597-71027b63ee46@gmail.com> On 26/04/2018 19:34, Humdinger wrote: > # There is insufficient memory for the Java Runtime Environment to > continue. > # Native memory allocation (malloc) failed to allocate 201326600 bytes > for Chunk::new > # An error report file with more information is saved as: > # /sources/src/hs_err_pid1566.log > Certificate was added to keystore > > > This keeps repeating. This is one of those logs: http://ix.io/18Nx Well done getting this far! Attempting to malloc a contiguous 200MB of memory might not work so well on a 32-bit operating system. One thing to try is disabling ASLR: export DISABLE_ASLR=1 The path length limit is strange - I wonder if this is some restriction I accidentally introduced into the Haiku port... From humdingerb at googlemail.com Fri Apr 27 05:55:01 2018 From: humdingerb at googlemail.com (Humdinger) Date: Fri, 27 Apr 2018 07:55:01 +0200 Subject: status of OpenJDK on Haiku In-Reply-To: <713d3696-3bb5-19ef-9597-71027b63ee46@gmail.com> References: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> <30cc99e9-18c3-4d07-ac97-608c3f4e9a2f@gmail.com> <713d3696-3bb5-19ef-9597-71027b63ee46@gmail.com> Message-ID: On Thursday, 26 April 2018 21:05:36 GMT+2, Hamish Morrison wrote: > Well done getting this far! I didn't really do anything, just uncomment some obvious lines and running the recipe. :) > Attempting to malloc a contiguous > 200MB of memory might not work so well on a 32-bit operating > system. One thing to try is disabling ASLR: > > export DISABLE_ASLR=1 That's already done, see https://github.com/haikuports/haikuports/blob/master/dev-lang/openjdk/openjdk-1.8.u40_b27.recipe > The path length limit is strange - I wonder if this is some > restriction I accidentally introduced into the Haiku port... On IRC the guys said: [19:42] #define MAX_PATH B_FILE_NAME_LENGTH [19:42] https://bitbucket.org/hamishm/haiku-jdk8u-hotspot/src/e5ab6f7ff24129d8ee25dd8a1d84c329a6e4bc18/src/os/haiku/vm/os_haiku.cpp?at=default&fileviewer=file-view-default#os_haiku.cpp-106 [19:43] uh...that's problematic [19:43] should be B_PATH_NAME_LENGTH I tried using B_PATH_NAME_LENGTH instead, no difference. All that certification business is done in the recipe's INSTALL() section. I wonder why it should strain the available memory... -- Regards, Humdinger -- Meet up at BeGeistert 031 in Hamburg Details at https://discuss.haiku-os.org/t/begeistert-031/6750 Help translating 3rd party Haiku applications Go to http://i18n.kacperkasper.pl From hamishm53 at gmail.com Fri Apr 27 15:48:32 2018 From: hamishm53 at gmail.com (Hamish Morrison) Date: Fri, 27 Apr 2018 16:48:32 +0100 Subject: status of OpenJDK on Haiku In-Reply-To: References: <76f7b733-cb79-4974-94a9-1d367882957c@gmail.com> <30cc99e9-18c3-4d07-ac97-608c3f4e9a2f@gmail.com> <713d3696-3bb5-19ef-9597-71027b63ee46@gmail.com> Message-ID: On Fri, Apr 27, 2018 at 6:55 AM, Humdinger wrote: > On IRC the guys said: > > [19:42] #define MAX_PATH B_FILE_NAME_LENGTH > [19:42] > https://bitbucket.org/hamishm/haiku-jdk8u-hotspot/src/e5ab6f7ff24129d8ee25dd8a1d84c329a6e4bc18/src/os/haiku/vm/os_haiku.cpp?at=default&fileviewer=file-view-default#os_haiku.cpp-106 > [19:43] uh...that's problematic > [19:43] should be B_PATH_NAME_LENGTH > > I tried using B_PATH_NAME_LENGTH instead, no difference. There might be other occurrences of B_FILE_NAME_LENGTH in the source code. I believe there's also a JVM_PATHLEN define in jvm_haiku.h - but that one's already using the correct definition. > All that certification business is done in the recipe's INSTALL() section. I > wonder why it should strain the available memory... Java is generally quite liberal in allocating large chunks of memory to use for its heap, even if it doesn't use it right away. There are various options you can pass to the JVM to limit the heap size for these steps. You might want to try tweaking various options e.g. -Xms256m -Xmx512m which would give you an initial heap of 256MB and a maximum of 512MB.