java on openbsd 4.0?

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

java on openbsd 4.0?

bofh-6
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
processes            532

[...]
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
processes            532
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
   [hidden email]:/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 0xffffffff80b64c48) 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 0xfec00000, version 11, 24 pins
ioapic1 at mainbus0 apid 5 pa 0xd8000000, 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: 47m192
ohci0 at pci0 dev 2 function 0 "NVIDIA nForce4 USB" rev 0xa2: apic 4
int 10 (irq 10), version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: NVIDIA OHCI root hub, rev 1.00/1.00, addr 1
uhub0: 4 ports with 4 removable, self powered
ehci0 at pci0 dev 2 function 1 "NVIDIA nForce4 USB" rev 0xa3: apic 4
int 11 (irq 11)
ehci0: timed out waiting for BIOS
usb1 at ehci0: USB revision 2.0
uhub1 at usb1
uhub1: NVIDIA EHCI root hub, rev 2.00/1.00, addr 1
uhub1: 4 ports with 4 removable, self powered
pciide0 at pci0 dev 6 function 0 "NVIDIA nForce4 IDE" rev 0xa2: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <TEAC, DV-28E-N, C.6B> SCSI0 5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 disabled (no drives)
pciide1 at pci0 dev 8 function 0 "NVIDIA nForce4 SATA" rev 0xa3: DMA
pciide1: using apic 4 int 10 (irq 10) for native-PCI interrupt
ppb0 at pci0 dev 9 function 0 "NVIDIA nForce4 PCI-PCI" rev 0xa2
pci1 at ppb0 bus 1
vga1 at pci1 dev 5 function 0 "NVIDIA GeForce2 MX" rev 0xb2
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
ppb1 at pci0 dev 12 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
pci2 at ppb1 bus 2
bge0 at pci2 dev 0 function 0 "Broadcom BCM5721" rev 0x11, BCM5750 B1
(0x4101): apic 4 int 11 (irq 11), address 00:14:c2:3a:ca:bc
brgphy0 at bge0 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
ppb2 at pci0 dev 13 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
pci3 at ppb2 bus 3
bge1 at pci3 dev 0 function 0 "Broadcom BCM5721" rev 0x11, BCM5750 B1
(0x4101): apic 4 int 10 (irq 10), address 00:14:c2:3a:ca:bd
brgphy1 at bge1 phy 1: BCM5750 10/100/1000baseT PHY, rev. 0
ppb3 at pci0 dev 14 function 0 "NVIDIA nForce4 PCIE" rev 0xa3
pci4 at ppb3 bus 4
pchb0 at pci0 dev 24 function 0 "AMD AMD64 HyperTransport" rev 0x00
pci5 at pchb0 bus 128
ppb4 at pci5 dev 1 function 0 "AMD 8132 PCIX" rev 0x11
pci6 at ppb4 bus 129
"AMD 8132 PCIX IOAPIC" rev 0x11 at pci5 dev 1 function 1 not configured
ppb5 at pci5 dev 2 function 0 "AMD 8132 PCIX" rev 0x11
pci7 at ppb5 bus 134
ami0 at pci7 dev 1 function 0 "Symbios Logic MegaRAID" rev 0x01: apic
4 int 11 (irq 11)
ami0: LSI 520, 64b/lhc, FW 1L37, BIOS vG119, 64MB RAM
ami0: 1 channels, 0 FC loops, 1 logical drives
scsibus1 at ami0: 40 targets
sd0 at scsibus1 targ 0 lun 0: <AMI, Host drive #00, > SCSI2 0/direct fixed
sd0: 140013MB, 140013 cyl, 64 head, 32 sec, 512 bytes/sec, 286746624 sec total
scsibus2 at ami0: 16 targets
"AMD 8132 PCIX IOAPIC" rev 0x11 at pci5 dev 2 function 1 not configured
pchb1 at pci0 dev 24 function 1 "AMD AMD64 Address Map" rev 0x00
pchb2 at pci0 dev 24 function 2 "AMD AMD64 DRAM Cfg" rev 0x00
pchb3 at pci0 dev 24 function 3 "AMD AMD64 Misc Cfg" rev 0x00
pchb4 at pci0 dev 25 function 0 "AMD AMD64 HyperTransport" rev 0x00
pchb5 at pci0 dev 25 function 1 "AMD AMD64 Address Map" rev 0x00
pchb6 at pci0 dev 25 function 2 "AMD AMD64 DRAM Cfg" rev 0x00
pchb7 at pci0 dev 25 function 3 "AMD AMD64 Misc Cfg" rev 0x00
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
uhub2 at uhub0 port 2
uhub2: Dell Dell USB Keyboard Hub, rev 1.10/2.00, addr 2
uhub2: 3 ports with 2 removable, bus powered
uhidev0 at uhub2 port 1 configuration 1 interface 0
uhidev0: Dell Dell USB Keyboard Hub, rev 1.10/2.00, addr 3, iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
uhidev1 at uhub2 port 1 configuration 1 interface 1
uhidev1: Dell Dell USB Keyboard Hub, rev 1.10/2.00, addr 3, iclass 3/0
uhidev1: 3 report ids
uhid0 at uhidev1 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev1 reportid 2: input=1, output=0, feature=0
uhid2 at uhidev1 reportid 3: input=3, output=1, feature=1
uhidev2 at uhub2 port 2 configuration 1 interface 0
uhidev2: Logitech Optical USB Mouse, rev 2.00/3.40, addr 4, iclass 3/1
ums0 at uhidev2: 3 buttons and Z dir.
wsmouse0 at ums0 mux 0
dkcsum: sd0 matches BIOS drive 0x80
root on sd0a
rootdev=0x400 rrootdev=0xd00 rawdev=0xd02
uhub2: at uhub0 port 2 (addr 2) disconnected
uhidev0: at uhub2 port 1 (addr 3) disconnected
wskbd1: disconnecting from wsdisplay0
wskbd1 detached
ukbd0 detached
uhidev0 detached
uhidev1: at uhub2 port 1 (addr 3) disconnected
uhid0 detached
uhid1 detached
uhid2 detached
uhidev1 detached
uhidev2: at uhub2 port 2 (addr 4) disconnected
wsmouse0 detached
ums0 detached
uhidev2 detached
uhub2 detached

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

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.

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

