From nobody Sat Jul 29 08:27:44 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 4RCd1G0Z6Dz4pQ3g for ; Sat, 29 Jul 2023 08:28:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RCd1F5htYz3tK7; Sat, 29 Jul 2023 08:28:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690619281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q147aQIDKHvbr8veHIOuyTWugP2uFqgPwrjIzjSFU04=; b=IzINtrScWpQVznLX+wyc4zfW3ZlNEYwURca0GPXlvDtyRXOOu8UlWosFmpHCQBdW/BVh2G XSZNMfwbL1m9Pzg5cLotg2CKBECOjmw69s4a1f7Pp2TiuHFEljipyw2i3OqDbsIkMKvKV+ ZDjOR9idll1l8KtwIypxW4O3rAXnSq/U4GYmuzwZgfCI8ecMWpUGc5fFySOL71N23l+oAn ER0a9y/5EY25uBHQoEFYn2XdtreTb4xEX2sHplCrgx9MLCiFn6Qr6B6GeqWqGGvGTukXHT D7LtYlMFgokoxNqnZIpHsG3lHFmQPB3EOsW2pTaFQFGnu7QwdQySMfgwUdN4DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690619281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q147aQIDKHvbr8veHIOuyTWugP2uFqgPwrjIzjSFU04=; b=oblstf0LkPZjn/DxlS57EMixhZ2D4ArIgZJl00ga8KrIBKYyv4Vsh6cWyiJU/q7D3zVk2h 0EhKYTbZR0bpFTUK1zMA55p9ZaCnW6CA3hEjBoK1Y0u07l3WDcsdreMiUD5Jo/e4kMR5iN r4o1qjewLl/FZQfupoWvv96YZRjqJRF3rcYQab31lPWBdKz3kBHJuFB1uDYn8S0taDDGtl LrDAKjHtSN5CRJ3f8dVMZW6d6YVeRkSWYTP1XDxu5UuPMroWwdwwBGwM+wzA0dyRYBQ0m3 yRosEFv+ukX4gx6VPVFxmjzbG+9tZfMTcnDVc0lFlXcHC7ONwEF0iTt7nFoT1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690619281; a=rsa-sha256; cv=none; b=fr+W0lZAkov/fz0e6tYIkVQlQU7DLOBsUyOinIY9OJFEJ4YtGjiTDUw8Y6tqfydk43imrW s/qpCJpUQX9tVie73CSIjrWTPp4TGiOybM6i/tWdlLIPy7wZgl/0C/fZYQlzpbfDhfBlqN DP9BQ+5KgS/MWIqSCJwxGRpcp5qS66KnRHRUT4JJYguFu+XRvb7qpnKy1OqXVxuFZLMPUA IxXFfOZ2/ViwT8u7x+S9OL1ItvyCxyBGYRvAzrswrJTcsVP7JwTsV7IZJok1/ngLZA+GlC 4+Rh0c5/WGsnAovw/nSCED/MP5U4bBlFoXDa+0/6W6bYxDOYuKRrgdLruDMR0w== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RCd1F3wXLzSrK; Sat, 29 Jul 2023 08:28:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 34FE069BC0; Sat, 29 Jul 2023 10:28:00 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_974A9679-1B5B-46B5-AF84-59077088EE7D"; protocol="application/pgp-signature"; micalg=pgp-sha1 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 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: www/nginx-full failed with src/cxx_supportlib/IOTools/IOUtils.cpp:288:3: error: use of undeclared identifier 'random_shuffle' From: Dimitry Andric In-Reply-To: <202307290809.36T89dkn045945@kx.truefc.org> Date: Sat, 29 Jul 2023 10:27:44 +0200 Cc: FreeBSD Ports Message-Id: <65161EC0-D96C-4420-8B65-A03DE584F724@FreeBSD.org> References: <202307280145.36S1jdl3007993@kx.truefc.org> <202307290809.36T89dkn045945@kx.truefc.org> To: KIRIYAMA Kazuhiko X-Mailer: Apple Mail (2.3731.700.6) --Apple-Mail=_974A9679-1B5B-46B5-AF84-59077088EE7D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 29 Jul 2023, at 10:09, KIRIYAMA Kazuhiko wrote: >=20 >=20 > On Fri, 28 Jul 2023 17:37:42 +0900, > Dimitry Andric wrote: >>=20 >> [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'" : >>=20 >> 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: >>=20 >> USE_CXXSTD=3D c++14 >>=20 >> to the port's Makefile, if the program respects CXXFLAGS. >=20 > Unfortunatelly faild module (passenger) was in rake system > and CXXFLAGS must has been passed with EXTRA_PRE_CXXFLAGS : >=20 > 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+=3D -DNDEBUG > .endif >=20 > +.if ${PORT_OPTIONS:MPASSENGER} > +CONFIGURE_ENV+=3D EXTRA_PRE_CXXFLAGS=3D"-std=3Dc++14" > +.endif > + > # Fix build failure on clang >=3D 12 > .if ${PORT_OPTIONS:MHTTP_PERL} && ${OSVERSION} >=3D 1301000 > CFLAGS+=3D -Wno-compound-token-split-by-macro >=20 > But this prefer to be done when CXX over c++14 so may be > changed like this : >=20 > .if ${PORT_OPTIONS:MPASSENGER} && ${OSVERSION} >=3D xxxxxxx > CONFIGURE_ENV+=3D EXTRA_PRE_CXXFLAGS=3D"-std=3Dc++14" > .endif >=20 > What should be take xxxxxxx number ? 1400091 (this is also documented on = https://docs.freebsd.org/en/books/porters-handbook/versions/#versions-14),= but in this case there is no real need to check the clang version or the operating system version. There is no harm in always compiling C++ code that was made for an earlier standard with -std=3Dc++14. It also works = for gcc. -Dimitry --Apple-Mail=_974A9679-1B5B-46B5-AF84-59077088EE7D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZMTNgQAKCRCwXqMKLiCW owJoAKC9RKgrSlO7Fx+lXeWh+DfmeKx/5wCg2eO6YUVBKynOXr5fZLPrfHlenKg= =kzP3 -----END PGP SIGNATURE----- --Apple-Mail=_974A9679-1B5B-46B5-AF84-59077088EE7D--