Re: OpenMP in GCC

2015-06-11 Thread Guenther Niess
On 06/02/15 16:27, Pascal Stumpf wrote:
> On Tue, 02 Jun 2015 16:20:06 +0200, Guenther Niess wrote:
>> Hi,
>> I wanted to compile and run a small simulation with OpenMP and applied
>> the patch below to compile gcc 4.9 with libgomp. It seems very
>> straightforward so I'm wondering why it is disabled in ports?
>>
>> I run a make test and what I can see the openmp test seems to have no
>> problem..
>>
>> Running
>> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/format/format.exp
>> ...
>> Running
>> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/gomp/gomp.exp ...
>> Running
>> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/graphite/graphite.exp
>> ...
>> Running
>> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/guality/guality.exp
>> ...
> 
> Thanks; this was on my to-do list.  I'll test and commit as time
> permits.
> 

To test a little bit more I added an openmp flavor to rawtherapee and
run the default benchmark from the tools directory with and without
OpenMP. Here some results from -CURRENT and with my Core2 Quad CPU Q6600.

Without:
Benchmark 01 "Neutral.pp3" 13.433
Benchmark 02 "Neutral.pp3" 13.199
Benchmark 03 "Neutral.pp3" 13.160
Benchmark 04 "Neutral.pp3" 13.189
Benchmark 05 "Neutral.pp3" 13.152
Benchmark "Neutral.pp3" average13.226

Benchmark 01 "Default.pp3" 20.859
Benchmark 02 "Default.pp3" 20.891
Benchmark 03 "Default.pp3" 20.868
Benchmark 04 "Default.pp3" 20.904
Benchmark 05 "Default.pp3" 20.754
Benchmark "Default.pp3" average20.855

Benchmark total.. 170.409

Average times for each tool:
Default.pp320.855
Neutral.pp313.226


With enabled OpenMP:
Benchmark 01 "Neutral.pp3"..4.668
Benchmark 02 "Neutral.pp3"..4.664
Benchmark 03 "Neutral.pp3"..4.652
Benchmark 04 "Neutral.pp3"..4.659
Benchmark 05 "Neutral.pp3"..4.687
Benchmark "Neutral.pp3" average 4.666

Benchmark 01 "Default.pp3"..6.838
Benchmark 02 "Default.pp3"..7.506
Benchmark 03 "Default.pp3"..7.007
Benchmark 04 "Default.pp3"..6.776
Benchmark 05 "Default.pp3"..6.815
Benchmark "Default.pp3" average 6.988

Benchmark total58.272

Average times for each tool:
Default.pp3 6.988
Neutral.pp3 4.666


And the patch I used:
Index: Makefile
===
RCS file: /cvs/ports/graphics/rawtherapee/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile31 May 2015 06:32:06 -  1.11
+++ Makefile11 Jun 2015 09:16:33 -
@@ -26,11 +26,21 @@ WANTLIB += tiff z
 MASTER_SITES = http://www.rawtherapee.com/shared/source/
 EXTRACT_SUFX = .tar.xz

+FLAVORS =  openmp
+FLAVOR ?=
+
 MODULES =  devel/cmake \
devel/gettext
 RUN_DEPENDS =  devel/desktop-file-utils \
x11/gtk+3,-guic

+.if ${FLAVOR:Mopenmp}
+WANTLIB += gomp
+MODULES += gcc4
+MODGCC4_ARCHS =amd64 i386
+MODGCC4_LANGS =c c++
+.endif
+
 LIB_DEPENDS =  audio/libcanberra,-gtk \
devel/libsigc++-2 \
graphics/libiptcdata \
@@ -39,8 +49,11 @@ LIB_DEPENDS =audio/libcanberra,-gtk \
x11/gtk2mm

 CONFIGURE_ARGS +=  -DBUILD_SHARED=ON \
-   -DOPTION_OMP=OFF \
-DCMAKE_CXX_FLAGS_RELEASE=${CXXFLAGS}
+
+.if !${FLAVOR:Mopenmp}
+CONFIGURE_ARGS +=  -DOPTION_OMP=OFF
+.endif

 #NO_TEST = Yes




Re: OpenMP in GCC

2015-06-07 Thread Guenther Niess
On 06/05/15 08:49, Guenther Niess wrote:
> 
> So far on my amd64 I haven't noticed any regression (on port building
> or OpenMP itself) and my small program needs now with multiple
> threads only half of the time.

I've encountered one issue. ImageMagick is build with gcc from base and
wants to link against libgomp which fails. So I disabled OpenMP in
ImageMagick.

Regards

Index: graphics/ImageMagick/Makefile
===
RCS file: /cvs/ports/graphics/ImageMagick/Makefile,v
retrieving revision 1.137
diff -u -p -r1.137 Makefile
--- graphics/ImageMagick/Makefile   1 Jun 2015 06:54:02 -
1.137
+++ graphics/ImageMagick/Makefile   7 Jun 2015 07:58:48 -
@@ -72,7 +72,8 @@ CONFIGURE_ARGS+=  --with-quantum-depth=16

--with-gs-font-dir=${LOCALBASE}/share/fonts/ghostscript \
--with-ltdl-include=${LOCALBASE}/include \
--with-ltdl-lib=${LOCALBASE}/lib \
-   --disable-ltdl-install
+   --disable-ltdl-install \
+   --disable-openmp

 CONFIGURE_ENV+=CPPFLAGS="-I${LOCALBASE}/include/libxml2
-I${LOCALBASE}/include" \
LDFLAGS="-L${WRKBUILD}/magick/.libs
-L${WRKBUILD}/wand/.libs -L${LOCALBASE}/lib" \



tcl and tk distinfo

2015-06-06 Thread Guenther Niess
Hi,
is it possible that the distinfo files for tcl8.5.18 and tk8.5.18 are
wrong? I've problems getting the source files and when I searched online
for checksums and checked it manually it seems my downloaded files are good.

Regards



Re: OpenMP in GCC

2015-06-04 Thread Guenther Niess


On 06/02/15 16:27, Pascal Stumpf wrote:
> On Tue, 02 Jun 2015 16:20:06 +0200, Guenther Niess wrote:
> Thanks; this was on my to-do list.  I'll test and commit as time
> permits.
> Meanwhile: Have you verified that this really only works on amd64
> and i386?  In any case, omp.h should move to PFRAG.GOMP-main, and the
> library version should start at 0.

I followed your advice and updated the patch. So far on my amd64 I
haven't noticed any regression (on port building or OpenMP itself) and
my small program needs now with multiple threads only half of the time.

Regards


Index: lang/gcc/4.9/Makefile
===
RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- lang/gcc/4.9/Makefile   22 May 2015 11:31:16 -  1.13
+++ lang/gcc/4.9/Makefile   5 Jun 2015 06:39:39 -
@@ -53,7 +53,8 @@ SHARED_LIBS = estdc++ 17.0 \
itm 2.0 \
atomic  1.0 \
quadmath1.0 \
-   cilkrts 0.0
+   cilkrts 0.0 \
+   gomp0.0


 PSEUDO_FLAVORS = no_c++ no_f95 no_objc no_java no_ada no_go full