bofh-6
On 1/9/07, J.C. Roberts <[hidden email]> 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.

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

J.C. Roberts
On Tuesday 09 January 2007 06:20, bofh wrote:

> On 1/9/07, J.C. Roberts <[hidden email]> 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
processes            64
$

Lastly, as what user are you building the port?

Kind Regards,
JCR

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

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 <[hidden email]> wrote:

> On Tuesday 09 January 2007 06:20, bofh wrote:
> > On 1/9/07, J.C. Roberts <[hidden email]> 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
> processes            64
> $
>
> Lastly, as what user are you building the port?
>
> Kind Regards,
> JCR

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

bofh-6
In reply to this post by J.C. Roberts
Oops, didn't not send to misc

On 1/9/07, bofh <[hidden email]> wrote:

> On 1/9/07, J.C. Roberts <[hidden email]> wrote:
> >
> > 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.
>
> Thanx!
>
> > 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
>
> 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
>
> > Like OpenOffice, building java seems to use a a lot of swap. How large
> > is your swap partition/slice?
>
> From top:
> Memory: Real: 9356K/405M act/tot  Free: 2585M  Swap: 0K/2000M used/tot
>
> From dmesg:
> real mem = 3219894272 (3144428K)
> avail mem = 2757484544 (2692856K)
> using 22937 buffers containing 322195456 bytes (314644K) of memory
>
> so I should have plenty of ram for it to play with.
>
> > 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
> > processes            64
> > $
> >
> > Lastly, as what user are you building the port?
>
> root.
>
> This is basically a brand new install of 4.0 on a amd64 box, and the
> following commands:
>
> % sudo ksh
> # cd /usr/ports/devel/jdk/1.5
> # make install
> [get error, cuss, read Makefile, make ulimit adjustments, and]
> # make install
>
> Thanx!
>
> Apropos of nothing - I found that openbsd 4.0 x86 will not install on
> this box, the megaraid drivers didn't load properly.  Amd64 version of
> 4.0 loaded up fine however.

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

J.C. Roberts
In reply to this post by J.C. Roberts
probably best to keep this on list...

On Tuesday 09 January 2007 08:37, bofh wrote:
> On 1/9/07, J.C. Roberts <[hidden email]> wrote:
> > 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.
>
> Thanx!
>

Sorry if my earlier reply seemed a bit pissy but mixing versions
OS/pacakage/ports versions is a recurring problem. Obviously stuff
changes from OS version to OS version so the odds of version mixing
ever working are very slim. Though I now understand you just wanted to
give it a try regardless if it was supported (or smart), neither you
nor I have any clue what, if any, damage has been done to your package
system (tracking and such) by adding a 3.9 package to a 4.0 system.

You might also want to note that the heap allocation error you got while
building 1.5 is the nearly the same error which you got when trying to
run the 3.0 java package on the 4.0 system...

If your failing 1.5 build on 4.0 is trying to use the 3.9 package you
installed, you're looking at a real mess.

> > 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
>
> 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).

