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 172FC941A39 for ; Thu, 26 Jun 2025 20:03:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=5PLNhg8BntiKovUxl3MPcbjQZSII0wQBqFY27isfyuw=; 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=1750968189; v=1; x=1751227388; b=rQbKsOyr5CSn7qpu9kfrXXDohHYteZDsmt3qNcsrXARjKZpavUko4u/EYbCWUWqnEPlVJPk8 gcn0jkXHoaKA62Ilm2YHoJ3una6wRgBbwA3BaXX3VJAu016E5DEOtkhZ8nrIyeLwsLdE2TNw68q A7x+ySzLotHZbumL7/3H35fFjIuy7NKyxVXUy/U8egQ91GorlRvS3ti7cUuSID9lqA2QXy5nEYY oXfqaW0dwyiUNGiroCfSfE+vHOmkPdoO4gpguLg/wBJC16/4YFZnyBaoDtIqPmxRYBQHqqipTys SpDGVDyq4Y4XarY+UU4FQ/QU8usrGM7AA7dtPq5S1d9Vg== X-Received: by 127.0.0.2 with SMTP id SSPsYY7687511xh8mA89bAf3; Thu, 26 Jun 2025 13:03:08 -0700 X-Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by mx.groups.io with SMTP id smtpd.web11.5284.1750968187945465272 for ; Thu, 26 Jun 2025 13:03:07 -0700 X-Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55QJNe2H031055 for ; Thu, 26 Jun 2025 20:03:07 GMT X-Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47esa4ws27-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 26 Jun 2025 20:03:07 +0000 (GMT) X-Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-3141f9ce4e2so2168787a91.1 for ; Thu, 26 Jun 2025 13:03:07 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCUn74MOAtHLIw1jmkxQvPCreOydu0gJw6dE4ZsNB2KskwJyY/rKpk0Glyb91zACAHGmzk1I6w==@edk2.groups.io X-Gm-Message-State: jc0i82hrk0sw9JsfBWcIC97Ax7686176AA= X-Gm-Gg: ASbGncuq8spCLeeDkA07QxlT+E1BZfwm5tzeJXoRF+n3RS7a3RXbbFhR/g9pQE7a8Ql Yak8MBzeQHUwmXU2ZzkmlVQsnu7195ClxhyqKK/cy4wyoC/dA/OeIj5Z+g9eYKBnGVweQduH96S 27n9Hg/85FHgXdHyZGlpbiwIWsV9rVOb9ffLig X-Received: by 2002:a17:90b:3803:b0:312:639:a064 with SMTP id 98e67ed59e1d1-318c92e1aa7mr355710a91.28.1750968186334; Thu, 26 Jun 2025 13:03:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQo9ur4L2VCM1S5IXTsO7qWD8WdYl1mITZzHyvnbUDQdPNIQXQiMNHa1TDi7JXVVf5mcGDc10ENHKogrhAcN8= X-Received: by 2002:a17:90b:3803:b0:312:639:a064 with SMTP id 98e67ed59e1d1-318c92e1aa7mr355683a91.28.1750968185839; Thu, 26 Jun 2025 13:03:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Leif Lindholm via groups.io" Date: Thu, 26 Jun 2025 21:02:54 +0100 X-Gm-Features: Ac12FXxFvHyVl-P-iBZRTZbfTFRbucmN9gGHbUOSCrP6C5aJdagLrSkqw9KjCNQ 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-Authority-Analysis: v=2.4 cv=eLYTjGp1 c=1 sm=1 tr=0 ts=685da77b cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=NEAV23lmAAAA:8 a=xjGz-wBMAAAA:8 a=QyXUC8HyAAAA:8 a=zd2uoN0lAAAA:8 a=yMhMjlubAAAA:8 a=PMl7Zmko7prdULGUi_kA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 a=dmbvPvuLAiAwK5y7oBu2:22 X-Proofpoint-GUID: Auz-deBfpUfEImw-_puSx7LrDqBqEubl X-Proofpoint-ORIG-GUID: Auz-deBfpUfEImw-_puSx7LrDqBqEubl X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjI2MDE3MSBTYWx0ZWRfX1sNxEKg8r6rU 4Q5vlmwGX+jvcts5rxqAP0nWFHA1w76k+QZ2map1/RAmnTq9CvNASYlhTwTLFIpe0Z3d2rosSPa MR5BB/UL3fpkiYVZPw/R3MBbKqk9eAtLRpjBag1Fw+7SbKzleFAWTHTnL/XgYovipXkBfLM6hCI pde4ow+YD8kqKEBMXgVMvPgPFkBRRYNb66GKDzyUm4nhaXhBVZH4VNCUOC/GwXv5qc07jq8fnXk 2xm3uhxowU2jxz134401MezdcnNTJNXSXLbzamt62ixKxLgm4RdzAY9McSiEOXX/zMCG5yQuJLU 06283t819e9rVtrXJbqJFOVpmXpVL94DeIaj3zLgB+kH+iooBnvqCZKxQlGnN7zcRHoOeP1VOYd X9PA1vKpWZh4ha2g8fNCQaEuNcwBn8CC1ycf1iH9Qcn0y6xKfr6vcl+6HLehZvhxfQRAw784 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: Thu, 26 Jun 2025 13:03:08 -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=rQbKsOyr; 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, 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 (#121434): https://edk2.groups.io/g/devel/message/121434 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] -=-=-=-=-=-=-=-=-=-=-=-