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 90A267803DB for ; Tue, 1 Jul 2025 12:01:33 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=83ctoJ+sTJl6dFPUmY1hlosv+HdUUYSrSvcUFdNSWvs=; 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=1751371292; v=1; x=1751630492; b=VzfckLAqc+/wpSAsAROuJSwJ0gfyTCeXReENTrL6QIB+pINfleL4nC1dJ7IbGU4u6rlR5sBT s99y3rlUOMjV2dfSoLahouk+uptzsohzu/U9Q0hwegb3tjYVuwTtrlsT8wSGZhxhpJ32S1BTa0e TC3PTcSI/ZNH0Z0sX/MrAUuaHuEsWsIRUvMnGpZ+TmniNcw8afRcfeuTJf5LC1mcDICWsOhAvQA ehGFms716HoYxHZP2FhiOlsSulFUAA6TBvubciPJKSHJKplhr34/waCCeCfJYdB3SKeLRyb2SBh a+jadVZ8nuM6vONU0o9uIUo2A7gM0KiUDFdpJe67Oh7fg== X-Received: by 127.0.0.2 with SMTP id uh85YY7687511xbmxsBDeiq3; Tue, 01 Jul 2025 05:01:32 -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.8674.1751371291423629751 for ; Tue, 01 Jul 2025 05:01:31 -0700 X-Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5619LEJ3028664 for ; Tue, 1 Jul 2025 12:01:31 GMT X-Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47j7bvrr7h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 01 Jul 2025 12:01:30 +0000 (GMT) X-Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-3132c1942a1so5195320a91.2 for ; Tue, 01 Jul 2025 05:01:30 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCVDrPBFQlJZ2DaEx9RituwR9mxFT+NFTkAgj0djfSxDNWp2jr5qrKMrGi4bdgkG2m/IkbcHvA==@edk2.groups.io X-Gm-Message-State: zK9m6tkyQmTVq1aBrd5d3bfqx7686176AA= X-Gm-Gg: ASbGncvUx+nF3epthMAnAR7wRcUBvRB85qoqqQSkjVmkYQrwYigH2V70ggwIutKPyNx W3T0PvUJ7Ci/868whbZM9mCQKnHSSjUtNx/lQwzwo7hAHGnVLLzOxYlMi3MZ9mqje6GsEGr3OX4 0r9E7oE5ASNcOE/eUsIkcCU3x3WJF+tqZtnqA= X-Received: by 2002:a17:90a:c106:b0:311:c939:c859 with SMTP id 98e67ed59e1d1-318c92fd097mr22474552a91.30.1751371289739; Tue, 01 Jul 2025 05:01:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFa0LAStRCMAXQweT24d+Ao/UeOQ8mdl2myGXp5aGAHna9CjijKozYEC6MyCl2VVDFJnvuizERSU6VXqGhfn2I= X-Received: by 2002:a17:90a:c106:b0:311:c939:c859 with SMTP id 98e67ed59e1d1-318c92fd097mr22474491a91.30.1751371289265; Tue, 01 Jul 2025 05:01:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Leif Lindholm via groups.io" Date: Tue, 1 Jul 2025 13:01:17 +0100 X-Gm-Features: Ac12FXxkEDJwy2ia7uj9PpZFaeksOEmQr-4_i_x74rxyuHIZSci7FlpTbFQSxyk 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: P7JMrs0EwrLKBq410DPS0JNzvnCouYfG X-Authority-Analysis: v=2.4 cv=RJCzH5i+ c=1 sm=1 tr=0 ts=6863ce1a cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=IkcTkHD0fZMA:10 a=Wb1JkmetP80A:10 a=NEAV23lmAAAA:8 a=xjGz-wBMAAAA:8 a=QyXUC8HyAAAA:8 a=EUspDBNiAAAA:8 a=zd2uoN0lAAAA:8 a=yMhMjlubAAAA:8 a=oil-Zhjt0_M8Mc_096wA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 a=dmbvPvuLAiAwK5y7oBu2:22 X-Proofpoint-ORIG-GUID: P7JMrs0EwrLKBq410DPS0JNzvnCouYfG X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzAxMDA3NSBTYWx0ZWRfX4hod5QQVGk8w 6lcmzI9hKnFxkpy3Gfl9SgnrQdNVPeToW1rj+wzcGBj9KH32yCvqBpdVMofyxTrG1B6FF9Yla3M nyPSTuwfc/ivjdkB6GDVQif0RRV6G71RG+nACIg4GnEyKgd2nZBXXU7iEB0tcPzAIk8+lWaa9M/ 1gUpjdunD218PMmGJ94Iu1TOLICZDqFZmzkgMjAum9YCbvygP080Ta4zNk1w9TA4nAfjUuw5KXh QTDIf2Jkoa+bCcUMU+ELWTBA3LKdcR2v46R+3UiZJzQnyNH3L6cdF/Bgd6gwG1ZXg/cxlY627MH FQRY2DZ5JtKiaWoOXm86t7oe/SC64vyxxrUtwS0WucjQCG1dyDdEzSsviGUPdGBLJ4ky5cfbJDY KOZ+S66bx0GKy2DLbUHR7GYTv76zkgK/TCKOomOpaFcnK5koeXUbAPnzC0F5bDWeExiEksd9 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: Tue, 01 Jul 2025 05:01:31 -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=VzfckLAq; 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 Hi Mike, So, I've spent some time second-guessing myself about the set BUILD_DATE_EPOCH by default if not set bit. And I think I've come out happy with it in the end. But ... maybe we'd want to print the EPOCH we set as well - to simplify if someone _did_ want to reproduce that exact build. Something like: SOURCE_DATE_EPOCH not set - defaulting to 1751371108. I don't think any tools set SOURCE_DATE_EPOCH. / Leif On Mon, 30 Jun 2025 at 18:24, Kinney, Michael D wrote: > > Hi Leif, > > For the env var, I was following the pattern in the EDK II Build Specification > for all environment variables that are required by the EDK II build. > > However, since SOURCE_DATE_EPOCH appears to be standard in both Windows and > Linux development environments, we could just use that one and avoid the > build spec addition of a new env var. > > I like the idea of the build system checking to see of SOURCE_DATE_EPOCH > Is already defined and use that existing value and only set it if it is > not already defined. > > Do any other tools we use also set SOURCE_DATE_EPOCH? > > Mike > > > -----Original Message----- > > From: Leif Lindholm > > Sent: Monday, June 30, 2025 3:09 AM > > 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. > > > > On Thu, 26 Jun 2025 at 22:25, Kinney, Michael D > > wrote: > > > EmbeddedPkg/VirtualRealTimeClockLib change: > > > > > https://github.com/mdkinney/edk2/commit/51430285377e4d6298ec2b3ea9243d1c8ef > > 9fb2a > > > > Yes, this approach is defnitely what we want for the module. > > > > > BaseTools change: > > > > > https://github.com/mdkinney/edk2/commit/a596ddc61d649e52db861e0fb6613c0a473 > > 36b6e > > > > 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 (#121442): https://edk2.groups.io/g/devel/message/121442 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] -=-=-=-=-=-=-=-=-=-=-=-