Re: java on openbsd 4.0?

2007-01-13 Thread bofh

On 1/12/07, Kurt Miller [EMAIL PROTECTED] wrote:

Attached are two patch files that you can drop
in /usr/ports/devel/jdk/1.5/patches that hopefully
will fix your amd64 build issue. Please let me know
if this fixes it for you and I'll work on getting
this in 4.0-stable.


Thank you very much, the patches work for jdk-1.5p19 (from 4.0
ports.tar.gz) and for jdk-1.5p20 (cvs update for OPENBSD_4_0).


BTW, I replied to your email on ports@ (the mailing
list). Ports build problems should be dealt with there.
For example I have 17,838 unread messages from [EMAIL PROTECTED]
I easily could have missed your issue.


Sorry about that.  I'm replying to ports too (unless it bounces).



Re: java on openbsd 4.0?

2007-01-10 Thread bofh

On 1/10/07, J.C. Roberts [EMAIL PROTECTED] wrote:

The only outstanding question is, has bofh gotten 1.5 to compile and
install correctly on his amd64 box with Kurt's previous suggestion?


?  The first note from Kurt says he's working on a patch, and the
second mentioned a thread in ports@, and I didn't see anything that
refers to what I was doing.

I did update ports (nightly cvs with -rOPENSD_4_0) and jdk went from
p20 to p21, IIRC.  The new build failed too.

As an aside, on amd64, since 3.9-current from months ago, jdk 1.5 only
required kaffe, and I had used it without issues (see:
[EMAIL PROTECTED]).

But I appreciate the time and effort you had put in to help me,
seriously.  But that's why my original email was a little brief.



Re: java on openbsd 4.0?

2007-01-09 Thread J.C. Roberts
On Monday 08 January 2007 17:38, bofh wrote:
 I tried installing the jdk I had built under 3.9, jdk-1.5.0p14, that
 installed without problems, however:

It has been said many, many times yet people still regularly make same 
the mistake which you have made: Packages (and ports) from one version 
of OpenBSD are not supported under other versions. 

You might think you and your FrankenSystem are somehow clever but more 
often than not, you are wasting your time. You are much better off 
doing things in the supported manner.



Re: java on openbsd 4.0?

2007-01-09 Thread bofh

On 1/9/07, J.C. Roberts [EMAIL PROTECTED] wrote:

On Monday 08 January 2007 17:38, bofh wrote:
 I tried installing the jdk I had built under 3.9, jdk-1.5.0p14, that
 installed without problems, however:

It has been said many, many times yet people still regularly make same
the mistake which you have made: Packages (and ports) from one version
of OpenBSD are not supported under other versions.

You might think you and your FrankenSystem are somehow clever but more
often than not, you are wasting your time. You are much better off
doing things in the supported manner.


Dude,
I *was* trying to set it up in the supported manner.  See the previous
parts of the email.  I was just testing it to see if it may work,
since the supported manner did not work.

Thanx.



Re: java on openbsd 4.0?

2007-01-09 Thread J.C. Roberts
On Tuesday 09 January 2007 06:20, bofh wrote:
 On 1/9/07, J.C. Roberts [EMAIL PROTECTED] wrote:
  On Monday 08 January 2007 17:38, bofh wrote:
   I tried installing the jdk I had built under 3.9, jdk-1.5.0p14,
   that installed without problems, however:
 
  It has been said many, many times yet people still regularly make
  same the mistake which you have made: Packages (and ports) from one
  version of OpenBSD are not supported under other versions.
 
  You might think you and your FrankenSystem are somehow clever but
  more often than not, you are wasting your time. You are much better
  off doing things in the supported manner.

 Dude,
 I *was* trying to set it up in the supported manner.  See the
 previous parts of the email.  I was just testing it to see if it may
 work, since the supported manner did not work.

 Thanx.

I've been in no rush to build and install java, and in fact I've been 
dreading the idea for a couple months but since you're hitting 
problems, I decided to start on it after reading your post to see if I 
could help. 

In the handful of hours since my last reply, I've managed to download, 
build and install jdk 1.3 from ports and I've got 1.4 currently 
building while I type this. As you probably know, having a working JVM 
is a prerequisite for building 1.4 and 1.5. As soon as I get 1.4 built 
and installed, I'll start on 1.5

Like OpenOffice, building java seems to use a a lot of swap. How large 
is your swap partition/slice?

My limits are (far) more  conservative than yours:

$ ulimit -a
time(cpu-seconds)unlimited
file(blocks) unlimited
coredump(blocks) unlimited
data(kbytes) 524288
stack(kbytes)4096
lockedmem(kbytes)315906
memory(kbytes)   946192
nofiles(descriptors) 64
processes64
$

Lastly, as what user are you building the port?

