From nobody Sat Jul 29 08:09:39 2023 X-Original-To: ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RCccG2yr7z4p61v for ; Sat, 29 Jul 2023 08:09:50 +0000 (UTC) (envelope-from kiri@truefc.org) Received: from kx.truefc.org (1.212.52.36.ap.yournet.ne.jp [36.52.212.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp", Issuer "smtp" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RCccF67Z9z3lfF; Sat, 29 Jul 2023 08:09:49 +0000 (UTC) (envelope-from kiri@truefc.org) Authentication-Results: mx1.freebsd.org; none Received: from kx.truefc.org (kx.truefc.org [36.52.212.1]) by kx.truefc.org (8.16.1/8.16.1) with ESMTP id 36T89dkn045945; Sat, 29 Jul 2023 17:09:39 +0900 (JST) (envelope-from kiri@kx.truefc.org) Message-Id: <202307290809.36T89dkn045945@kx.truefc.org> Date: Sat, 29 Jul 2023 17:09:39 +0900 From: KIRIYAMA Kazuhiko To: Dimitry Andric Cc: KIRIYAMA Kazuhiko , 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' In-Reply-To: References: <202307280145.36S1jdl3007993@kx.truefc.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 MULE XEmacs/21.4 (patch 24) (Standard C) (amd64--freebsd) List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4RCccF67Z9z3lfF X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:10013, ipnet:36.52.208.0/21, country:JP] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated Hi, Dimitry On Fri, 28 Jul 2023 17:37:42 +0900, Dimitry Andric wrote: > > [1 ] > On 28 Jul 2023, at 03:45, KIRIYAMA Kazuhiko 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 ] --- Kazuhiko Kiriyama