Hi - is there a group of people working on OpenJDK 8 for OpenBSD?
Bryan C. Everly
bryan at bceassociates.com
Mon Apr 27 14:44:30 UTC 2015
So here are my steps to reproduce (I'm using the method of building from
source I found at
http://snatverk.blogspot.com/2014/02/how-to-install-java-18-from-source-code.html).
You can see where I hit a wall at the bottom of this email.
Any good ideas on how to proceed?
1. Install OpenJDK 7
pkg_add jdk
echo "export JAVA_HOME=/usr/local/jdk-1.7.0" >> ~/.profile
export JAVA_HOME=/usr/local/jdk-1.7.0
2. Install mercurial
pkg_add mercurial
3. Install Antlr
pkg_add antlr
echo "export CLASSPATH=$CLASSPATH:/usr/local/share/java/classes/antlr3.jar"
>> ~/.profile
export CLASSPATH=$CLASSPATH:/usr/local/share/java/classes/antlr3.jar
4. Install Ant
pkg_add apache-ant
5. Install bash
pkg_add bash
6. Install CUPS
pkg_add cups
7. Clone the repository (I do this in a ~/work subdirectory)
hg clone http://openjdk.java.net/jdk8/jdk8
8. Get the source code (this takes a long time):
cd jdk8
bash ./get_source.sh
9. Run the configuration utility:
bash ./configure
*** HERE IS WHERE I HIT MY FIRST PROBLEM ***
The configure.sh script is looking for cups.h in /usr/include/cups/cups.h
and I couldn't find a way to override it. This file lives in
/usr/local/include/cups instead. To temporarily work around this, I
created a symlink in /usr/include so that the file could be "found" where
it is expected. Any ideas on how to override this?
sudo ln -s /usr/local/include/cups /usr/include/cups
bash ./configure
10. Clear out your current Java environment variables:
unset CLASSPATH
unset JAVA_HOME
11. Build
gmake all
*** HERE IS WHERE I HIT MY SECOND PROBLEM ***
I get this weird error complaining about:
/usr/local/bin/gmake: invalid option -- 8
/usr/local/bin/gmake: invalid option -- /
/usr/local/bin/gmake: invalid option -- a
/usr/local/bin/gmake: invalid option -- /
/usr/local/bin/gmake: invalid option -- c
Did some Google searching and came up with this being a problem caused by
some regex trying to change something and that GMake 3.81 was ok with it.
I was skeptical but I downloaded the source for GMake 3.81, built it and
spliced it into my /usr/local/bin directory (preserving version 4.0 to roll
back to after this):
cd ~/work
wget https://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xzf make-3.81.tar.gz
rm make-3.81.tar.gz
cd make-3.81
bash ./configure
make
sudo mv /usr/local/bin/gmake /usr/local/bin/gmake.4
sudo cp make /usr/local/bin/gmake
cd ~/work/jdk8
gmake all
*** HERE IS WHERE I RAN OUT OF IDEAS ***
While compiling "../generated/adfiles/ad_x86_64_gen.cpp", I got the
following error:
cc1plus: out of memory allocating 4072 bytes after a total of 110297968
bytes
The weird thing is that I had "vmstat -w 1" running in a separate XTerm
window and free memory was typically around 14 G so I don't really think I
ran out of ram in the system. Is there some sort of heap size limitation
in the C++ compiler that we need to pass a parameter to expand?
Thanks,
Bryan
On Mon, Apr 27, 2015 at 8:23 AM, Bryan C. Everly <bryan at bceassociates.com>
wrote:
> Awesome. Thanks Kurt & Christos.
>
> I pulled down the openjdk8 source last night and tried to get it to
> compile. My initial problems were:
>
> 1. Weird error with gmake 4.0 so I had to downgrade to 3.81 to fix that
> 2. Antlr was being looked for in a specific directory with a specific
> version of a JAR file so I had to override that
> 3. I hit an out of memory error on the C compiler
>
> #3 was a showstopper for me. I am on a system with 16 GB of physical RAM
> and a 32 GB swapfile so I'm really confused by this.
>
> Let me wipe the directory, grab fresh source and get a step by step to the
> point where I'm stuck. Then we can all be on the same page and maybe
> figure this out.
>
>
> Thanks,
> Bryan
>
> On Mon, Apr 27, 2015 at 8:01 AM, Christos Zoulas <christos at zoulas.com>
> wrote:
>
>> On Apr 26, 8:50pm, kurt at intricatesoftware.com (Kurt Miller) wrote:
>> -- Subject: Re: Hi - is there a group of people working on OpenJDK 8 for
>> Open
>>
>> | On Sat, 2015-04-25 at 19:05 -0400, Bryan C. Everly wrote:
>> | > If so, I'd be willing to pitch in however I can.
>> | >
>> | > Thanks,
>> | > Bryan
>> |
>> | Hi Bryan,
>> |
>> | The only regular OpenBSD OpenJDK hacker is me at the current time.
>> | Although I haven't started to work on jdk 8 or jdk 9 yet. The next two
>> | months are critical for me at work so I don't expect to have much free
>> | hack-time to work on it until I get past that.
>> |
>> | Feel free to jump in and try to build it and see how it goes.
>> |
>>
>> I can try to help...
>>
>> christos
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/bsd-port-dev/attachments/20150427/73f0233e/attachment-0001.html>
More information about the bsd-port-dev
mailing list