Kind Regards,
JCR



Re: java on openbsd 4.0?

2007-01-09 Thread Gustavo Rios

Is it possible to build jdk;java directly from openbsd: I always
believed i had to install linux emulation first.

Thanks for the clarifications.

On 1/9/07, J.C. Roberts [EMAIL PROTECTED] wrote:

On Tuesday 09 January 2007 06:20, bofh wrote:
 On 1/9/07, J.C. Roberts [EMAIL PROTECTED] wrote:
  On Monday 08 January 2007 17:38, bofh wrote:
   I tried installing the jdk I had built under 3.9, jdk-1.5.0p14,
   that installed without problems, however:
 
  It has been said many, many times yet people still regularly make
  same the mistake which you have made: Packages (and ports) from one
  version of OpenBSD are not supported under other versions.
 
  You might think you and your FrankenSystem are somehow clever but
  more often than not, you are wasting your time. You are much better
  off doing things in the supported manner.

 Dude,
 I *was* trying to set it up in the supported manner.  See the
 previous parts of the email.  I was just testing it to see if it may
 work, since the supported manner did not work.

 Thanx.

I've been in no rush to build and install java, and in fact I've been
dreading the idea for a couple months but since you're hitting
problems, I decided to start on it after reading your post to see if I
could help.

In the handful of hours since my last reply, I've managed to download,
build and install jdk 1.3 from ports and I've got 1.4 currently
building while I type this. As you probably know, having a working JVM
is a prerequisite for building 1.4 and 1.5. As soon as I get 1.4 built
and installed, I'll start on 1.5

Like OpenOffice, building java seems to use a a lot of swap. How large
is your swap partition/slice?

My limits are (far) more  conservative than yours:

$ ulimit -a
time(cpu-seconds)unlimited
file(blocks) unlimited
coredump(blocks) unlimited
data(kbytes) 524288
stack(kbytes)4096
lockedmem(kbytes)315906
memory(kbytes)   946192
nofiles(descriptors) 64
processes64
$

Lastly, as what user are you building the port?

Kind Regards,
JCR




Re: java on openbsd 4.0?

2007-01-09 Thread J.C. Roberts
On Tuesday 09 January 2007 08:37, Gustavo Rios wrote:
 Is it possible to build jdk;java directly from openbsd: I always
 believed i had to install linux emulation first.

 Thanks for the clarifications.

Hi Gustavo,

For building 1.4, you need the 1.3-linux port installed. The latter 
requires the kern.emul.linux sysctrl enabled in kernel as well as the 
redhat base port (6.2 or better). For building 1.5, you need to have 
1.4 installed. -The typical Sun chicken and egg problem.

The port dependencies are changing for the next release. According to 
what I read on ports@, if you follow -CURRENT, there have been some 
recent changes to the 1.5 jdk port which uses a different/lightweight 
jvm to prevent the Sun chicken-egg (and linux) problems.

Most of all, do not get your hopes up. Even if you only want to use 
java applications, the odds of them working correctly is not very good 
in spite of the supposed run anywhere crap that Sun states.

The painfully sad truth is if you're doing any serious development and 
testing in Java, you have to debug everywhere and you normally need to 
have ton of jre/jdk installations on each of your supported OS/hardware 
combinations. You really do need multiple systems as well as multiple 
installations of java on each system; versions, subversions and 
sub-subversion (1.4-01, 1.4-02, 1.4-03 and so on as well as 1.5-01, 
1.5-02 ... ad infinitum). It's a major pain in the ass. I truly hate it 
and I won't touch java unless someone is paying me really well to deal 
with such headaches.

Sun doesn't actually fix java bugs, instead they just move the bugs 
around so you never know where they are hiding. ;-)

kind regards,
jcr



Re: java on openbsd 4.0?

2007-01-09 Thread Kurt Miller
On Monday 08 January 2007 8:38 pm, bofh wrote:
 What am I doing wrong?  This is openbsd 4.0 on a DL145, dual opteron.
 Thanx for any pointers!

I've replied to your build problem on the ports@ list, but
just to clarify some things said in this thread:

Beginning with OpenBSD 4.0 devel/jdk/1.5 no longer
requires users to src build 1.3-linux and 1.4. It
uses an open-source jdk to bootstrap the build now.

-Kurt



Re: java on openbsd 4.0?

2007-01-09 Thread J.C. Roberts
On Tuesday 09 January 2007 09:08, J.C. Roberts wrote:
  When I built 1.5 on openbsd 3.9-current, it didn't require building
  1.3 and 1.4.  It didn't look like 4.0 needed it either.  In fact,
  on amd64, it won't build jdk1.4

 Though people joke about the chicken-egg problem, you need a working
 JVM to build the jdk, so maybe you just didn't notice the use/install
 of a previous version (i.e. scrolled far off screen).