If you look at the -CURRENT source tree or read ports@, you'll see
things have changed since 4.0 release. Instead of needing to walk
backwards from 1.5 to 1.4 to ... they are now using a different jvm to
complete the 1.5 build.


> > Like OpenOffice, building java seems to use a a lot of swap. How
> > large is your swap partition/slice?
>
> From top:
> Memory: Real: 9356K/405M act/tot  Free: 2585M  Swap: 0K/2000M
> used/tot
>
> From dmesg:
> real mem = 3219894272 (3144428K)
> avail mem = 2757484544 (2692856K)
> using 22937 buffers containing 322195456 bytes (314644K) of memory
>
> so I should have plenty of ram for it to play with.
>

not ram, instead your swap disk partition. I'm running 3 GiByte
(overkill) for swap simply because this workstation has more disk space
than I'll ever need and some day I'd like to build Open Office which
supposedly takes up to 2GiBytes of swap space.

> > 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
> > processes            64
> > $
> >
> > Lastly, as what user are you building the port?
>
> root.
>
> This is basically a brand new install of 4.0 on a amd64 box, and the
> following commands:
>
> % sudo ksh
> # cd /usr/ports/devel/jdk/1.5
> # make install
> [get error, cuss, read Makefile, make ulimit adjustments, and]
> # make install
>
> Thanx!
>

Good.

> Apropos of nothing - I found that openbsd 4.0 x86 will not install on
> this box, the megaraid drivers didn't load properly.  Amd64 version
> of 4.0 loaded up fine however.

You should probably research and report this bug.

Kind Regards,
JCR

Reply | Threaded
Open this post in threaded view
|

snort bpf file problems

danno
In reply to this post by bofh-6
I'm running Snort 2.4.5 (the pkg) on OpenBSD 4.0 and I use a bpf filter
file to have Snort ignore certain hosts altogether.

The command I'm using is 'snort  -D -i dc1 -F bpfile'

When I have the single line of-

not host 192.168.1.69

Snort runs fine. But when I lengthen the bpf filter file to-

not host 192.168.1.69
and not host 10.1.1.1
and not host 4.2.2.2
... 60 more addresses ...
and not host 6.6.6.6

Snort chokes with the following error-

snort: FATAL ERROR: OpenPcap() setfilter:         BIOCSETF: Invalid
argument

The BPF file I'm using is one I pulled from another snort installation I
have running on -gasp- Fedora (I mention this because it has no problems
parsing the same file.) Is there a way to have multiple entries in the
BPF file that I'm missing... am I using the wrong syntax (is there an
alternative to 'and not host' that I need to use)?


Dan Farrell
Applied Innovations
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

J.C. Roberts
In reply to this post by Gustavo Rios
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

Reply | Threaded
Open this post in threaded view
|

Re: snort bpf file problems

J.C. Roberts
In reply to this post by danno
On Tuesday 09 January 2007 09:34, Dan Farrell wrote:
> I'm running Snort 2.4.5 (the pkg) on OpenBSD 4.0 and I use a bpf
> filter file to have Snort ignore certain hosts altogether.

Hey Dan,

It would be much appreciated if you would stop starting new messages by
replying to an existing post. What you are doing screws up threading of
messages because your mail client is putting in a "In-Reply-To:" and/or
"References:" header pointing to back to the original post.

If you use the "new message" or "new email" feature of your mail client
and type in the [hidden email] address when starting a new
message/topic/thread, it will solve the problem.

thanks,
jcr

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

Kurt Miller-4
In reply to this post by bofh-6
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

Reply | Threaded
Open this post in threaded view
|

snort bpf file problems

danno
In reply to this post by danno
I'm reposting this as its own new post because J.C. Roberts pointed out
how my laziness screws up threads...


I'm running Snort 2.4.5 (the pkg) on OpenBSD 4.0 and I use a bpf filter
file to have Snort ignore certain hosts altogether.

The command I'm using is 'snort  -D -i dc1 -F bpfile'

When I have the single line of-

not host 192.168.1.69

Snort runs fine. But when I lengthen the bpf filter file to-

not host 192.168.1.69
and not host 10.1.1.1
and not host 4.2.2.2
... 60 more addresses ...
and not host 6.6.6.6

Snort chokes with the following error-

snort: FATAL ERROR: OpenPcap() setfilter:         BIOCSETF: Invalid
argument

The BPF file I'm using is one I pulled from another snort installation I
have running on -gasp- Fedora (I mention this because it has no problems
parsing the same file.) Is there a way to have multiple entries in the
BPF file that I'm missing... am I using the wrong syntax (is there an
alternative to 'and not host' that I need to use)?


Dan Farrell
Applied Innovations
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

J.C. Roberts
In reply to this post by 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

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

