From nobody Thu Feb 22 18:45:47 2024 X-Original-To: dev-commits-ports-branches@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 4Tght33j79z5B9rx; Thu, 22 Feb 2024 18:45:47 +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 4Tght336mlz4kVw; Thu, 22 Feb 2024 18:45:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708627547; 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=tDXb8Gc2fiq5XZrRdKzLH/X8kQ8/R5lA0QIfZQ6F3gs=; b=Gb3QKLZ8QHvxw9Bw4BX7j/gTZEhBK2a0v4tBfW65eW9fBs2XqCaOa5nBMbC5CQHhgf1H9B 9OVPPvY/g8oSxU6S43eipO66GncJwJuqqNIpjMMBFP/nEEfxcifIyvMq7FKMfWKbkFQar9 RQkh6/WNKz+xm5bFoOnM5/Crp86ndA2/Dd7ZvGnP8GNWqQazB5f7/4Y/+9jOtMhKojI8pG zAOeoDWf7pOG4AGXqmbsFfvcMBnmOrxHfMl9dHmZrUvAyaj5664WwCx3iUDejmX4J1JZ8B uvMEgF6S1IqBwd0Z/9Mfq+lE3ZQe7ApjtT1HzCc7xeX8Zh4YUT+g2ldr1grjUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708627547; 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=tDXb8Gc2fiq5XZrRdKzLH/X8kQ8/R5lA0QIfZQ6F3gs=; b=hNar0It/1olB0fASd5sGH1BG9O/PXhNooI7lWCSno0SOUv3JE/+P/80iyxyZ/qOZtZ65zV c6MmFoerqKBXPgUucuRfSMEgy4Xa8/tyjdV60SZeZcQ+e+FyF11XeSx+OrFbJly1O90YuF VFekvaa/Nx5JaatFY0gCDxge6CxzBxa7IanHYVpwUSkRusQu4TZDr/jy4vyXyd6x1bihLG dCmebG0vE3fHq+HiJKdFDZSeApdp6heZsUB15F+jwpCXRYuAQvjqxo2rH7cqSKlmZ+jkFx /R7zEnsDxYxxZmAncZIVb9cbsw2ET/8LjDc7Y0p5MTxNweWNS7IVW5F0HMJzdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708627547; a=rsa-sha256; cv=none; b=bA+xoArkhuUNMdu3vJWajQoAOXJJI4W3id/j7RhpPRIQeN8ijrWH6RW++WMJ2zThwiUrRb aZwacMDssqv5HQfRCQpjE5984vX67miHokFfiGw+iAqnPD42WI28UwEfr8u1k8+QyOkGOx tXUtkxuuI/+mIvf97h7bLyjaaFJiIJga8UFRZYA7W1Tb9hL4GrLAi8qLazWU563AroWnJL mix+yCEAVoT3R/HxR86pdnUmlA3kEbNx2n+PpXimhuv00RVpS7dnM2z2ClgPrkp1RszCg0 m1g+6YLf1ZIAZS0qrPEh3wW+FLtEyRSbBAr2ISB8i8xq5xcWfY4oPEcpaXtsAQ== 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 4Tght329m3zjjw; Thu, 22 Feb 2024 18:45:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41MIjlWe053246; Thu, 22 Feb 2024 18:45:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41MIjlQX053243; Thu, 22 Feb 2024 18:45:47 GMT (envelope-from git) Date: Thu, 22 Feb 2024 18:45:47 GMT Message-Id: <202402221845.41MIjlQX053243@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Dimitry Andric Subject: git: 1118e30052b8 - 2024Q1 - devel/electron25: fix build with clang 18 List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@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/2024Q1 X-Git-Reftype: branch X-Git-Commit: 1118e30052b8d60b559173b9f5746a024a84ca25 Auto-Submitted: auto-generated The branch 2024Q1 has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=1118e30052b8d60b559173b9f5746a024a84ca25 commit 1118e30052b8d60b559173b9f5746a024a84ca25 Author: Dimitry Andric AuthorDate: 2024-02-18 12:59:18 +0000 Commit: Dimitry Andric CommitDate: 2024-02-22 18:45:36 +0000 devel/electron25: fix build with clang 18 Clang 18 has become more stringent about narrowing in initializer lists, resulting in errors when building devel/electron25: ../../third_party/webrtc/pc/legacy_stats_collector.cc:191:54: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 191 | {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, | ^~~~~~~~~~~~~~~~~~~~~~~~ ../../third_party/webrtc/pc/legacy_stats_collector.cc:193:8: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing-const-reference] 193 | info.total_output_duration}}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ and later: In file included from ../../cc/layers/mirror_layer_impl.cc:5: ../../cc/layers/mirror_layer_impl.h:59:40: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned long' in initializer list [-Wc++11-narrowing-const-reference] 59 | return viz::CompositorRenderPassId{mirrored_layer_id()}; | ^~~~~~~~~~~~~~~~~~~ The first batch of errors can be fixed similarly to bug 276997, by cherry-picking into the thirdparty directory. The second batch of errors can be fixed by cherry-picking . PR: 277129 Approved by: tagattie (maintainer) MFH: 2024Q1 (cherry picked from commit 76cb9bc437fd1e15ff71068d6eeea8c212d844d4) --- devel/electron25/Makefile | 2 +- .../files/patch-cc_layers_mirror__layer__impl.h | 20 ++++ ...er__metrics_energy__metrics__provider__linux.cc | 14 +++ ...rd__party_webrtc_pc_legacy__stats__collector.cc | 114 +++++++++++++++++++++ 4 files changed, 149 insertions(+), 1 deletion(-) diff --git a/devel/electron25/Makefile b/devel/electron25/Makefile index 4477124c9e91..507a89a53689 100644 --- a/devel/electron25/Makefile +++ b/devel/electron25/Makefile @@ -1,7 +1,7 @@ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER:S/-beta./.b/} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= devel MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v25.5.0/:chromium \ https://commondatastorage.googleapis.com/chromium-nodejs/:chromium_node \ diff --git a/devel/electron25/files/patch-cc_layers_mirror__layer__impl.h b/devel/electron25/files/patch-cc_layers_mirror__layer__impl.h new file mode 100644 index 000000000000..ae2d3d694a8c --- /dev/null +++ b/devel/electron25/files/patch-cc_layers_mirror__layer__impl.h @@ -0,0 +1,20 @@ +--- cc/layers/mirror_layer_impl.h.orig 2023-08-12 07:07:10 UTC ++++ cc/layers/mirror_layer_impl.h +@@ -5,6 +5,7 @@ + #ifndef CC_LAYERS_MIRROR_LAYER_IMPL_H_ + #define CC_LAYERS_MIRROR_LAYER_IMPL_H_ + ++#include + #include + + #include "base/memory/ptr_util.h" +@@ -56,7 +57,8 @@ class CC_EXPORT MirrorLayerImpl : public LayerImpl { + private: + const char* LayerTypeAsString() const override; + viz::CompositorRenderPassId mirrored_layer_render_pass_id() const { +- return viz::CompositorRenderPassId{mirrored_layer_id()}; ++ return viz::CompositorRenderPassId{ ++ static_cast(mirrored_layer_id())}; + } + + int mirrored_layer_id_ = 0; diff --git a/devel/electron25/files/patch-components_power__metrics_energy__metrics__provider__linux.cc b/devel/electron25/files/patch-components_power__metrics_energy__metrics__provider__linux.cc new file mode 100644 index 000000000000..1643b08769fe --- /dev/null +++ b/devel/electron25/files/patch-components_power__metrics_energy__metrics__provider__linux.cc @@ -0,0 +1,14 @@ +--- components/power_metrics/energy_metrics_provider_linux.cc.orig 2023-08-12 07:07:15 UTC ++++ components/power_metrics/energy_metrics_provider_linux.cc +@@ -58,9 +58,9 @@ base::ScopedFD OpenPerfEvent(perf_event_attr* perf_att + // value of less than 1. Here, we only consider cpu0. See details in + // https://man7.org/linux/man-pages/man2/perf_event_open.2.html. + base::ScopedFD OpenPerfEvent(perf_event_attr* perf_attr) { +- base::ScopedFD perf_fd{syscall(__NR_perf_event_open, perf_attr, /*pid=*/-1, ++ base::ScopedFD perf_fd(syscall(__NR_perf_event_open, perf_attr, /*pid=*/-1, + /*cpu=*/0, /*group_fd=*/-1, +- PERF_FLAG_FD_CLOEXEC)}; ++ static_cast(PERF_FLAG_FD_CLOEXEC))); + return perf_fd; + } + diff --git a/devel/electron25/files/patch-third__party_webrtc_pc_legacy__stats__collector.cc b/devel/electron25/files/patch-third__party_webrtc_pc_legacy__stats__collector.cc new file mode 100644 index 000000000000..56f072059231 --- /dev/null +++ b/devel/electron25/files/patch-third__party_webrtc_pc_legacy__stats__collector.cc @@ -0,0 +1,114 @@ +commit 267f9bdd53a37d1cbee760d5af07880198e1beef +Author: Tommi +Date: 2023-12-21T14:08:26+01:00 + + Update LegacyStatsCollector to conform with Wc++11-narrowing + + Bug: none + Change-Id: Ida6a1af5c324473a55ea4f3b143862ea016ff50a + Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332240 + Commit-Queue: Tomas Gunnarsson + Reviewed-by: Harald Alvestrand + Auto-Submit: Tomas Gunnarsson + Reviewed-by: Alexander Kornienko + Reviewed-by: Henrik Boström + Cr-Commit-Position: refs/heads/main@{#41432} + +--- third_party/webrtc/pc/legacy_stats_collector.cc.orig 2023-08-12 07:13:59 UTC ++++ third_party/webrtc/pc/legacy_stats_collector.cc +@@ -188,9 +188,10 @@ void ExtractStats(const cricket::VoiceReceiverInfo& in + {StatsReport::kStatsValueNameAccelerateRate, info.accelerate_rate}, + {StatsReport::kStatsValueNamePreemptiveExpandRate, + info.preemptive_expand_rate}, +- {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_output_energy}, ++ {StatsReport::kStatsValueNameTotalAudioEnergy, ++ static_cast(info.total_output_energy)}, + {StatsReport::kStatsValueNameTotalSamplesDuration, +- info.total_output_duration}}; ++ static_cast(info.total_output_duration)}}; + + const IntForAdd ints[] = { + {StatsReport::kStatsValueNameCurrentDelayMs, info.delay_estimate_ms}, +@@ -244,9 +245,10 @@ void ExtractStats(const cricket::VoiceSenderInfo& info + SetAudioProcessingStats(report, info.apm_statistics); + + const FloatForAdd floats[] = { +- {StatsReport::kStatsValueNameTotalAudioEnergy, info.total_input_energy}, ++ {StatsReport::kStatsValueNameTotalAudioEnergy, ++ static_cast(info.total_input_energy)}, + {StatsReport::kStatsValueNameTotalSamplesDuration, +- info.total_input_duration}}; ++ static_cast(info.total_input_duration)}}; + + RTC_DCHECK_GE(info.audio_level, 0); + const IntForAdd ints[] = { +@@ -340,7 +342,8 @@ void ExtractStats(const cricket::VideoReceiverInfo& in + {StatsReport::kStatsValueNamePlisSent, info.plis_sent}, + {StatsReport::kStatsValueNameRenderDelayMs, info.render_delay_ms}, + {StatsReport::kStatsValueNameTargetDelayMs, info.target_delay_ms}, +- {StatsReport::kStatsValueNameFramesDecoded, info.frames_decoded}, ++ {StatsReport::kStatsValueNameFramesDecoded, ++ static_cast(info.frames_decoded)}, + }; + + for (const auto& i : ints) +@@ -384,15 +387,19 @@ void ExtractStats(const cricket::VideoSenderInfo& info + info.encode_usage_percent}, + {StatsReport::kStatsValueNameFirsReceived, info.firs_received}, + {StatsReport::kStatsValueNameFrameHeightSent, info.send_frame_height}, +- {StatsReport::kStatsValueNameFrameRateInput, round(info.framerate_input)}, ++ {StatsReport::kStatsValueNameFrameRateInput, ++ static_cast(round(info.framerate_input))}, + {StatsReport::kStatsValueNameFrameRateSent, info.framerate_sent}, + {StatsReport::kStatsValueNameFrameWidthSent, info.send_frame_width}, +- {StatsReport::kStatsValueNameNacksReceived, info.nacks_received}, ++ {StatsReport::kStatsValueNameNacksReceived, ++ static_cast(info.nacks_received)}, + {StatsReport::kStatsValueNamePacketsLost, info.packets_lost}, + {StatsReport::kStatsValueNamePacketsSent, info.packets_sent}, + {StatsReport::kStatsValueNamePlisReceived, info.plis_received}, +- {StatsReport::kStatsValueNameFramesEncoded, info.frames_encoded}, +- {StatsReport::kStatsValueNameHugeFramesSent, info.huge_frames_sent}, ++ {StatsReport::kStatsValueNameFramesEncoded, ++ static_cast(info.frames_encoded)}, ++ {StatsReport::kStatsValueNameHugeFramesSent, ++ static_cast(info.huge_frames_sent)}, + }; + + for (const auto& i : ints) +@@ -780,19 +787,25 @@ StatsReport* LegacyStatsCollector::AddConnectionInfoRe + AddCandidateReport(remote_candidate_stats, false)->id()); + + const Int64ForAdd int64s[] = { +- {StatsReport::kStatsValueNameBytesReceived, info.recv_total_bytes}, +- {StatsReport::kStatsValueNameBytesSent, info.sent_total_bytes}, +- {StatsReport::kStatsValueNamePacketsSent, info.sent_total_packets}, +- {StatsReport::kStatsValueNameRtt, info.rtt}, ++ {StatsReport::kStatsValueNameBytesReceived, ++ static_cast(info.recv_total_bytes)}, ++ {StatsReport::kStatsValueNameBytesSent, ++ static_cast(info.sent_total_bytes)}, ++ {StatsReport::kStatsValueNamePacketsSent, ++ static_cast(info.sent_total_packets)}, ++ {StatsReport::kStatsValueNameRtt, static_cast(info.rtt)}, + {StatsReport::kStatsValueNameSendPacketsDiscarded, +- info.sent_discarded_packets}, ++ static_cast(info.sent_discarded_packets)}, + {StatsReport::kStatsValueNameSentPingRequestsTotal, +- info.sent_ping_requests_total}, ++ static_cast(info.sent_ping_requests_total)}, + {StatsReport::kStatsValueNameSentPingRequestsBeforeFirstResponse, +- info.sent_ping_requests_before_first_response}, +- {StatsReport::kStatsValueNameSentPingResponses, info.sent_ping_responses}, +- {StatsReport::kStatsValueNameRecvPingRequests, info.recv_ping_requests}, +- {StatsReport::kStatsValueNameRecvPingResponses, info.recv_ping_responses}, ++ static_cast(info.sent_ping_requests_before_first_response)}, ++ {StatsReport::kStatsValueNameSentPingResponses, ++ static_cast(info.sent_ping_responses)}, ++ {StatsReport::kStatsValueNameRecvPingRequests, ++ static_cast(info.recv_ping_requests)}, ++ {StatsReport::kStatsValueNameRecvPingResponses, ++ static_cast(info.recv_ping_responses)}, + }; + for (const auto& i : int64s) + report->AddInt64(i.name, i.value);