From nobody Thu Jan 19 19:14:11 2023 X-Original-To: dev-commits-ports-all@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 4NyXNz32PRz316Rd; Thu, 19 Jan 2023 19:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NyXNz2V75z469R; Thu, 19 Jan 2023 19:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674155651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tKrSFRNodazuOQqnoK3d0T7e+bFDMmM99ONYn/cDmZg=; b=fzwdzVfrM3B/cULAaSBTQKwk5kfe3Nz6wunJoKI5ePUzuvdiVbNbAmy2fUTXMn2nR7ABF5 6m/hmPiC6GjbJq0NzucVDHqH3KaAHdLJgRcEOWd4tQM79sB3qddwQg0ik6ROxpoyblIHvV 4e2Jcaa1CAnAdpGtgMjt7D+yZaSTYwJK/Pnif9SZVFNNz1wXNvj2etPJh/QmRE/rNZmPT4 OFnVpvdHB6n4/ljECQlV1iJwPCeb7X9BBmanEgfxTWKFwTGU4PGVlxpXojJQxB4AArwpgp hnFpqQNaMrKKVaJWnc3cMDc1ix9xd9y2tcLp2ecWK8iuLnpzkKaK0/gsaw3cyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674155651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tKrSFRNodazuOQqnoK3d0T7e+bFDMmM99ONYn/cDmZg=; b=ywiQWflxkVJKYsmv3XX5o5ZEAjuP73KFDZ7/ugHTThkptOPjMeX2HoAb6m92lC5/k3zDop aaDF6MG7+ZffIFQ/k1pQe3+Yl2x9Grla6DC8aU88bc2gc6d6pfFY6CJ+YXc9haEA8KUmpk 0l6Jq+2lpkx/Bp9CAwsz7AXlySXA7DsFyoq1w9itr+JVX8nVi6NFNsfspwMV8mGPvo+Fdf TxtOx9OnX2LwlPseNB8/ozFefp1nNdMUMhMnIUtI4jzR86709SXd36ngW8nE8E3zfk2XBT nyziJvsDuU2OSckO7EYdXbBoKEfsE3psEa1kFHbTTJnMXkIlgEfethWz9i8XJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674155651; a=rsa-sha256; cv=none; b=TxBb2sle2gbddxCXkl8PcgizHx5gCVbgg85wj3vdeel/5JoUEXVSsxuRRG9skiTf3xprEd p9lg+/7adAC6KcaOvovUiekaTMlN2xrYNayzsGlKrgRs5JK87cnOGt+QlYnQUlh5tl/hbn zi+ZlPldrff8xYsdRlFfkqjMN4XqksFRUal6faBgaPM8sJ3Q4Hd8b/oRgLxOV+kc/fNZ4E Jb86PG8aqiCBZ+NEbwZyAM8R13dgB6T21oLqyNlFlwk0uqeU7Pqp9v5YEoLEnjtbkQiKkR OAEjHsOjOdk9mzb6oGahSO+j1SAwjQHFu/aw0al5jvSXpyYe6Vus54mEMO5Zlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NyXNz1FwCz12Hx; Thu, 19 Jan 2023 19:14:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 30JJEBTM040088; Thu, 19 Jan 2023 19:14:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30JJEBDa040087; Thu, 19 Jan 2023 19:14:11 GMT (envelope-from git) Date: Thu, 19 Jan 2023 19:14:11 GMT Message-Id: <202301191914.30JJEBDa040087@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: bbab107cd410 - main - databases/soci: fix build with libc++ 15 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbab107cd4100eb8986d72ed2b3b25d5646c509b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=bbab107cd4100eb8986d72ed2b3b25d5646c509b commit bbab107cd4100eb8986d72ed2b3b25d5646c509b Author: Dimitry Andric AuthorDate: 2023-01-18 21:11:30 +0000 Commit: Dimitry Andric CommitDate: 2023-01-19 19:13:02 +0000 databases/soci: fix build with libc++ 15 During an exp-run for llvm 15 (see bug 265425), it turned out that databases/soci failed to build with clang 15: In file included from /wrkdirs/usr/ports/databases/soci/work/soci-4.0.3/tests/empty/test-empty.cpp:8: In file included from /wrkdirs/usr/ports/databases/soci/work/soci-4.0.3/include/soci/soci.h:12: In file included from /wrkdirs/usr/ports/databases/soci/work/soci-4.0.3/include/soci/soci-platform.h:18: In file included from /usr/include/c++/v1/string:551: In file included from /usr/include/c++/v1/string_view:222: In file included from /usr/include/c++/v1/algorithm:1851: In file included from /usr/include/c++/v1/__algorithm/ranges_sample.h:13: In file included from /usr/include/c++/v1/__algorithm/sample.h:18: /usr/include/c++/v1/__random/uniform_int_distribution.h:235:5: error: static assertion failed due to requirement '__libcpp_random_is_valid_urng::value': static_assert(__libcpp_random_is_valid_urng<_URNG>::value, ""); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/v1/__algorithm/shuffle.h:154:35: note: in instantiation of function template specialization 'std::uniform_int_distribution::operator()' requested here difference_type __i = __uid(__g, _Pp(0, __d)); ^ /usr/include/c++/v1/__algorithm/shuffle.h:166:14: note: in instantiation of function template specialization 'std::__shuffle, std::__wrap_iter, Catch::RandomNumberGenerator &>' requested here (void)std::__shuffle<_ClassicAlgPolicy>( ^ /wrkdirs/usr/ports/databases/soci/work/soci-4.0.3/tests/catch.hpp:7186:18: note: in instantiation of function template specialization 'std::shuffle, Catch::RandomNumberGenerator &>' requested here std::shuffle( vector.begin(), vector.end(), rng ); ^ /wrkdirs/usr/ports/databases/soci/work/soci-4.0.3/tests/catch.hpp:7204:44: note: in instantiation of function template specialization 'Catch::RandomNumberGenerator::shuffle>' requested here RandomNumberGenerator::shuffle( sorted ); ^ This is because soci declares its RandomNumberGenerator class with a result_type of std::ptrdiff_t, which is signed. However, the urng class used for std::shuffle must have an unsigned integer type as its result type. Use std::size_t instead. PR: 269035 Approved by: nc (maintainer) MFH: 2023Q1 --- databases/soci/files/patch-tests_catch.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/databases/soci/files/patch-tests_catch.hpp b/databases/soci/files/patch-tests_catch.hpp new file mode 100644 index 000000000000..97cd0e00127b --- /dev/null +++ b/databases/soci/files/patch-tests_catch.hpp @@ -0,0 +1,11 @@ +--- tests/catch.hpp.orig 2022-02-10 19:13:13 UTC ++++ tests/catch.hpp +@@ -7170,7 +7170,7 @@ namespace Catch { + namespace Catch { + + struct RandomNumberGenerator { +- typedef std::ptrdiff_t result_type; ++ typedef std::size_t result_type; + + result_type operator()( result_type n ) const { return std::rand() % n; } +