Re: www/nginx-full failed with src/cxx_supportlib/IOTools/IOUtils.cpp:288:3: error: use of undeclared identifier 'random_shuffle'
- Reply: Dimitry Andric : "Re: www/nginx-full failed with src/cxx_supportlib/IOTools/IOUtils.cpp:288:3: error: use of undeclared identifier 'random_shuffle'"
- In reply to: Dimitry Andric : "Re: www/nginx-full failed with src/cxx_supportlib/IOTools/IOUtils.cpp:288:3: error: use of undeclared identifier 'random_shuffle'"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 29 Jul 2023 08:09:39 UTC
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