@@ -146,7 +147,6 @@ CONFIGURE_ARGS += \
--disable-nls  \
--with-system-zlib \
--disable-libmudflap \
-   --disable-libgomp \
--disable-tls \
--with-as=/usr/bin/as \
--with-ld=/usr/bin/ld \
@@ -189,6 +189,12 @@ PKG_ARGS += -D${MACHINE_ARCH}=1
 PKG_ARGS += -DX86=1
 .else
 PKG_ARGS += -DX86=0
+.endif
+
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
+PKG_ARGS += -DGOMP=1
+.else
+PKG_ARGS += -DGOMP=0
 .endif

 .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "arm" || \
Index: lang/gcc/4.9/pkg/PLIST-libs
===
RCS file: /cvs/ports/lang/gcc/4.9/pkg/PLIST-libs,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-libs
--- lang/gcc/4.9/pkg/PLIST-libs 3 Feb 2015 20:32:12 -   1.2
+++ lang/gcc/4.9/pkg/PLIST-libs 5 Jun 2015 06:39:39 -
@@ -6,5 +6,6 @@
 @lib lib/libgfortran.so.${LIBgfortran_VERSION}
 @lib lib/libobjc.so.${LIBobjc_VERSION}
 %%CILKRTS%%
+%%GOMP%%
 %%ITM%%
 %%QUADMATH%%
Index: lang/gcc/4.9/pkg/PLIST-main
===
RCS file: /cvs/ports/lang/gcc/4.9/pkg/PLIST-main,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST-main
--- lang/gcc/4.9/pkg/PLIST-main 10 Feb 2015 22:04:54 -  1.5
+++ lang/gcc/4.9/pkg/PLIST-main 5 Jun 2015 06:39:39 -
@@ -255,6 +255,7 @@ lib/libssp_nonshared.la
 %%sparc64%%
 %%CILKRTS%%
 %%X86%%
+%%GOMP%%
 %%ITM%%
 %%QUADMATH%%
 libexec/gcc/
--- /dev/null   Fri Jun  5 08:39:44 2015
+++ lang/gcc/4.9/patches/patch-libgomp_Makefile_in  Wed Jun  3 12:30:24 2015
@@ -0,0 +1,22 @@
+$OpenBSD$
+--- libgomp/Makefile.in.origWed Jun  3 12:14:58 2015
 libgomp/Makefile.in Wed Jun  3 12:21:30 2015
+@@ -287,6 +287,9 @@ toolexeclibdir = @toolexeclibdir@
+ top_build_prefix = @top_build_prefix@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
++
++include $(top_srcdir)/../libversions
++
+ ACLOCAL_AMFLAGS = -I .. -I ../config
+ SUBDIRS = testsuite
+ gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
+@@ -308,7 +311,7 @@ nodist_toolexeclib_HEADERS = libgomp.spec
+ @LIBGOMP_BUILD_VERSIONED_SHLIB_FALSE@libgomp_version_dep =
+
@LIBGOMP_BUILD_VERSIONED_SHLIB_GNU_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep
= libgomp.ver
+
@LIBGOMP_BUILD_VERSIONED_SHLIB_SUN_TRUE@@LIBGOMP_BUILD_VERSIONED_SHLIB_TRUE@libgomp_version_dep
= libgomp.ver-sun
+-libgomp_version_info = -version-info $(libtool_VERSION)
++libgomp_version_info = $(LIBgomp_LTVERSION)
+ libgomp_la_LDFLAGS = $(libgomp_version_info) $(libgomp_version_script) \
+ $(lt_host_flags)
+
--- /dev/null   Fri Jun  5 08:39:48 2015
+++ lang/gcc/4.9/pkg/PFRAG.GOMP-libsTue Jun  2 11:31:25 2015
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+@lib lib/libgomp.so.${LIBgomp_VERSION}
--- /dev/null   Fri Jun  5 08:39:51 2015
+++ lang/gcc/4.9/pkg/PFRAG.GOMP-mainWed Jun  3 12:35:05 2015
@@ -0,0 +1,6 @@
+@comment $OpenBSD$
+@info info/libgomp.info
+lib/gcc/${CONFIG}/${V}/include/omp.h
+lib/libgomp.a
+lib/libgomp.la
+lib/libgomp.spec



Re: OpenMP in GCC

2015-06-02 Thread Guenther Niess
On 06/02/15 16:27, Pascal Stumpf wrote:
> On Tue, 02 Jun 2015 16:20:06 +0200, Guenther Niess wrote:
>> Hi,
>> I wanted to compile and run a small simulation with OpenMP and applied
>> the patch below to compile gcc 4.9 with libgomp. It seems very
>> straightforward so I'm wondering why it is disabled in ports?
>>
>> I run a make test and what I can see the openmp test seems to have no
>> problem..
>>
>> Running
>> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/format/format.exp
>> ...
>> Running
>> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/gomp/gomp.exp ...
>> Running
>> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/graphite/graphite.exp
>> ...
>> Running
>> /home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/guality/guality.exp
>> ...
> 
> Thanks; this was on my to-do list.  I'll test and commit as time
> permits.
> Meanwhile: Have you verified that this really only works on amd64
> and i386?  In any case, omp.h should move to PFRAG.GOMP-main, and the
> library version should start at 0.
> 

I didn't do a lot of testing. I wrote to the list, because I thought I'm
missing something obvious. I will test some more the next days with my
small program on my amd64 systems but my pandaboard got broken a few
month ago and I don't have any other hardware to test.
I also plan to make a rebuild of my desktop system (base and ports) with
an up to date -CURRENT tree and will report if something brakes.

Regards



OpenMP in GCC

2015-06-02 Thread Guenther Niess
Hi,
I wanted to compile and run a small simulation with OpenMP and applied
the patch below to compile gcc 4.9 with libgomp. It seems very
straightforward so I'm wondering why it is disabled in ports?

I run a make test and what I can see the openmp test seems to have no
problem..

Running
/home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/format/format.exp
...
Running
/home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/gomp/gomp.exp ...
Running
/home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/graphite/graphite.exp
...
Running
/home/ports/obj/gcc-4.9.2/gcc-4.9.2/gcc/testsuite/gcc.dg/guality/guality.exp
...


Regards


Index: lang/gcc/4.9/Makefile
===
RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- lang/gcc/4.9/Makefile   22 May 2015 11:31:16 -  1.13
+++ lang/gcc/4.9/Makefile   2 Jun 2015 14:03:13 -
@@ -50,6 +50,7 @@ SHARED_LIBS = estdc++ 17.0 \
ssp 4.0 \
lto_plugin  3.0 \
go  3.0 \
+   gomp1.0 \
itm 2.0 \
atomic  1.0 \
quadmath1.0 \
@@ -146,7 +147,6 @@ CONFIGURE_ARGS += \
--disable-nls  \
--with-system-zlib \
--disable-libmudflap \
-   --disable-libgomp \
--disable-tls \
--with-as=/usr/bin/as \
--with-ld=/usr/bin/ld \
@@ -189,6 +189,12 @@ PKG_ARGS += -D${MACHINE_ARCH}=1
 PKG_ARGS += -DX86=1
 .else
 PKG_ARGS += -DX86=0
+.endif
+
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
+PKG_ARGS += -DGOMP=1
+.else
+PKG_ARGS +=-DGOMP=0
 .endif

 .if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "arm" || \
Index: lang/gcc/4.9/pkg/PFRAG.X86-main
===
RCS file: /cvs/ports/lang/gcc/4.9/pkg/PFRAG.X86-main,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 PFRAG.X86-main
--- lang/gcc/4.9/pkg/PFRAG.X86-main 26 Jun 2014 16:30:22 -  1.1.1.1
+++ lang/gcc/4.9/pkg/PFRAG.X86-main 2 Jun 2015 14:03:13 -
@@ -25,6 +25,7 @@ lib/gcc/${CONFIG}/${V}/include/mm3dnow.h
 lib/gcc/${CONFIG}/${V}/include/mm_malloc.h
 lib/gcc/${CONFIG}/${V}/include/mmintrin.h
 lib/gcc/${CONFIG}/${V}/include/nmmintrin.h
+lib/gcc/${CONFIG}/${V}/include/omp.h
 lib/gcc/${CONFIG}/${V}/include/pmmintrin.h
 lib/gcc/${CONFIG}/${V}/include/popcntintrin.h
 lib/gcc/${CONFIG}/${V}/include/prfchwintrin.h
Index: lang/gcc/4.9/pkg/PLIST-libs
===
RCS file: /cvs/ports/lang/gcc/4.9/pkg/PLIST-libs,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST-libs
--- lang/gcc/4.9/pkg/PLIST-libs 3 Feb 2015 20:32:12 -   1.2
+++ lang/gcc/4.9/pkg/PLIST-libs 2 Jun 2015 14:03:13 -
@@ -6,5 +6,6 @@
 @lib lib/libgfortran.so.${LIBgfortran_VERSION}
 @lib lib/libobjc.so.${LIBobjc_VERSION}
 %%CILKRTS%%
+%%GOMP%%
 %%ITM%%
 %%QUADMATH%%
Index: lang/gcc/4.9/pkg/PLIST-main
===
RCS file: /cvs/ports/lang/gcc/4.9/pkg/PLIST-main,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST-main
--- lang/gcc/4.9/pkg/PLIST-main 10 Feb 2015 22:04:54 -  1.5
+++ lang/gcc/4.9/pkg/PLIST-main 2 Jun 2015 14:03:13 -
@@ -255,6 +255,7 @@ lib/libssp_nonshared.la
 %%sparc64%%
 %%CILKRTS%%
 %%X86%%
+%%GOMP%%
 %%ITM%%
 %%QUADMATH%%
 libexec/gcc/
--- /dev/null   Tue Jun  2 16:04:54 2015
+++ lang/gcc/4.9/pkg/PFRAG.GOMP-libsTue Jun  2 11:31:25 2015
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+@lib lib/libgomp.so.${LIBgomp_VERSION}
--- /dev/null   Tue Jun  2 16:05:02 2015
+++ lang/gcc/4.9/pkg/PFRAG.GOMP-mainTue Jun  2 11:32:20 2015
@@ -0,0 +1,5 @@
+@comment $OpenBSD$
+@info info/libgomp.info
+lib/libgomp.a
+lib/libgomp.la
+lib/libgomp.spec



Re: WIP: texlive-2014

2015-05-17 Thread Guenther Niess
On 05/04/2015 03:08 PM, Edd Barrett wrote:
> On Sat, May 02, 2015 at 11:59:10AM +0100, Edd Barrett wrote:
>>> Gzipped diff attached.
> 
> Fixed MASTER_SITES0. New diff attached.

I applied your patch on my amd64 -current system and compiled a few of
my documents. All seems to work fine, if I'm running into problems I
will let you know. Thanks for the patch!




Re: use GLX_MESA_query_renderer in chromium

2015-02-20 Thread Guenther Niess
On 02/17/15 13:02, Robert Nagy wrote:
> I implemented this in a different way already and commited it a coupe of
> days ago without too much patching to chrome itself.

I'm running the current snapshot with the new chromium package, but with
the "chrome --disable-gpu" Problem, Your first patch didn't work with my
radeon card, I will try your 2nd patch and after that jsg patch...

Thanks for working on the problem.


pkg_info chromium
Information for inst:chromium-40.0.2214.114p0
...

dmesg:
OpenBSD 5.7-beta (GENERIC.MP) #856: Tue Feb 17 12:43:12 MST 2015
t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 6424297472 (6126MB)
avail mem = 6249369600 (5959MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf0100 (37 entries)
bios0: vendor Award Software International, Inc. version "F8" date
09/30/2008
bios0: Gigabyte Technology Co., Ltd. EP45-DS3P
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP HPET MCFG APIC SSDT
acpi0: wakeup devices PEX0(S5) PEX1(S5) PEX2(S5) PEX3(S5) PEX4(S5)
PEX5(S5) HUB0(S5) UAR1(S3) IGBE(S4) USB0(S3) USB1(S3) USB2(S3) USB3(S3)
US31(S3) USB4(S3) USB5(S3) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimcfg0 at acpi0 addr 0xe000, bus 0-63
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2133.69 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF
cpu0: 4MB 64b/line 16-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2.0.0.0, IBE
cpu1 at mainbus0: apid 3 (application processor)
cpu1: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2133.41 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF
cpu1: 4MB 64b/line 16-way L2 cache
cpu1: smt 0, core 3, package 0
cpu2 at mainbus0: apid 1 (application processor)
cpu2: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2133.41 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF
cpu2: 4MB 64b/line 16-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 2 (application processor)
cpu3: Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2133.41 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,NXE,LONG,LAHF,PERF
cpu3: 4MB 64b/line 16-way L2 cache
cpu3: smt 0, core 2, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 2
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus 2 (PEX0)
acpiprt2 at acpi0: bus -1 (PEX1)
acpiprt3 at acpi0: bus -1 (PEX2)
acpiprt4 at acpi0: bus -1 (PEX3)
acpiprt5 at acpi0: bus 3 (PEX4)
acpiprt6 at acpi0: bus 4 (PEX5)
acpiprt7 at acpi0: bus 5 (HUB0)
acpicpu0 at acpi0: C3, C2, FVS, 2400, 1600 MHz
acpicpu1 at acpi0: C3, C2, FVS, 2400, 1600 MHz
acpicpu2 at acpi0: C3, C2, FVS, 2400, 1600 MHz
acpicpu3 at acpi0: C3, C2, FVS, 2400, 1600 MHz
acpibtn0 at acpi0: PWRB
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel G45 Host" rev 0x02
ppb0 at pci0 dev 1 function 0 "Intel G45 PCIE" rev 0x02: msi
pci1 at ppb0 bus 1
radeondrm0 at pci1 dev 0 function 0 "ATI Radeon HD 6450" rev 0x00
drm0 at radeondrm0
radeondrm0: msi
azalia0 at pci1 dev 0 function 1 "ATI Radeon HD 6400 Audio" rev 0x00: msi
azalia0: no supported codecs
uhci0 at pci0 dev 26 function 0 "Intel 82801JI USB" rev 0x00: apic 2 int 16
uhci1 at pci0 dev 26 function 1 "Intel 82801JI USB" rev 0x00: apic 2 int 21
uhci2 at pci0 dev 26 function 2 "Intel 82801JI USB" rev 0x00: apic 2 int 18
ehci0 at pci0 dev 26 function 7 "Intel 82801JI USB" rev 0x00: apic 2 int 18
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia1 at pci0 dev 27 function 0 "Intel 82801JI HD Audio" rev 0x00: msi
azalia1: codecs: Realtek ALC885
audio0 at azalia1
ppb1 at pci0 dev 28 function 0 "Intel 82801JI PCIE" rev 0x00: msi
pci2 at ppb1 bus 2
ppb2 at pci0 dev 28 function 4 "Intel 82801JI PCIE" rev 0x00: msi
pci3 at ppb2 bus 3
re0 at pci3 dev 0 function 0 "Realtek 8168" rev 0x02: RTL8168C/8111C
(0x3c00), msi, address 00:1f:d0:23:bc:cd
rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2
ppb3 at pci0 dev 28 function 5 "Intel 82801JI PCIE" rev 0x00: msi
pci4 at ppb3 bus 4
re1 at pci4 dev 0 function 0 "Realtek 8168" rev 0x02: RTL8168C/8111C
(0x3c0

Re: Can't build libiconv on current armv7

2014-07-05 Thread Guenther Niess
On 07/06/14 00:02, Pascal Stumpf wrote:
> And it's far more than just gperf.  So far, I've also stumbled upon
> textproc/groff and devel/protobuf failures, all similar (segfaults,
> failed assertions that go away with -fno-stack-protector).  There is
> obviously a fairly major compiler bug that's hit with the new ssp
> algorithm on arm, and it's breaking most of the ports tree.

Is this related to the broken iostream?

On 06/18/14 21:46, Matthieu Herrb wrote:> Hi
>
> the simple c++ program below dumps core on armv7 (an iMX6 Sabre lite
> board in my case):
>
> #include 
>
> using namespace std;
>
> int
> main(int argç char *argv[])
> {
> cout « "Hello World!" « endl ;
> return 0;
> }
>
> sabre% g++ -g -Wall hello.cc
> sabre% gdb ./a.out
> GNU gdb 6.3
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and
> you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
> This GDB was configured as "arm-unknown-openbsd5.5"...
> (gdb) r
> Starting program: /home/matthieu/prog/c++/a.out
> Hello World!
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x4e3d9934 in std::ostream::flush (this=0x0) at basic_ios.h:308
> 308   { return _M_streambuf; }
> (gdb) bt
> #0  0x4e3d9934 in std::ostream::flush (this=0x0) at basic_ios.h:308
> #1  0x4e3d8944 in std::ostream::operator« (this=Variable "this" is not
> available.
> ) at ostream:117
> #2  0x8da4 in main (argc=1, argv=0xbfff9454) at hello.cc:8
> (gdb)
>



Can't build libiconv on current armv7

2014-05-10 Thread Guenther Niess
I'm trying to build git on my pandaboard. I've tried to rebuild the base
system and building ports again without success.

building libiconv (after building and installing of gperf):

===> libiconv-1.14p1 depends on: gperf-* -> gperf-3.0.4p0
===>  Verifying specs: c c
===>  found c.74.2
===>  Extracting for libiconv-1.14p1
===>  Patching for libiconv-1.14p1
===>  Configuring for libiconv-1.14p1
Using /home/ports/obj/libiconv-1.14/config.site (generated)
cc -O2 -pipe  lib/genaliases.c -o genaliases
./genaliases > lib/aliases.gperf 3> canonical.sh 4> canonical_local.sh
rm -f genaliases
gperf -m 10 lib/aliases.gperf > tmp.h
Key link: "ANSI_X3.4-1986" = "ANSI_X3.4-1968", with key set "-.134AISX_".
Key link: "ISO-10646-UCS-4" = "ISO-10646-UCS-2", with key set "--01466IOU".
Key link: "L2" = "L1", with key set "L".
Key link: "L3" = "L1", with key set "L".
Key link: "ISO-IR-110" = "ISO-IR-101", with key set "--011IIOR".
Key link: "L4" = "L1", with key set "L".
Key link: "ISO_8859-7:2003" = "ISO_8859-7:1987", with key set "-57889:IO_".
Key link: "L5" = "L1", with key set "L".
Key link: "L6" = "L1", with key set "L".
Key link: "L7" = "L1", with key set "L".
Key link: "L8" = "L1", with key set "L".
Key link: "WINDOWS-1251" = "WINDOWS-1250", with key set "-125DNOSWW".
Key link: "WINDOWS-1252" = "WINDOWS-1250", with key set "-125DNOSWW".
Key link: "WINDOWS-1253" = "WINDOWS-1250", with key set "-125DNOSWW".
Key link: "WINDOWS-1254" = "WINDOWS-1250", with key set "-125DNOSWW".
Key link: "WINDOWS-1255" = "WINDOWS-1250", with key set "-125DNOSWW".
Key link: "WINDOWS-1256" = "WINDOWS-1250", with key set "-125DNOSWW".
Key link: "WINDOWS-1257" = "WINDOWS-1250", with key set "-125DNOSWW".
Key link: "WINDOWS-1258" = "WINDOWS-1250", with key set "-125DNOSWW".
Key link: "TIS620.2533-1" = "TIS620.2533-0", with key set ".0223356ST".
Key link: "JIS_X0208-1990" = "JIS_X0208-1983", with key set "-00128JSX_".
Key link: "KS_C_5601-1989" = "KS_C_5601-1987", with key set "-01156CK__".
Key link: "ISO-2022-JP-2" = "ISO-2022-JP-1", with key set "--0222IJOP".
Key link: "BIG5-HKSCS:2001" = "BIG5-HKSCS:1999", with key set "-5:BCGHKSS".
Key link: "BIG5-HKSCS:2004" = "BIG5-HKSCS:1999", with key set "-5:BCGHKSS".
Key link: "BIG5-HKSCS:2008" = "BIG5-HKSCS:1999", with key set "-5:BCGHKSS".
26 input keys have identical hash values,
use option -D.
*** Error 1 in /home/ports/obj/libiconv-1.14/libiconv-1.14
(Makefile.devel:109 'lib/aliases.h')
*** Error 1 in /usr/ports/converters/libiconv (Makefile:35 'pre-configure')
*** Error 1 in /usr/ports/converters/libiconv
(/usr/ports/infrastructure/mk/bsd.port.mk:2659
'/home/ports/obj/libiconv-1.14/build-arm/.configure_done')
*** Error 1 in /usr/ports/converters/libiconv
(/usr/ports/infrastructure/mk/bsd.port.mk:1890
'/home/ports/packages/arm/all/libiconv-1.14p1.tgz')
*** Error 1 in /usr/ports/converters/libiconv
(/usr/ports/infrastructure/mk/bsd.port.mk:2443 '_internal-package')
*** Error 1 in /usr/ports/converters/libiconv
(/usr/ports/infrastructure/mk/bsd.port.mk:2423 'package')
*** Error 1 in /usr/ports/converters/libiconv
(/usr/ports/infrastructure/mk/bsd.port.mk:1907
'/var/db/pkg/libiconv-1.14p1/+CONTENTS')
*** Error 1 in /usr/ports/converters/libiconv
(/usr/ports/infrastructure/mk/bsd.port.mk:2423 'install')
*** Error 1 in /usr/ports/devel/gettext
(/usr/ports/infrastructure/mk/bsd.port.mk:2050
'/home/ports/obj/gettext-0.18.2/.dep-converters-libiconv')
*** Error 1 in /usr/ports/devel/gettext
(/usr/ports/infrastructure/mk/bsd.port.mk:2503
'/home/ports/obj/gettext-0.18.2/.extract_done')
*** Error 1 in /usr/ports/devel/gettext
(/usr/ports/infrastructure/mk/bsd.port.mk:1890
'/home/ports/packages/arm/all/gettext-0.18.2p4.tgz')
*** Error 1 in /usr/ports/devel/gettext
(/usr/ports/infrastructure/mk/bsd.port.mk:2443 '_internal-package')
*** Error 1 in /usr/ports/devel/gettext
(/usr/ports/infrastructure/mk/bsd.port.mk:2423 'package')
*** Error 1 in /usr/ports/devel/gettext
(/usr/ports/infrastructure/mk/bsd.port.mk:1907
'/var/db/pkg/gettext-0.18.2p4/+CONTENTS')
*** Error 1 in /usr/ports/devel/gettext
(/usr/ports/infrastructure/mk/bsd.port.mk:2423 'install')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2050
'/home/ports/obj/vim-7.4.135-no_x11/.dep-STEM-ge-0.10.38-devel-gettext')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2503
'/home/ports/obj/vim-7.4.135-no_x11/.extract_done')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1890
'/home/ports/packages/arm/all/vim-7.4.135p0-no_x11.tgz')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2443
'_internal-package')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2423 'package')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1907
'/var/db/pkg/vim-7.4.135p0-no_x11/+CONTENTS')
*** Error 1 in /usr/ports/editors/vim
(/usr/ports/infrastructure/mk/bsd.port.mk:2423 'install')


dmesg:
OpenBSD 5.5-current (GENERIC-OMAP) #0: Sat May 10 11:42:15 CEST 2014
r...@panda.home.pappanoa.de:/usr/src/sys/arch/armv7/co

Circular dependency

2014-03-26 Thread Guenther Niess
Hi,

I think I ran into a circular dependency by trying to build firefox on a
fresh installed base system.

 colord -> polkit
 polkit -> gtk-doc
 gtk-doc-> source-highlight
 source-highlight   -> doxygen
 doxygen-> qt4
 qt4-> gstreamer-plugins-base
 gstreamer-plugins-base -> gvfs
 gvfs   -> libsecret
 libsecret  -> gnome-keyring
 gnome-keyring  -> gcr
 gcr-> gtk+3
 gtk+3  -> colord

I just write here because I don't know if this problem is already
noticed. I will use packages to install firefox.

Best regards
Guenther



Re: smtpd monitor plugins for munin

2014-02-09 Thread Guenther Niess
On 02/10/14 01:36, Guenther Niess wrote:
> I hopefully fixed the patch.

Sorry, the patch below fixes some escaping errors and typos.


Index: Makefile
===
RCS file: /cvs/ports/net/munin/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- Makefile15 Jan 2014 08:24:25 -  1.37
+++ Makefile10 Feb 2014 01:14:40 -
@@ -62,7 +62,9 @@ FAKE_FLAGS += HTMLDIR=${WRKINST}/${PREF
CONFDIR=${WRKINST}/${PREFIX}/share/examples/munin

 MUNIN_PLUGINS =bgpd if_pps_ intr pf_changes pf_searches 
pf_states \
-   sensors_ vmstat
+   sensors_ opensmtpd_delivery opensmtpd_mails \
+   opensmtpd_queue_cache opensmtpd_sessions \
+   opensmtpd_sessions_created vmstat

 .for i in ${MUNIN_PLUGINS}
 SUBST_LIST += ${FILESDIR}/$i ${WRKSRC}/plugins/node.d.openbsd/$i.in
Index: files/openbsd-packages
===
RCS file: /cvs/ports/net/munin/files/openbsd-packages,v
retrieving revision 1.3
diff -u -p -r1.3 openbsd-packages
--- files/openbsd-packages  21 Jan 2010 20:59:30 -  1.3
+++ files/openbsd-packages  10 Feb 2014 01:14:40 -
@@ -5,3 +5,6 @@

 #[postfix_mailqueue]
 #user _postfix
+
+[opensmtpd_*]
+user root
Index: pkg/PLIST-main
===
RCS file: /cvs/ports/net/munin/pkg/PLIST-main,v
retrieving revision 1.14
diff -u -p -r1.14 PLIST-main
--- pkg/PLIST-main  3 Jun 2013 19:45:32 -   1.14
+++ pkg/PLIST-main  10 Feb 2014 01:14:40 -
@@ -163,6 +163,11 @@ libexec/munin/plugins/nut_volts
 libexec/munin/plugins/nutups_
 @comment libexec/munin/plugins/nvidia_
 libexec/munin/plugins/open_files
+libexec/munin/plugins/opensmtpd_delivery
+libexec/munin/plugins/opensmtpd_mails
+libexec/munin/plugins/opensmtpd_queue_cache
+libexec/munin/plugins/opensmtpd_sessions
+libexec/munin/plugins/opensmtpd_sessions_created
 libexec/munin/plugins/openvpn
 libexec/munin/plugins/perdition
 libexec/munin/plugins/pf_changes
--- /dev/null   Mon Feb 10 02:15:11 2014
+++ files/opensmtpd_deliveryMon Feb 10 01:56:41 2014
@@ -0,0 +1,80 @@
+#!/bin/sh
+#
+# Script to monitor OpenSMTPD mail delivery
+# (c) 2014 Guenther Niess 
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Parameters:
+#
+#  config   (required)
+#  autoconf (optional - used by munin-config)
+#  suggest  (optional - used by munin-config)
+#
+#%# family=auto
+#%# capabilities=autoconf
+
+smtpctl=`which smtpctl`
+
+if [ "$1" = "autoconf" ]; then
+   if [ -x ${smtpctl} ]; then
+   echo yes
+   exit 0
+   else
+   echo "no (smtpctl is not executable)"
+   exit 1
+   fi
+fi
+
+if [ "$1" = "suggest" ]; then
+   exit 0
+fi
+
+if [ "$1" = "config" ]; then
+   echo "graph_title OpenSMTPD Mail delivery"
+   echo "graph_vlabel mails / second"
+   echo "graph_category mail"
+   echo "graph_args --lower-limit 0"
+   echo "graph_info OpenSMTPD mail delivery plugin"
+   echo "ok.label ok"
+   echo "ok.type DERIVE"
+   echo "ok.min 0"
+   echo "tempfail.label tempfail"
+   echo "tempfail.type DERIVE"
+   echo "tempfail.min 0"
+   echo "permfail.label permfail"
+   echo "permfail.type DERIVE"
+   echo "permfail.min 0"
+   echo "loop.label loop"
+   echo "loop.type DERIVE"
+   echo "loop.min 0"
+fi
+
+${smtpctl} show stats | awk -F'=' '
+BEGIN {
+  ok=0;
+  permfail=0;
+  tempfail=0;
+  loop=0;
+}
+/^scheduler.delivery.loop=/{loop=$2;}
+/^scheduler.delivery.permfail=/{permfail=$2;}
+/^scheduler.delivery.tempfail=/{tempfail=$2;}
+/^scheduler.delivery.ok=/{ok=$2;}
+END {
+  print "ok.value", ok
+  print "tempfail.value", tempfail
+  print "permfail.value", permfail
+  print "loop.value", loop
+}
+'
--- /dev/null   Mon Feb 10 02:15:1

Re: smtpd monitor plugins for munin

2014-02-09 Thread Guenther Niess
On 10.02.2014 00:17, Stuart Henderson wrote:
> On 2014/02/10 00:06, Guenther Niess wrote:
>> Any comments are welcome.
> 
> OpenSMTP isn't OpenBSD-only - could you try getting these added
> upstream please?
> 
> btw there are several "STMP" typos, and there should be a license
> grant alongside the copyright line (/usr/share/misc/license.template if
> you want the usual one used for OpenBSD).
> 

Thanks for your quick and helpful response. I hopefully fixed the patch.
Would you recommend to ask on the m...@opensmtpd.org mailing list if the
used values for monitoring are adequate or should I try to get it
upstream anyway?


Index: Makefile
===
RCS file: /cvs/ports/net/munin/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- Makefile15 Jan 2014 08:24:25 -  1.37
+++ Makefile10 Feb 2014 00:08:36 -
@@ -62,7 +62,9 @@ FAKE_FLAGS += HTMLDIR=${WRKINST}/${PREF
CONFDIR=${WRKINST}/${PREFIX}/share/examples/munin

 MUNIN_PLUGINS =bgpd if_pps_ intr pf_changes pf_searches 
pf_states \
-   sensors_ vmstat
+   sensors_ opensmtp_delivery opensmtp_mails \
+   opensmtp_queue_cache opensmtp_sessions \
+   opensmtp_sessions_created vmstat

 .for i in ${MUNIN_PLUGINS}
 SUBST_LIST += ${FILESDIR}/$i ${WRKSRC}/plugins/node.d.openbsd/$i.in
Index: files/openbsd-packages
===
RCS file: /cvs/ports/net/munin/files/openbsd-packages,v
retrieving revision 1.3
diff -u -p -r1.3 openbsd-packages
--- files/openbsd-packages  21 Jan 2010 20:59:30 -  1.3
+++ files/openbsd-packages  10 Feb 2014 00:08:36 -
@@ -5,3 +5,6 @@

 #[postfix_mailqueue]
 #user _postfix
+
+[opensmtp_*]
+user root
Index: pkg/PLIST-main
===
RCS file: /cvs/ports/net/munin/pkg/PLIST-main,v
retrieving revision 1.14
diff -u -p -r1.14 PLIST-main
--- pkg/PLIST-main  3 Jun 2013 19:45:32 -   1.14
+++ pkg/PLIST-main  10 Feb 2014 00:08:36 -
@@ -163,6 +163,11 @@ libexec/munin/plugins/nut_volts
 libexec/munin/plugins/nutups_
 @comment libexec/munin/plugins/nvidia_
 libexec/munin/plugins/open_files
+libexec/munin/plugins/opensmtp_delivery
+libexec/munin/plugins/opensmtp_mails
+libexec/munin/plugins/opensmtp_queue_cache
+libexec/munin/plugins/opensmtp_sessions
+libexec/munin/plugins/opensmtp_sessions_created
 libexec/munin/plugins/openvpn
 libexec/munin/plugins/perdition
 libexec/munin/plugins/pf_changes
--- /dev/null   Mon Feb 10 01:08:43 2014
+++ files/opensmtp_delivery Mon Feb 10 00:59:41 2014
@@ -0,0 +1,80 @@
+#!/bin/sh
+#
+# Script to monitor OpenSMTP mail delivery
+# (c) 2014 Guenther Niess 
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+# Parameters:
+#
+#  config   (required)
+#  autoconf (optional - used by munin-config)
+#  suggest  (optional - used by munin-config)
+#
+#%# family=auto
+#%# capabilities=autoconf
+
+smtpctl=`which smtpctl`
+
+if [ "$1" = "autoconf" ]; then
+   if [ -x ${smtpctl} ]; then
+   echo yes
+   exit 0
+   else
+   echo no (smtpctl is not executable)
+   exit 1
+   fi
+fi
+
+if [ "$1" = "suggest" ]; then
+   exit 0
+fi
+
+if [ "$1" = "config" ]; then
+   echo graph_title OpenSMTP Mail delivery
+   echo graph_vlabel mails / second
+   echo graph_category mail
+   echo graph_args --lower-limit 0
+   echo graph_info OpenSMTP mail delivery plugin
+   echo ok.label ok
+   echo ok.type DERIVE
+   echo ok.min 0
+   echo tempfail.label tempfail
+   echo tempfail.type DERIVE
+   echo tempfail.min 0
+   echo permfail.label permfail
+   echo permfail.type DERIVE
+   echo permfail.min 0
+   echo loop.label loop
+   echo loop.type DERIVE
+   echo loop.min 0
+fi
+
+${smtpctl} show stats | awk -F'=' '
+BEGIN {
+  ok=0;
+  permfail=0;
+  tempfail=0;
+  loop=0;
+}
+/^scheduler.delivery.loop=/{loop=$2;}
+/^scheduler.delivery.permfail=/{pe

smtpd monitor plugins for munin

2014-02-09 Thread Guenther Niess
Hi,
I've missed SMTP plugins for munin to monitor the smtpd daemon from
OpenBSD. So I started to write five simple shell scripts but I'm not
quite sure if I used the proper values from smtpctl.

Any comments are welcome.


Index: Makefile
===
RCS file: /cvs/ports/net/munin/Makefile,v
retrieving revision 1.37
diff -u -p -r1.37 Makefile
--- Makefile15 Jan 2014 08:24:25 -  1.37
+++ Makefile9 Feb 2014 22:59:41 -
@@ -62,7 +62,8 @@ FAKE_FLAGS += HTMLDIR=${WRKINST}/${PREF
CONFDIR=${WRKINST}/${PREFIX}/share/examples/munin

 MUNIN_PLUGINS =bgpd if_pps_ intr pf_changes pf_searches 
pf_states \
-   sensors_ vmstat
+   sensors_ smtp_delivery smtp_mails smtp_queue_cache \
+   smtp_sessions smtp_sessions_created vmstat

 .for i in ${MUNIN_PLUGINS}
 SUBST_LIST += ${FILESDIR}/$i ${WRKSRC}/plugins/node.d.openbsd/$i.in
Index: files/openbsd-packages
===
RCS file: /cvs/ports/net/munin/files/openbsd-packages,v
retrieving revision 1.3
diff -u -p -r1.3 openbsd-packages
--- files/openbsd-packages  21 Jan 2010 20:59:30 -  1.3
+++ files/openbsd-packages  9 Feb 2014 22:59:41 -
@@ -5,3 +5,18 @@

 #[postfix_mailqueue]
 #user _postfix
+
+[smtp_delivery]
+user root
+
+[smtp_sessions]
+user root
+
+[smtp_sessions_created]
+user root
+
+[smtp_queue_cache]
+user root
+
+[smtp_mails]
+user root
--- /dev/null   Sun Feb  9 23:58:50 2014
+++ files/smtp_delivery Sun Feb  9 23:47:45 2014
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# Script to monitor STMP mail delivery
+# (c) 2014 Guenther Niess 
+#
+# Parameters:
+#
+#  config   (required)
+#  autoconf (optional - used by munin-config)
+#  suggest  (optional - used by munin-config)
+#
+#%# family=auto
+#%# capabilities=autoconf
+
+smtpctl='/usr/sbin/smtpctl'
+
+if [ "$1" = "autoconf" ]; then
+   if [ ! -x ${smtpctl} ]; then
+   echo "no (${smtpctl} is not executable)"
+   exit 0
+   else
+   echo no
+   exit 1
+   fi
+fi
+
+if [ "$1" = "suggest" ]; then
+   exit 0
+fi
+
+if [ "$1" = "config" ]; then
+   echo graph_title SMTP Mail delivery
+   echo graph_vlabel mails / second
+   echo graph_category mail
+   echo graph_args --lower-limit 0
+   echo graph_info smtpd mail delivery plugin
+   echo ok.label ok
+   echo ok.type DERIVE
+   echo ok.min 0
+   echo tempfail.label tempfail
+   echo tempfail.type DERIVE
+   echo tempfail.min 0
+   echo permfail.label permfail
+   echo permfail.type DERIVE
+   echo permfail.min 0
+   echo loop.label loop
+   echo loop.type DERIVE
+   echo loop.min 0
+fi
+
+${smtpctl} show stats | awk -F'=' '
+BEGIN {
+  ok=0;
+  permfail=0;
+  tempfail=0;
+  loop=0;
+}
+/^scheduler.delivery.loop=/{loop=$2;}
+/^scheduler.delivery.permfail=/{permfail=$2;}
+/^scheduler.delivery.tempfail=/{tempfail=$2;}
+/^scheduler.delivery.ok=/{ok=$2;}
+END {
+  print "ok.value", ok
+  print "tempfail.value", tempfail
+  print "permfail.value", permfail
+  print "loop.value", loop
+}
+'
--- /dev/null   Sun Feb  9 23:58:57 2014
+++ files/smtp_mailsSun Feb  9 23:47:45 2014
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# Script to monitor STMP mail statistics
+# (c) 2014 Guenther Niess 
+#
+# Parameters:
+#
+#  config   (required)
+#  autoconf (optional - used by munin-config)
+#  suggest  (optional - used by munin-config)
+#
+#%# family=auto
+#%# capabilities=autoconf
+
+smtpctl='/usr/sbin/smtpctl'
+
+if [ "$1" = "autoconf" ]; then
+   if [ ! -x ${smtpctl} ]; then
+   echo "no (${smtpctl} is not executable)"
+   exit 0
+   else
+   echo no
+   exit 1
+   fi
+fi
+
+if [ "$1" = "suggest" ]; then
+   exit 0
+fi
+
+if [ "$1" = "config" ]; then
+   echo graph_title SMTP Mails
+   echo graph_vlabel mails / second
+   echo graph_category mail
+   echo graph_args --lower-limit 0
+   echo graph_info smtpd messages plugin
+   echo delivered.label delivered
+   echo delivered.type DERIVE
+   echo delivered.min 0
+   echo expired.label expired
+   echo expired.type DERIVE
+   echo expired.min 0
+   echo removed.label removed
+   echo removed.type DERIVE
+   echo removed.min 0
+   echo bounced.label bounced
+   echo bounced.type DERIVE
+   echo bounced.min 0
+fi
+
+${smtpctl} show stats | awk -F'=' '
+BEGIN {
+  delivered=0;
+  expired=0;
+  removed=0;
+  bounced=0;
+}
+/^scheduler.delivery.ok=/{delivered=$2;}
+/^scheduler.envelope.

Re: libgcrypt broken on arm

2014-01-27 Thread Guenther Niess
On 27.01.2014 02:00, Brad Smith wrote:
> On 26/01/14 6:52 PM, Pascal Stumpf wrote:
>> On Sun, 26 Jan 2014 21:38:04 +0100, Guenther Niess wrote:
>>> I'm trying to build libgcrypt on a armv7 pandaboard, but it seems to be
>>> broken.
>>>
>>
>> Indeed, thanks for the report.  Any oks for this patch (tested on a
>> BBB)?

this patch works fine for me.

> Quite clearly a mistake with the Makefile that resulted in the ASM
> code not being included in the tarball when the release was made even
> though it exists in their git repo, which has already been fixed.
> 
> I am not sure if that alone is enough to fully disable this particular
> bit of ASM code as a workaround. Is HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS
> defined?

I created a patch with the fix from upstream, works also for me.
I don't know what fix is better.

--- /dev/null   Mon Jan 27 09:36:37 2014
+++ patches/patch-cipher_Makefile_amMon Jan 27 08:06:21 2014
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- cipher/Makefile.am.origMon Jan 27 08:02:47 2014
 cipher/Makefile.am Mon Jan 27 08:05:50 2014
+@@ -57,7 +57,7 @@ rmd.h
+
+ EXTRA_libcipher_la_SOURCES = \
+ arcfour.c \
+-blowfish.c blowfish-amd64.S \
++blowfish.c blowfish-amd64.S blowfish-arm.S \
+ cast5.c cast5-amd64.S cast5-arm.S \
+ crc.c \
+ des.c \
--- /dev/null   Mon Jan 27 09:36:56 2014
+++ patches/patch-cipher_blowfish-arm_S Mon Jan 27 08:57:55 2014
@@ -0,0 +1,747 @@
+$OpenBSD$
+--- cipher/blowfish-arm.S.orig Mon Jan 27 08:56:42 2014
 cipher/blowfish-arm.S  Mon Jan 27 08:56:15 2014
+@@ -0,0 +1,743 @@
++/* blowfish-arm.S  -  ARM assembly implementation of Blowfish cipher
++ *
++ * Copyright (C) 2013 Jussi Kivilinna 
++ *
++ * This file is part of Libgcrypt.
++ *
++ * Libgcrypt is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License as
++ * published by the Free Software Foundation; either version 2.1 of
++ * the License, or (at your option) any later version.
++ *
++ * Libgcrypt is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this program; if not, see
<http://www.gnu.org/licenses/>.
++ */
++
++#include 
++
++#if defined(__ARMEL__)
++#ifdef HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS
++
++.text
++
++.syntax unified
++.arm
++
++/* structure of crypto context */
++#define s00
++#define s1(s0 + (1 * 256) * 4)
++#define s2(s0 + (2 * 256) * 4)
++#define s3(s0 + (3 * 256) * 4)
++#define p (s3 + (1 * 256) * 4)
++
++/* register macros */
++#define CTXs0 %r0
++#define CTXs1 %r9
++#define CTXs2 %r8
++#define CTXs3 %r10
++#define RMASK %lr
++#define RKEYL %r2
++#define RKEYR %ip
++
++#define RL0 %r3
++#define RR0 %r4
++
++#define RL1 %r9
++#define RR1 %r10
++
++#define RT0 %r11
++#define RT1 %r7
++#define RT2 %r5
++#define RT3 %r6
++
++/* helper macros */
++#define ldr_unaligned_le(rout, rsrc, offs, rtmp) \
++  ldrb rout, [rsrc, #((offs) + 0)]; \
++  ldrb rtmp, [rsrc, #((offs) + 1)]; \
++  orr rout, rout, rtmp, lsl #8; \
++  ldrb rtmp, [rsrc, #((offs) + 2)]; \
++  orr rout, rout, rtmp, lsl #16; \
++  ldrb rtmp, [rsrc, #((offs) + 3)]; \
++  orr rout, rout, rtmp, lsl #24;
++
++#define str_unaligned_le(rin, rdst, offs, rtmp0, rtmp1) \
++  mov rtmp0, rin, lsr #8; \
++  strb rin, [rdst, #((offs) + 0)]; \
++  mov rtmp1, rin, lsr #16; \
++  strb rtmp0, [rdst, #((offs) + 1)]; \
++  mov rtmp0, rin, lsr #24; \
++  strb rtmp1, [rdst, #((offs) + 2)]; \
++  strb rtmp0, [rdst, #((offs) + 3)];
++
++#define ldr_unaligned_be(rout, rsrc, offs, rtmp) \
++  ldrb rout, [rsrc, #((offs) + 3)]; \
++  ldrb rtmp, [rsrc, #((offs) + 2)]; \
++  orr rout, rout, rtmp, lsl #8; \
++  ldrb rtmp, [rsrc, #((offs) + 1)]; \
++  orr rout, rout, rtmp, lsl #16; \
++  ldrb rtmp, [rsrc, #((offs) + 0)]; \
++  orr rout, rout, rtmp, lsl #24;
++
++#define str_unaligned_be(rin, rdst, offs, rtmp0, rtmp1) \
++  mov rtmp0, rin, lsr #8; \
++  strb rin, [rdst, #((offs) + 3)]; \
++  mov rtmp1, rin, lsr #16; \
++  strb rtmp0, [rdst, #((offs) + 2)]; \
++  mov rtmp0, rin, lsr #24; \
++  strb rtmp1, [rdst, #((offs) + 1)]; \
++  strb rtmp0, [rdst, #((offs) + 0)];
++
++#ifdef __ARMEL__
++  #define ldr_unaligned_host ldr_unaligned_le
++  #define str_unaligned_host str_unaligned_le
++
++  /* bswap on little-endian */
++#ifdef HAVE_ARM_ARCH_V6
++  #define host_to_be(reg, rtmp) \
++  rev reg, reg;
++  #define be_to_host(reg, rtmp) \
++  rev reg, reg;
++#else
++  #define host_to_be(reg, rtmp) \
++  eor rtmp, reg, reg, ror #16;

libgcrypt broken on arm

2014-01-26 Thread Guenther Niess
I'm trying to build libgcrypt on a armv7 pandaboard, but it seems to be
broken.

/usr/bin/libtool  --tag=CC--mode=compile cc -DHAVE_CONFIG_H -I. -I..
  -I../src -I../src  -I/usr/local/include -O2 -pipe -fvisibility=hidden
-Wall -MT blowfish.lo -MD -MP -MF .deps/blowfish.Tpo -c -o blowfish.lo
blowfish.c
cc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/usr/local/include -O2
-pipe -fvisibility=hidden -Wall -MT blowfish.lo -MD -MP -MF
.deps/blowfish.Tpo -c blowfish.c -fPIC -DPIC -o .libs/blowfish.o
cc -DHAVE_CONFIG_H -I. -I.. -I../src -I../src -I/usr/local/include -O2
-pipe -fvisibility=hidden -Wall -MT blowfish.lo -MD -MP -MF
.deps/blowfish.Tpo -c blowfish.c -o blowfish.o
mv -f .deps/blowfish.Tpo .deps/blowfish.Plo
make: don't know how to make blowfish-arm.lo (prerequisite of: libcipher.la)
Stop in cipher
*** Error 1 in . (Makefile:428 'all-recursive')
*** Error 1 in /home/ports/obj/libgcrypt-1.6.0/libgcrypt-1.6.0
(Makefile:337 'all')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2673
'/home/ports/obj/libgcrypt-1.6.0/.build_done')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1874
'/home/ports/packages/arm/all/libgcrypt-1.6.0.tgz')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2426
'_internal-package')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2406 'package')
*** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:1891
'/var/db/pkg/libgcrypt-1.6.0/+CONTENTS')
*** Error 1 in /usr/ports/security/libgcrypt
(/usr/ports/infrastructure/mk/bsd.port.mk:2406 'install')



graphics/ilmbase broken

2013-11-20 Thread Guenther Niess
I run a current system on amd64 from today.

The ilmbase doesn't continue the configure script after:

checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for cc_r... cc
checking for semaphore.h... (cached) yes
checking for library containing sem_init... none required
checking whether to use POSIX unnamed semaphores...


So I disabled posix semaphores in the Makefile and it's now building the
package.
I don't know if this is the best fix, but it worked for me to compile
gimp and kdelibs.


Index: graphics/ilmbase/Makefile
===
RCS file: /cvs/ports/graphics/ilmbase/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- graphics/ilmbase/Makefile   7 Aug 2013 15:37:10 -   1.10
+++ graphics/ilmbase/Makefile   20 Nov 2013 22:31:25 -
@@ -23,6 +23,7 @@ WANTLIB=  m stdc++

 CONFIGURE_STYLE=gnu
 CONFIGURE_ENV= LIBS="-lstdc++ -lm"
+CONFIGURE_ARGS+=--disable-posix-sem

 USE_GMAKE= Yes



Re: gvfs not building for me on amd64-current

2013-11-03 Thread Guenther Niess
On 03.11.2013 09:28, Brett Mahar wrote:
> On Sun, 3 Nov 2013 08:59:32 +0100
> Antoine Jacoutot  wrote:
> 
> | On Sun, Nov 03, 2013 at 06:46:06PM +1100, Brett Mahar wrote:
> | > Hi,
> | > 
> | > Maybe this is know already since fuse is just starting out, but 
> x11/gnome/gvfs won't build for me:
> | 
> | Your base system is most probably outdated.
> | 
> | > gvfsfusedaemon.c:2442: error: unknown field 'rmdir' specified in 
> initializer
> | > gvfsfusedaemon.c:2442: warning: excess elements in struct initializer
> 
> Hi Antoine,
> 
> My base system was rebuilt yesterday (before the last change to gvfs) but 
> I'll update and rebuild again and report back if it doesn't work.


Hi,

 $ cp /usr/src/lib/libfuse/fuse{,_opt}.h /usr/include

did solve it for me.

Guenther