Jeremy Huiskamp
In reply to this post by J.C. Roberts
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.

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

Zoong PHAM
In reply to this post by Gustavo Rios
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

Reply | Threaded
Open this post in threaded view
|

Re: snort bpf file problems

Can Erkin Acar
In reply to this post by danno
Dan Farrell wrote:
> I'm running Snort 2.4.5 (the pkg) on OpenBSD 4.0 and I use a bpf filter
> file to have Snort ignore certain hosts altogether.
>
> The command I'm using is 'snort  -D -i dc1 -F bpfile'

The kernel has a limit for the maximum number of filter
instructions. Currently it is set to 512. This is the
limit you are hitting with your filter definition.

Since the buffers are not allocated until you set a
filter, it seems safe to increase the limit
it is defined in src/sys/net/bpf.h
#define BPF_MAXINSNS 512
you will have to compile a new kernel

> When I have the single line of-
>
> not host 192.168.1.69
>
> Snort runs fine. But when I lengthen the bpf filter file to-
>
> not host 192.168.1.69
> and not host 10.1.1.1
> and not host 4.2.2.2
> ... 60 more addresses ...
> and not host 6.6.6.6
>
> Snort chokes with the following error-
>
> snort: FATAL ERROR: OpenPcap() setfilter:         BIOCSETF: Invalid
> argument
>
> The BPF file I'm using is one I pulled from another snort installation I
> have running on -gasp- Fedora (I mention this because it has no problems
> parsing the same file.) Is there a way to have multiple entries in the
> BPF file that I'm missing... am I using the wrong syntax (is there an
> alternative to 'and not host' that I need to use)?
>
>
> Dan Farrell
> Applied Innovations
> [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: snort bpf file problems

Stuart Henderson
On 2007/01/09 23:03, Can Erkin Acar wrote:

> Dan Farrell wrote:
> > I'm running Snort 2.4.5 (the pkg) on OpenBSD 4.0 and I use a bpf filter
> > file to have Snort ignore certain hosts altogether.
> >
> > The command I'm using is 'snort  -D -i dc1 -F bpfile'
>
> The kernel has a limit for the maximum number of filter
> instructions. Currently it is set to 512. This is the
> limit you are hitting with your filter definition.
>
> Since the buffers are not allocated until you set a
> filter, it seems safe to increase the limit
> it is defined in src/sys/net/bpf.h
> #define BPF_MAXINSNS 512
> you will have to compile a new kernel

Alexander Zatserkovniy sent me these patches to fix the support that
was already in snort to handle packets with pflog headers (snort didn't
update it after the header format last changed); this allows selection
via PF rules rather than BPF (and with the new clonable pflogNN you
can have a bunch of different options ready and choose from them).
As well as using them on the pflog interfaces directly you should
also be able to use them on files produced by pflogd.

I haven't tested myself but it may be useful...

diff -Naur snort-2.4.5/src/decode.c snort-2.4.5-patched/src/decode.c
--- src-orig/decode.c Sat Sep 17 08:06:35 2005
+++ src/decode.c Thu Dec 14 15:39:51 2006
@@ -1204,7 +1204,7 @@
     p->pfh = (PflogHdr *) pkt;
 
     /*  get the network type - should only be AF_INET or AF_INET6 */
-    switch(ntohs(p->pfh->af))
+    switch((unsigned short)p->pfh->af)
     {
         case AF_INET:   /* IPv4 */
             DEBUG_WRAP(DebugMessage(DEBUG_DECODE, "IP datagram size calculated to be %lu "


diff -Naur snort-2.4.5/src/decode.h snort-2.4.5-patched/src/decode.h
--- src-orig/decode.h Fri Sep  2 08:09:20 2005
+++ src/decode.h Thu Dec 14 15:37:29 2006
@@ -724,7 +724,7 @@
 
 typedef struct _Pflog_hdr
 {
-        int8_t          length;
+        u_int8_t          length;
         sa_family_t     af;
         u_int8_t        action;
         u_int8_t        reason;
@@ -732,6 +732,10 @@
         char            ruleset[16];
         u_int32_t       rulenr;
         u_int32_t       subrulenr;
+        uid_t           uid;
+        pid_t           pid;
+        uid_t           rule_uid;
+        pid_t           rule_pid;
         u_int8_t        dir;
         u_int8_t        pad[3];
 } PflogHdr;

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

J.C. Roberts
In reply to this post by Zoong PHAM
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

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

steven mestdagh
In reply to this post by Gustavo Rios
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

Reply | Threaded
Open this post in threaded view
|

Re: java on openbsd 4.0?

bofh-6
In reply to this post by bofh-6
On 1/10/07, J.C. Roberts <[hidden email]> 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:
[hidden email]).

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.

12