As for the dependencies in the jdk/1.5 port, it varies based on arch and 
port flavor you want to build. There was a post to the ports@ mailing 
list recently regarding changes in the dependencies. In general, you 
need a jvm to build one. In the case of the jdk/1.5 port on 4.0-STABLE, 
it tends to use kaffe rather than Sun on most flavors other than the 
native-bootstrap flavor.

BTW, if your goal is to have a working java plugin for mozilla/firefox I 
suggest you read /usr/ports/devel/jdk/1.5/pkg/MESSAGE-amd64

  NOTE: The plugin does not work on amd64 yet.

Well, the 1.4 port completed it's build, installed successfully and 
surprisingly enough, actually runs. ;-)

$ java -version
java version 1.4.2-p7
Java(TM) 2 Runtime Environment, Standard Edition (build 
1.4.2-p7-_09_jan_2007_05_58)
Java HotSpot(TM) Client VM (build 1.4.2-p7-_09_jan_2007_05_58, mixed 
mode)
$

I've hit a different problem than yours while trying to build jdk/1.5, 
well more accurately, trying to build the lang/kaffe dependency 
mentioned above.

Adding java source files from VM 
directory 
/usr/ports/lang/kaffe/w-kaffe-1.1.7p2/kaffe-1.1.7/libraries/javalib/vmspecific
Adding generated files in builddir '..'.
gmake[3]: *** No rule to make target 
`/usr/ports/lang/kaffe/w-kaffe-1.1.7p2/kaffe-1.1.7/libraries/javaoosowxuownonowmkwssxozuwo',
 
needed by `compile-classes'.  Stop.
gmake[3]: Leaving directory 
`/usr/ports/lang/kaffe/w-kaffe-1.1.7p2/build-i386/libraries/javalib/external/classpath/lib'
gmake[2]: *** [install-recursive] Error 1
gmake[2]: Leaving directory 
`/usr/ports/lang/kaffe/w-kaffe-1.1.7p2/build-i386/libraries/javalib/external/classpath'
gmake[1]: *** [install-recursive] Error 1
gmake[1]: Leaving directory 
`/usr/ports/lang/kaffe/w-kaffe-1.1.7p2/build-i386/libraries/javalib'
gmake: *** [install-recursive] Error 1
*** Error code 2

Stop in /usr/ports/lang/kaffe (line 1995 
of /usr/ports/infrastructure/mk/bsd.port.mk).
*** Error code 1

Stop in /usr/ports/devel/jdk/1.5 (line 1431 
of /usr/ports/infrastructure/mk/bsd.port.mk).
$ 

give me a few and I might be able to get it sorted out...

jcr



Re: java on openbsd 4.0?

2007-01-09 Thread Jeremy Huiskamp

On 9-Jan-07, at 12:42 PM, J.C. Roberts wrote:

The painfully sad truth is if you're doing any serious development and
testing in Java, you have to debug everywhere and you normally need to
have ton of jre/jdk installations on each of your supported OS/ 
hardware

combinations. You really do need multiple systems as well as multiple
installations of java on each system; versions, subversions and
sub-subversion (1.4-01, 1.4-02, 1.4-03 and so on as well as 1.5-01,
1.5-02 ... ad infinitum). It's a major pain in the ass. I truly  
hate it

and I won't touch java unless someone is paying me really well to deal
with such headaches.


Who fed you that load of silliness?  I could maybe understand having 1.4
and 1.5 but if you can't keep something stable across the small releases
you're doing something seriously stupid.



Re: java on openbsd 4.0?

2007-01-09 Thread Zoong PHAM
On Tuesday,  9 January 2007 at 13:37:37 -0300, Gustavo Rios wrote:
 Is it possible to build jdk;java directly from openbsd: I always
 believed i had to install linux emulation first.

No, I don't think so.

I just installed jdk-1.5.0p19
from the port: very much make; make install

After that, I could compile and run helloworld.java :-)

If you want the packages, email me privately.

HTH,
Zoong



Re: java on openbsd 4.0?

2007-01-09 Thread J.C. Roberts
On Tuesday 09 January 2007 12:26, Zoong PHAM wrote:
 On Tuesday,  9 January 2007 at 13:37:37 -0300, Gustavo Rios wrote:
  Is it possible to build jdk;java directly from openbsd: I always
  believed i had to install linux emulation first.

 No, I don't think so.

 I just installed jdk-1.5.0p19
 from the port: very much make; make install

 After that, I could compile and run helloworld.java :-)

 If you want the packages, email me privately.

 HTH,
 Zoong

Actually the answer depends on which sun java version you're trying to 
build.

The devel/jdk/1.4 port requires linux emulation so it can execute the 
java vm necessary to complete the build.

The devel/jdk/1.5 port depends on the lang/kaffe port for the java vm 
needed to complete the build (on most all of the 1.5 port flavors 
except the native-bootstrap flavor). 

JCR



Re: java on openbsd 4.0?

2007-01-09 Thread steven mestdagh
Gustavo Rios [2007-01-09, 13:37:37]:
 Is it possible to build jdk;java directly from openbsd: I always
 believed i had to install linux emulation first.

if something is unclear about the section 'Building the Sun JDK' in
FAQ 8, please let us know what it is.

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



java on openbsd 4.0?

2007-01-08 Thread bofh

Hi,
I am trying to compile jdk on openbsd 4.0.  I max'ed out all the
ulimits I can find:

# ulimit -a
time(cpu-seconds)unlimited
file(blocks) unlimited
coredump(blocks) unlimited
data(kbytes) 1048576
stack(kbytes)32768
lockedmem(kbytes)unlimited
memory(kbytes)   unlimited
nofiles(descriptors) 1772
processes532

[...]
usr/ports/devel/jdk/1.5/w-jdk-1.5.0p20/control/build/bsd-amd64/bin/java
-classpath ../../../tools/CompileProperties CompileProperties
../../../../src/share/classes/com/sun/tools/javac/resources/compiler.properties
/usr/ports/devel/jdk/1.5/w-jdk-1.5.0p20/control/build/bsd-amd64/gensrc/com/sun/tools/javac/resources/compiler.java
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
gmake[6]: *** 
[/usr/ports/devel/jdk/1.5/w-jdk-1.5.0p20/control/build/bsd-amd64/gensrc/com/sun/tools/javac/resources/compiler.java]
Error 1
[...]

Stop in /usr/ports/devel/jdk/1.5 (line 1942 of /usr/ports/infrastructure/mk/bsd.

I tried installing the jdk I had built under 3.9, jdk-1.5.0p14, that
installed without problems, however:

# ulimit -a ;/usr/local/jdk-1.5.0/bin/java -showversion
time(cpu-seconds)unlimited
file(blocks) unlimited
coredump(blocks) unlimited
data(kbytes) 1048576
stack(kbytes)32768
lockedmem(kbytes)unlimited
memory(kbytes)   unlimited
nofiles(descriptors) 1772
processes532
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.


What am I doing wrong?  This is openbsd 4.0 on a DL145, dual opteron.
Thanx for any pointers!

dmesg follows:

OpenBSD 4.0 (GENERIC.MP) #967: Sat Sep 16 20:38:15 MDT 2006
  [EMAIL PROTECTED]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 3219894272 (3144428K)
avail mem = 2757484544 (2692856K)
using 22937 buffers containing 322195456 bytes (314644K) of memory
mainbus0 (root)
bios0 at mainbus0: SMBIOS rev. 2.34 @ 0xf11f0 (45 entries)
bios0: HP ProLiant DL145 G2
: bus_space_map(1 ca0 2 0 0x80b64c48) failed
ipmi at mainbus0 not configured
mainbus0: Intel MP Specification (Version 1.4) (AMD  HAMMER  )
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Dual Core AMD Opteron(tm) Processor 275, 2210.44 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB
64b/line 16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: apic clock running at 200MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Dual Core AMD Opteron(tm) Processor 275, 2210.19 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB
64b/line 16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Dual Core AMD Opteron(tm) Processor 275, 2210.19 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu2: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB
64b/line 16-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu2: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Dual Core AMD Opteron(tm) Processor 275, 2210.19 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW
cpu3: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 1MB
64b/line 16-way L2 cache
cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu3: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative
mpbios: bus 0 is type PCI
mpbios: bus 1 is type PCI
mpbios: bus 2 is type PCI
mpbios: bus 3 is type PCI
mpbios: bus 4 is type PCI
mpbios: bus 128 is type PCI
mpbios: bus 129 is type PCI
mpbios: bus 134 is type PCI
mpbios: bus 139 is type ISA
ioapic0 at mainbus0 apid 4 pa 0xfec0, version 11, 24 pins
ioapic1 at mainbus0 apid 5 pa 0xd800, version 11, 7 pins
ioapic2 at mainbus0 apid 6 pa 0xd8001000, version 11, 7 pins
pci0 at mainbus0 bus 0: configuration mode 1
NVIDIA nForce4 DDR rev 0xa3 at pci0 dev 0 function 0 not configured
pcib0 at pci0 dev 1 function 0 NVIDIA nForce4 ISA rev 0xa3
nviic0 at pci0 dev 1 function 1 NVIDIA nForce4 SMBus rev 0xa2
iic0 at nviic0
iic1 at nviic0
admtm0 at iic1 addr 0x2d: