Re: mariadb on aarch64 after the llvm 13 update (Re: aarch64 bulk build report)

2021-12-27 Thread Peter Hessler
On 2021 Dec 27 (Mon) at 23:32:31 +0100 (+0100), Jeremie Courreges-Anglas wrote:
:On Mon, Dec 20 2021, phess...@openbsd.org wrote:
:> bulk build on arm64.ports.openbsd.org
:> started on  Mon Dec 20 03:38:26 MST 2021
:> finished at Mon Dec 20 22:29:47 MST 2021
:> lasted 0D18h51m
:> done with kern.version=OpenBSD 7.0-current (GENERIC.MP) #1455: Sun Dec 19 
14:58:17 MST 2021
:>
:> built packages:8238
:> Dec 20:8237
:>
:>
:> critical path missing pkgs:  
http://build-failures.rhaalovely.net/aarch64/2021-12-20/summary.log
:>
:> build failures: 10
:> http://build-failures.rhaalovely.net/aarch64/2021-12-20/databases/mariadb.log
:
:[...]
:
:mariadb tries to use "out-of-line atomics" as implemented here:
:
:  https://reviews.llvm.org/D91157
:
:The summary mentions implementations in libgcc and libcompiler-rt, and
:a quick diff between compiler-rt-11.1.0 and compiler-rt-13.0.0 indeed
:lists changes that seem relevant.
:
:To work around this problem until a solution is found in base, the
:untested patch below may help.  If testing goes well, ok?
:

this builds and packages on arm64, OK


:
:Index: patches/patch-configure_cmake
:===
:RCS file: patches/patch-configure_cmake
:diff -N patches/patch-configure_cmake
:--- /dev/null  1 Jan 1970 00:00:00 -
:+++ patches/patch-configure_cmake  27 Dec 2021 22:29:08 -
:@@ -0,0 +1,17 @@
:+$OpenBSD$
:+
:+libcompiler-rt from base doesn't provide support for out-of-line atomics
:+llvm commit: https://reviews.llvm.org/D91157
:+
:+Index: configure.cmake
:+--- configure.cmake.orig
: configure.cmake
:+@@ -70,7 +70,7 @@ IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_CO
:+ ENDIF()
:+ 
:+ # use runtime atomic-support detection in aarch64
:+-IF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
:++IF(FALSE)
:+   MY_CHECK_AND_SET_COMPILER_FLAG("-moutline-atomics")
:+ ENDIF()
:+ 
:
:
:-- 
:jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

-- 
It is impossible to make anything foolproof because fools are so
ingenious.



Re: Adding BASE_C99 for ports needing -std=gnu99 for base-gcc

2021-12-27 Thread Jonathan Gray
On Mon, Dec 27, 2021 at 09:50:04PM -0500, Kurt Mosiejczuk wrote:
> I find myself adding the following to many ports files nowadays
> 
> .include 
> .if !${PROPERTIES:Mclang}
> CFLAGS += -std=gnu99
> .endif
> 
> Rather than continue this, I'd like to propose adding BASE_C99 to bsd.port.mk
> 
> When BASE_C99= Yes, if on a non-base-clang arch, it will add the same to
> CFLAGS, but without including bsd.port.arch.mk by hand.
> 
> Included are patches to add this to bsd.port.mk and a diff for bsd.port.mk(5)
> to include it in the man page.
> 
> Once this is in, I'll sweep the tree for the boilerplate and replace it all
> with this.
> 
> ok?

Is it time to consider changing the gcc default to gnu99?
built and installed on sparc64 but otherwise untested.

--- /tmp/defs.old   Sun Dec 19 15:25:52 2021
+++ /tmp/defs.new   Sun Dec 19 16:34:59 2021
@@ -70,6 +70,7 @@
 #define __FLT_HAS_INFINITY__ 1
 #define __DEC64_MAX__ 9.999E384DD
 #define __DEC64_MANT_DIG__ 16
