Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2023 17:09:39 +0900
From:      KIRIYAMA Kazuhiko <kiri@truefc.org>
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        KIRIYAMA Kazuhiko <kiri@truefc.org>, ports@freebsd.org
Subject:   Re: www/nginx-full failed with src/cxx_supportlib/IOTools/IOUtils.cpp:288:3: error: use of undeclared identifier 'random_shuffle'
Message-ID:  <202307290809.36T89dkn045945@kx.truefc.org>
In-Reply-To: <FD0C471E-3764-4FC4-A430-7E5E23DAFA65@FreeBSD.org>
References:  <202307280145.36S1jdl3007993@kx.truefc.org> <FD0C471E-3764-4FC4-A430-7E5E23DAFA65@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Dimitry

On Fri, 28 Jul 2023 17:37:42 +0900,
Dimitry Andric wrote:
> 
> [1  <text/plain; us-ascii (quoted-printable)>]
> On 28 Jul 2023, at 03:45, KIRIYAMA Kazuhiko <kiri@truefc.org> wrote:
> > www/nginx-full failed with
> > "src/cxx_supportlib/IOTools/IOUtils.cpp:288:3: error: use of
> > undeclared identifier 'random_shuffle'" :
> 
> std::random_shuffle has been removed from C++17, so either the code must be adjusted to use std::shuffle, or the port has to be compiled with C++14 or lower. Typically, you can add a line:
> 
> USE_CXXSTD= c++14
> 
> to the port's Makefile, if the program respects CXXFLAGS.

Unfortunatelly faild module (passenger) was in rake system
and CXXFLAGS must has been passed with EXTRA_PRE_CXXFLAGS :

diff -urN /usr/ports/www/nginx/Makefile nginx/Makefile
--- /usr/ports/www/nginx/Makefile	2023-07-15 21:00:03.000000000 +0900
+++ nginx/Makefile	2023-07-29 16:53:49.048687000 +0900
@@ -240,6 +240,10 @@
 CFLAGS+=	-DNDEBUG
 .endif
 
+.if ${PORT_OPTIONS:MPASSENGER}
+CONFIGURE_ENV+=	EXTRA_PRE_CXXFLAGS="-std=c++14"
+.endif
+
 # Fix build failure on clang >= 12
 .if ${PORT_OPTIONS:MHTTP_PERL} && ${OSVERSION} >= 1301000
 CFLAGS+=	-Wno-compound-token-split-by-macro

But this prefer to be done when CXX over c++14 so may be
changed like this :

.if ${PORT_OPTIONS:MPASSENGER} && ${OSVERSION} >= xxxxxxx
CONFIGURE_ENV+=	EXTRA_PRE_CXXFLAGS="-std=c++14"
.endif

What should be take xxxxxxx number ?

> 
> -Dimitry
> 
> [2 Message signed with OpenPGP <application/pgp-signature (7bit)>]
---
Kazuhiko Kiriyama



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202307290809.36T89dkn045945>