From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id F2A6F941CB6 for ; Mon, 30 Jun 2025 10:08:55 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vFwhudfhHMG8aQe+jfq+L/vYnzL9Fy+MrfBQg+63U5A=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=groups1; t=1751278134; v=1; x=1751537334; b=oa9rSpfVnQoxNFAtH/hzpDr0GQQuBr02xrVuExHgOrFwgrp/Jtf8FcnWSHPeUdDiaDBMyRXX MV85/eki+/WPZReKJoitaiU6vWzqaJTWl/XrNTO0ePcHKq9zU5TJF3Nb+Jl3ZddvKNsG89Y973C K9rFflxqednUNYK+D0FAYHuiiCmGJ8Z09oqC+hczuqYdoANCKHIJqxcLt9OHIFZAkM7DUIz4DLn NVvJENqKHj3ZKWiW/7Ai9McIf1CjsRVx2IwlPpK/gu+635yMYVcy97hvfIsAbd2lkZv0Js/ysJ6 aEOC0KUlmas3fZpsoeVKKLh3qL3pnqTFmRlRDSDOYp2nw== X-Received: by 127.0.0.2 with SMTP id raNrYY7687511xhczE5RaZmy; Mon, 30 Jun 2025 03:08:54 -0700 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web10.36015.1751278133610302463 for ; Mon, 30 Jun 2025 03:08:53 -0700 X-Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55U8DDUH002153 for ; Mon, 30 Jun 2025 10:08:53 GMT X-Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47j9pcm79d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 30 Jun 2025 10:08:53 +0000 (GMT) X-Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-235eefe6a8fso30608375ad.1 for ; Mon, 30 Jun 2025 03:08:52 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWYXYN660AhzGYfnsNv1Tybg4I4umWcfsxFNB0EBoX1ECdZVmVpZcO/d53dnK1TiFVXC4K/pg==@edk2.groups.io X-Gm-Message-State: Z9qofQMInDuXuOhl6aHRRmr0x7686176AA= X-Gm-Gg: ASbGncvxiGcUMPKIQj3+wtbPlXxZTUQ+eXkIT4L9Fggnt3c2aq1Zxw+5BenUhZj2oep 0tSd62KrmPR8rZiyoaP84mep5ZtCeYkjzEf3m+MnGJ2zACa5fmQ4IHQhjAyk0ciCYNz+IEtg1pI CgJCXHppYTK3bqCdpfs2ls04bN/90LJcHL/jGX X-Received: by 2002:a17:902:f78e:b0:235:f4f7:a64c with SMTP id d9443c01a7336-23ac45d58e3mr210800165ad.12.1751278132172; Mon, 30 Jun 2025 03:08:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5lTwQ0hUIaNg5l41eE4fu60P+vYyFlNoz8Ro1PvRQkyjwSb205UfLC6PUASbk4rBdiUcBFYtqRAkHxEaIQTg= X-Received: by 2002:a17:902:f78e:b0:235:f4f7:a64c with SMTP id d9443c01a7336-23ac45d58e3mr210799805ad.12.1751278131774; Mon, 30 Jun 2025 03:08:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Leif Lindholm via groups.io" Date: Mon, 30 Jun 2025 11:08:34 +0100 X-Gm-Features: Ac12FXzEG2rutf5w5Zi1-m_sWitQqTfmGxb7OV2CsP5lU6tbJsz3MscECAAeTss Message-ID: Subject: Re: [edk2-devel] [edk2-discuss] [Bug]: EmbeddedPkg/VirtualRealTimeClockLib fails to build. To: "Kinney, Michael D" Cc: "discuss@edk2.groups.io" , "rithrama@amd.com" , Michael Kubacki , edk2-devel-groups-io X-Proofpoint-GUID: zhjvbmQpHuxEuLaqrTgIndm9WUz6fo94 X-Proofpoint-ORIG-GUID: zhjvbmQpHuxEuLaqrTgIndm9WUz6fo94 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjMwMDA4MyBTYWx0ZWRfX54HjqN7ml0cw GNwD4GX/8SXBCbg1s2oMiuRJHtc4W5wqtcXolLkw3f1Aa8RsRIOdT0tKT2qhPxd973Rvp8aMcHm q3jswPpM0hoU071tBITmS4b2VjttrBTGcdrppCBOALK7t6S060TvfPp6eppWu8Qt39e7nNkVki1 lSnR9otXr3r3vFyxxbpsKbpFKVzv470bqf1vrw7smpkyAGV3B0/t6eWuemU4TC/gDNqNPO/ajEg bPW1FPszxvAmYKy9X4MRbOdpjmED3bfmUYNGpOSKiXJdFT4ZZd+rcHRqyoZYEP5f+GMAw6FjmUR dFVI2z31JEVqO+GDCWxYbM4VV8xVJMpqZZJqlnRmcfA28gHfsf2YqWyTsZUUBcIsKsOZi4QaVcQ K9wz/uSIMah0vTS3UNnwmeWOkmBhfDxMhYzQYx24uohV9T3PpU+eDAo7rbT0Ge04mu56SVry X-Authority-Analysis: v=2.4 cv=QMFoRhLL c=1 sm=1 tr=0 ts=68626235 cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=NEAV23lmAAAA:8 a=xjGz-wBMAAAA:8 a=QyXUC8HyAAAA:8 a=EUspDBNiAAAA:8 a=zd2uoN0lAAAA:8 a=yMhMjlubAAAA:8 a=8QpBiRk3F69Xb-ooj5oA:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 a=dmbvPvuLAiAwK5y7oBu2:22 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 30 Jun 2025 03:08:53 -0700 Resent-From: leif.lindholm@oss.qualcomm.com Reply-To: devel@edk2.groups.io,leif.lindholm@oss.qualcomm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=groups1 header.b=oa9rSpfV; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io On Thu, 26 Jun 2025 at 22:25, Kinney, Michael D wrote: > EmbeddedPkg/VirtualRealTimeClockLib change: > https://github.com/mdkinney/edk2/commit/51430285377e4d6298ec2b3ea9243d1c8ef9fb2a Yes, this approach is defnitely what we want for the module. > BaseTools change: > https://github.com/mdkinney/edk2/commit/a596ddc61d649e52db861e0fb6613c0a47336b6e A few thoughs about this one: - Clearly the naming builds on SOURCE_DATE_EPOCH. Is there value in adding our own prefix? - If we do add our own prefix, is there a corresponding change in semantics? - Alternatively, could we do an "if not defined SOURCE_DATE_EPOCH, ..., set SOURCE_DATE_EPOCH to current time"? / Leif > Mike > > > -----Original Message----- > > From: Leif Lindholm > > Sent: Thursday, June 26, 2025 1:03 PM > > To: Kinney, Michael D > > Cc: discuss@edk2.groups.io; rithrama@amd.com; Michael Kubacki > > ; edk2-devel-groups-io > > Subject: Re: [edk2-discuss] [Bug]: EmbeddedPkg/VirtualRealTimeClockLib > > fails to build. > > > > Hi Mike, > > > > I like that idea. Sounds like something that could be useful in other > > places as well. > > > > Regards, > > > > Leif > > > > On Thu, 26 Jun 2025 at 20:02, Kinney, Michael D > > wrote: > > > > > > Hi Leif, > > > > > > I have looked at this and suggest we add a new env var to the edk2 build > > > that captures the EPOCH value in python code and sets the env var and > > > that env var can be used in INF files removing the use of OS specific > > > commands. > > > > > > Will require change to EDK II Build Spec and BaseTools. > > > > > > Also need to support override of EPOCH value to a constant value to > > > support reproducible builds. > > > > > > I have a POC of this that I can share. > > > > > > Mike > > > > > > > > > > -----Original Message----- > > > > From: discuss@edk2.groups.io On Behalf Of Leif > > > > Lindholm via groups.io > > > > Sent: Thursday, June 26, 2025 2:59 AM > > > > To: rithrama@amd.com > > > > Cc: Kinney, Michael D ; Michael Kubacki > > > > ; discuss@edk2.groups.io; edk2-devel- > > groups- > > > > io > > > > Subject: Re: [edk2-discuss] [Bug]: EmbeddedPkg/VirtualRealTimeClockLib > > > > fails to build. > > > > > > > > On Wed, 25 Jun 2025 at 23:14, Rithvik Rama via groups.io > > > > wrote: > > > > > The EmulatorPkg throws below error when running a build: > > > > > > > > > > > edk2\EmbeddedPkg\Library\VirtualRealTimeClockLib\VirtualRealTimeClockLib.c( > > > > 89): error C2065: 'BUILD_EPOCH': undeclared identifier > > > > > > > > I don't see EmbeddedPkg referenced in EmulatorPkg. Is EmulatorPkg a > > typo > > > > above? > > > > > > > > > The reason I raised this discussion is because the source file > > comments > > > > asks me to bring this up with the mailing list: > > > > > // > > > > > // The following is intended to produce a compilation error on > > build > > > > > // environments where BUILD_EPOCH can not be set from inline > > shell. > > > > > // If you are attempting to use this library on such an > > environment, > > > > please > > > > > // contact the edk2 mailing list, so we can try to add support > > for > > > > it. > > > > > // > > > > > > > > > > The toolchain I used: > > > > > VS2022 > > > > > Windows 11. > > > > > > > > > > May I know the root cause of this issue and how do I continue to > > build > > > > the EmbeddedPkg successfully? > > > > > > > > The answer is simple. A lot of EmbeddedPkg has only been tested > > > > with/developed for GCC family of > > > > toolchains. > > > > > > > > For those, we generate the BUILD_EPOCH here: > > > > > > https://github.com/tianocore/edk2/blob/master/EmbeddedPkg/Library/VirtualRe > > > > alTimeClockLib/VirtualRealTimeClockLib.inf#L37 > > > > GCC:*_*_*_CC_FLAGS = -DBUILD_EPOCH=`printenv SOURCE_DATE_EPOCH || > > date > > > > +%s` > > > > only sets BUILD_EPOCH for GCC family of toolchains. > > > > > > > > I don't know how to best wrangle this together for a Visual Studio > > > > environment. > > > > Maybe a better way there would be to do something with __DATE__ and > > > > __TIME__ macros, > > > > but I don't think the formats of those are portable between toolchains. > > > > Mike, Michael - thoughts? > > > > > > > > A hack that would let you build this would be to add a line like such: > > > > MSFT:*_*_*_CC_FLAGS = -DBUILD_EPOCH=1750931236 > > > > (timestamp generated by me in a linux shell with "git log -1 > > > > --pretty=%ct | date +%s") > > > > > > > > / > > > > Leif > > > > > > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121437): https://edk2.groups.io/g/devel/message/121437 Mute This Topic: https://groups.io/mt/113840675/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-