+#define __STDC_VERSION__ 199901L
 #define __DEC32_MAX_EXP__ 96
 #define __DEC128_DEN__ 0.1E-6143DL
 #define __LDBL_MANT_DIG__ 113

Index: gnu/gcc/gcc/c-opts.c
===
RCS file: /cvs/src/gnu/gcc/gcc/c-opts.c,v
retrieving revision 1.3
diff -u -p -r1.3 c-opts.c
--- gnu/gcc/gcc/c-opts.c15 Sep 2011 12:19:12 -  1.3
+++ gnu/gcc/gcc/c-opts.c28 Dec 2021 03:44:20 -
@@ -236,6 +236,8 @@ c_common_init_options (unsigned int argc
 
   if (c_language == clk_c)
 {
+  set_std_c99 (false /* ISO */);
+
   /* If preprocessing assembly language, accept any of the C-family
 front end options since the driver may pass them through.  */
   for (i = 1; i < argc; i++)



Adding BASE_C99 for ports needing -std=gnu99 for base-gcc

2021-12-27 Thread Kurt Mosiejczuk
I find myself adding the following to many ports files nowadays

.include 
.if !${PROPERTIES:Mclang}
CFLAGS +=   -std=gnu99
.endif

Rather than continue this, I'd like to propose adding BASE_C99 to bsd.port.mk

When BASE_C99= Yes, if on a non-base-clang arch, it will add the same to
CFLAGS, but without including bsd.port.arch.mk by hand.

Included are patches to add this to bsd.port.mk and a diff for bsd.port.mk(5)
to include it in the man page.

Once this is in, I'll sweep the tree for the boilerplate and replace it all
with this.

ok?

--Kurt
Index: bsd.port.mk
===
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
retrieving revision 1.1564
diff -u -p -r1.1564 bsd.port.mk
--- bsd.port.mk 14 Dec 2021 14:21:41 -  1.1564
+++ bsd.port.mk 23 Dec 2021 16:34:42 -
@@ -736,6 +736,13 @@ CFLAGS += ${CDIAGFLAGS}
 CXXFLAGS += ${CXXDIAGFLAGS}
 .endif
 
+# Add -std=gnu99 to CFLAGS if requested and arch is base-gcc
+BASE_C99 ?= no
+.if !${PROPERTIES:Mclang} && ${BASE_C99:L} == "yes"
+CFLAGS +=  -std=gnu99
+.endif
+
+
 # XXX trick ports into trying to write into / instead of the current user's
 # homedir.
 PORTHOME ?= /${PKGNAME}_writes_to_HOME
Index: bsd.port.mk.5
===
RCS file: /cvs/src/share/man/man5/bsd.port.mk.5,v
retrieving revision 1.550
diff -u -p -r1.550 bsd.port.mk.5
--- bsd.port.mk.5   22 Nov 2021 11:17:39 -  1.550
+++ bsd.port.mk.5   28 Dec 2021 02:34:51 -
@@ -966,6 +966,21 @@ Can be set to
 .Sq autogen.sh
 if such a script is available.
 Defaults to autoreconf --force --install.
+.It Ev BASE_C99
+Defaults to
+.Sq \ .
+Set to
+.Sq Yes
+for ports needing c99 constructs while using base-gcc.
+.Pp
+When
+.Ev BASE_C99
+is set to
+.Sq Yes ,
+.Ev CFLAGS
+has
+.Sq -std=gnu99
+added to it if building on a base-gcc architecture.
 .It Ev BASE_PKGPATH
 Full
 .Xr pkgpath 7


[sparc64] Fix build of x11/i3status

2021-12-27 Thread Kurt Mosiejczuk
x11/i3status uses C11 constructs so base-gcc arches must use ports-gcc.

This diff fixes the build for sparc64

ok?

(cc MAINTINER)

--Kurt

Index: Makefile
===
RCS file: /cvs/ports/x11/i3status/Makefile,v
retrieving revision 1.63
diff -u -p -r1.63 Makefile
--- Makefile6 Dec 2021 09:51:28 -   1.63
+++ Makefile27 Dec 2021 20:31:30 -
@@ -17,6 +17,10 @@ PERMIT_PACKAGE = Yes
 MASTER_SITES=  ${HOMEPAGE}
 EXTRACT_SUFX=  .tar.xz
 
+# C11
+COMPILER=  base-clang ports-gcc
+COMPILER_LANGS=c
+
 WANTLIB += c confuse yajl sndio
 
 MODULES=   devel/meson



mariadb on aarch64 after the llvm 13 update (Re: aarch64 bulk build report)

2021-12-27 Thread Jeremie Courreges-Anglas
On Mon, Dec 20 2021, phess...@openbsd.org wrote:
> bulk build on arm64.ports.openbsd.org
> started on  Mon Dec 20 03:38:26 MST 2021
> finished at Mon Dec 20 22:29:47 MST 2021
> lasted 0D18h51m
> done with kern.version=OpenBSD 7.0-current (GENERIC.MP) #1455: Sun Dec 19 
> 14:58:17 MST 2021
>
> built packages:8238
> Dec 20:8237
>
>
> critical path missing pkgs:  
> http://build-failures.rhaalovely.net/aarch64/2021-12-20/summary.log
>
> build failures: 10
> http://build-failures.rhaalovely.net/aarch64/2021-12-20/databases/mariadb.log

[...]

mariadb tries to use "out-of-line atomics" as implemented here:

  https://reviews.llvm.org/D91157

The summary mentions implementations in libgcc and libcompiler-rt, and
a quick diff between compiler-rt-11.1.0 and compiler-rt-13.0.0 indeed
lists changes that seem relevant.

To work around this problem until a solution is found in base, the
untested patch below may help.  If testing goes well, ok?


Index: patches/patch-configure_cmake
===
RCS file: patches/patch-configure_cmake
diff -N patches/patch-configure_cmake
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-configure_cmake   27 Dec 2021 22:29:08 -
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+libcompiler-rt from base doesn't provide support for out-of-line atomics
+llvm commit: https://reviews.llvm.org/D91157
+
+Index: configure.cmake
+--- configure.cmake.orig
 configure.cmake
+@@ -70,7 +70,7 @@ IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_CO
+ ENDIF()
+ 
+ # use runtime atomic-support detection in aarch64
+-IF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
++IF(FALSE)
+   MY_CHECK_AND_SET_COMPILER_FLAG("-moutline-atomics")
+ ENDIF()
+ 


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: [NEW] sysutils/promscale

2021-12-27 Thread Aaron Bieber


Denis Fondras  writes:

> Promscale is an open source observability backend for metrics and
> traces powered by SQL.
>
> Built on the robust and high-peformance foundation of PostgreSQL
> and TimescaleDB, it has native support for Prometheus metrics and
> OpenTelemetry traces as well as many other formats like StatsD,
> Jaeger and Zipkin through the OpenTelemetry Collector and is 100%
> PromQL compliant.
>
> For Prometheus users, Promscale provides a robust and highly scalable
> long-term storage system that is 100% PromQL compliant.
>
> https://www.timescale.com/promscale
>
>
> [2. application/x-tar-gz; promscale-0.7.1.tgz]...

The CID stuff is yicky :D - If you are ok using that approach, more
power to ya - I usually go for what is done in net/miniflux, that way
you can do "make modgo-gen-modulles" and just pull the date from the new
MODGO_VERSION var.

Other than regexie madness it looks good to me! OK abieber@



CVS: cvs.openbsd.org: ports

2021-12-27 Thread Jeremie Courreges-Anglas
CVSROOT:/cvs
Module name:ports
Changes by: j...@cvs.openbsd.org2021/12/27 12:22:48

Modified files:
security/gnutls: Makefile 
Added files:
security/gnutls/patches: 
 patch-lib_accelerated_aarch64_Makefile_in 

Log message:
Unbreak on aarch64: don't use -Wa,-march=all

-march=all isn't supported by clang, and it now crashes with llvm 13.
Fix snatched from the FreeBSD bugtracker.

Tested by phessler@, ok phessler@ ajacoutot@ (maintainer)



CVS: cvs.openbsd.org: ports

2021-12-27 Thread Joerg Jung
CVSROOT:/cvs
Module name:ports
Changes by: j...@cvs.openbsd.org2021/12/27 12:20:53

Modified files:
www/surf   : Makefile 

Log message:
add missed wantlibs



CVS: cvs.openbsd.org: ports

2021-12-27 Thread Joerg Jung
CVSROOT:/cvs
Module name:ports
Changes by: j...@cvs.openbsd.org2021/12/27 11:56:32

Modified files:
www/surf   : Makefile distinfo 
www/surf/patches: patch-Makefile patch-config_def_h 
  patch-config_mk 
www/surf/pkg   : PLIST 
Added files:
www/surf/patches: patch-surf_c 

Log message:
update to surf-2.1

with help from crystal kolipe



[sparc64] Fix build of devel/glpk

2021-12-27 Thread Kurt Mosiejczuk
devel/glpk fails out complaining that TLS (thread local storage) is
unavailable. Switching to ports-gcc on base-gcc sparc64 fixes the build.

ok?

--Kurt

Index: Makefile
===
RCS file: /cvs/ports/devel/glpk/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile8 Dec 2021 10:41:18 -   1.14
+++ Makefile27 Dec 2021 16:09:07 -
@@ -12,6 +12,9 @@ MASTER_SITES= ${MASTER_SITE_GNU:=glpk/}
 # GPLv3
 PERMIT_PACKAGE=Yes
 
+COMPILER=  base-clang ports-gcc
+COMPILER_LANGS=c
+
 WANTLIB=   c m gmp
 
 LIB_DEPENDS=   devel/gmp



Xorg modules installation

2021-12-27 Thread Ingo Feinerer
Hi,

I am working on xrdpxorg (http://xrdp.org) which builds a few Xorg
modules.

`make plist` does not seem to able to process them:

Can't put into any plist (no applicable prefix):
/usr/X11R6/lib/modules/libxorgxrdp.so
...

Is there a proper way to install them?
(so that pkg_add puts them into the right location)

Thank you!

Best regards,
Ingo



Fix gnutls on aarch64 after the llvm 13 update (was: Re: aarch64 bulk build report)

2021-12-27 Thread Jeremie Courreges-Anglas
On Mon, Dec 20 2021, phess...@openbsd.org wrote:
> bulk build on arm64.ports.openbsd.org
> started on  Mon Dec 20 03:38:26 MST 2021
> finished at Mon Dec 20 22:29:47 MST 2021
> lasted 0D18h51m
> done with kern.version=OpenBSD 7.0-current (GENERIC.MP) #1455: Sun Dec 19 
> 14:58:17 MST 2021
>
> built packages:8238
> Dec 20:8237
>
>
> critical path missing pkgs:  
> http://build-failures.rhaalovely.net/aarch64/2021-12-20/summary.log

[...]

> http://build-failures.rhaalovely.net/aarch64/2021-12-20/security/gnutls.log

This crash has already been hit by the FreeBSD folks;
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260078

-march=all seems unsupported by clang, this diff fixes the crash but
doesn't add support for -march=all
https://reviews.llvm.org/D114677

The untested diff below removes the use of -march=all to fix the build
on aarch64.  Tests and ok welcome.


Index: Makefile
===
RCS file: /cvs/ports/security/gnutls/Makefile,v
retrieving revision 1.169
diff -u -p -r1.169 Makefile
--- Makefile29 May 2021 22:43:09 -  1.169
+++ Makefile27 Dec 2021 16:03:05 -
@@ -3,6 +3,7 @@
 COMMENT=   GNU Transport Layer Security library
 
 V= 3.7.2
+REVISION=  0
 DISTNAME=  gnutls-${V}
 EXTRACT_SUFX=  .tar.xz
 
Index: patches/patch-lib_accelerated_aarch64_Makefile_in
===
RCS file: patches/patch-lib_accelerated_aarch64_Makefile_in
diff -N patches/patch-lib_accelerated_aarch64_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-lib_accelerated_aarch64_Makefile_in   27 Dec 2021 16:03:05 
-
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Avoid -march=all, unsupported by clang.
+Clang commit that fixes the crash but doesn't add support for -march=all:
+https://reviews.llvm.org/D114677
+
+Index: lib/accelerated/aarch64/Makefile.in
+--- lib/accelerated/aarch64/Makefile.in.orig
 lib/accelerated/aarch64/Makefile.in
+@@ -2104,7 +2104,7 @@ AM_CPPFLAGS = -I$(srcdir)/../../../gl -I$(builddir)/..
+   -I$(srcdir)/../../ -I$(srcdir)/../ $(am__append_1)
+ 
+ #ensure that we have all aarch64 instruction sets enabled for the assembler
+-AM_CCASFLAGS = -Wa,-march=all
++#AM_CCASFLAGS = -Wa,-march=all
+ EXTRA_DIST = README
+ noinst_LTLIBRARIES = libaarch64.la
+ libaarch64_la_SOURCES = aarch64-common.c aarch64-common.h \


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



Re: audio/ncspot: update to 0.9.3

2021-12-27 Thread Klemens Nanni
On Mon, Dec 27, 2021 at 04:39:39PM +0100, Henrik Friedrichsen wrote:
> On Mon, Dec 27, 2021 at 06:25:32AM +, Klemens Nanni wrote:
> > Works for me on amd64, this most probably won't fix the sparc64 build
> > failure since the broken crate has not been updated.
> > 
> > OK?
> 
> Looks good to me, thanks for the diff. Out of curiosity, which crate is 
> broken on sparc64?

This one

error: failed to run custom build command for `ring v0.16.20`

as per

Date: Sat, 25 Dec 2021 04:37:16 -0700 (MST)
From: k...@openbsd.org
To: ports@openbsd.org
Subject: sparc64 bulk build report

...
http://build-failures.rhaalovely.net/sparc64/2021-12-22/audio/ncspot.log
...



Re: audio/ncspot: update to 0.9.3

2021-12-27 Thread Henrik Friedrichsen
On Mon, Dec 27, 2021 at 06:25:32AM +, Klemens Nanni wrote:
> Works for me on amd64, this most probably won't fix the sparc64 build
> failure since the broken crate has not been updated.
> 
> OK?

Looks good to me, thanks for the diff. Out of curiosity, which crate is broken 
on sparc64?



CVS: cvs.openbsd.org: ports

2021-12-27 Thread Pascal Stumpf
CVSROOT:/cvs
Module name:ports
Changes by: pas...@cvs.openbsd.org  2021/12/27 06:06:30

Modified files:
shells/ksh93   : Makefile distinfo 
shells/ksh93/pkg: PLIST 
Removed files:
shells/ksh93/patches: patch-bin_package 
  patch-src_cmd_ksh93_Mamfile 
  patch-src_cmd_ksh93_edit_history_c 
  patch-src_lib_libast_hash_hashalloc_c 
  patch-src_lib_libast_string_tokscan_c 

Log message:
Update to ksh93 1.0.0-beta2.

Development is now taking place at https://github.com/ksh93/ksh/, with this
version already being far ahead of the nine-year-old AT release we
currently have.



CVS: cvs.openbsd.org: ports

2021-12-27 Thread Denis Fondras
CVSROOT:/cvs
Module name:ports
Changes by: de...@cvs.openbsd.org   2021/12/27 04:47:21

Modified files:
sysutils/kopia : Makefile distinfo modules.inc 

Log message:
update to 0.9.8

with help from Stefan Hagen, thanks.