> On Mar 16, 2016, at 7:18 PM, Zeng, Star <[email protected]> wrote:
> 
> On 2016/3/17 10:02, Andrew Fish wrote:
>> 
>>> On Mar 16, 2016, at 6:59 PM, Zeng, Star <[email protected]> wrote:
>>> 
>>> On 2016/3/17 7:12, Andrew Fish wrote:
>>>> I was trying to move over to DxeDebugPrintErrorLevelLib, but I can't get 
>>>> it to build
>>>> 
>>>> For example I made DXE use 
>>>> DebugPrintErrorLevelLib|MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf
>>>>  in the EmulatorPkg and I get this error:
>>>> 
>>>> /Users/andrewfish/work/src/edk2/EmulatorPkg/EmulatorPkg.dsc(...): error 
>>>> F002: Library 
>>>> [/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf]
>>>>  with constructors has a cycle
>>>>            consumed by 
>>>> /Users/andrewfish/work/src/edk2/MdePkg/Library/UefiLib/UefiLib.inf
>>>> 
>>>> The error message is not very helpful on root causing the issue....
>>>> 
>>>> But a circular constructor issue does not seem that strange in the 
>>>> DebugLib stack as everything uses that! If I go into 
>>>> DxeDebugPrintErrorLevelLib.inf  and remove the HobLib I don't get the 
>>>> Constructor error, but I do get a link error.
>>>> 
>>>> So it looks like the DxeDebugPrintErrorLevelLib depends on the Hob lib 
>>>> that depends on the DebugLib that depends on the 
>>>> DxeDebugPrintErrorLevelLib. How did this every work? The only place I see 
>>>> it used is the Nt32Pkg, and I don't have a system to test that on????
>>> 
>>> Just tried NT32 with VS2015, and it builds and works well.
>>> 
>>> Liming & Yonghong, any idea on this?
>>> 
>> 
>> I was wondering if it had to do with the lower level libraries having a 
>> constructor? So maybe library implementation matters?
> 
> If this circular constructor issue could be reproduced with only one module 
> linked with DxeDebugPrintErrorLevelLib (I mean other modules to link with 
> BaseDebugPrintErrorLevelLib, only the module links to 
> DxeDebugPrintErrorLevelLib), then that may be helpful to scrub all the 
> library instances the module links to find out what is the matter. :)
> 

OK in the EmulatorPkg the DXE Core compiles, but 
MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 will error out.

Library
------------------------------------------------------------------------------------------------------------------------
/Users/andrewfish/work/src/edk2/MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
{PcdLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BaseLib/BaseLib.inf
{BaseLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
{BaseMemoryLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/DxeCoreEntryPoint/DxeCoreEntryPoint.inf
{DxeCoreEntryPoint}
/Users/andrewfish/work/src/edk2/MdePkg/Library/DxeCoreHobLib/DxeCoreHobLib.inf
{HobLib}
/Users/andrewfish/work/src/edk2/MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf
{DebugPrintErrorLevelLib:  C = DxeDebugPrintErrorLevelLibConstructor D = 
DxeDebugPrintErrorLevelLibDestructor}
/Users/andrewfish/work/src/edk2/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.inf
{SerialPortLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf
{PrintLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
{DebugLib:  C = BaseDebugLibSerialPortConstructor}
/Users/andrewfish/work/src/edk2/EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.inf
{EmuThunkLib:  C = DxeEmuLibConstructor}
/Users/andrewfish/work/src/edk2/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationLib.inf
{MemoryAllocationLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
{UefiBootServicesTableLib:  C = UefiBootServicesTableLibConstructor}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
{UefiRuntimeServicesTableLib:  C = UefiRuntimeServicesTableLibConstructor}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
{DevicePathLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/DxeExtractGuidedSectionLib/DxeExtractGuidedSectionLib.inf
{ExtractGuidedSectionLib:  C = DxeExtractGuidedSectionLibConstructor}
/Users/andrewfish/work/src/edk2/EmulatorPkg/Library/DxeEmuPeCoffExtraActionLib/DxeEmuPeCoffExtraActionLib.inf
{PeCoffExtraActionLib:  C = DxeEmuPeCoffLibExtraActionConstructor}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiLib/UefiLib.inf
{UefiLib:  C = UefiLibConstructor}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.inf
{CacheMaintenanceLib}
/Users/andrewfish/work/src/edk2/IntelFrameworkModulePkg/Library/BaseUefiTianoCustomDecompressLib
/BaseUefiTianoCustomDecompressLib.inf
{UefiDecompressLib:  C = TianoDecompressLibConstructor}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
{PerformanceLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
{PeCoffLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
{PeCoffGetEntryPointLib}
/Users/andrewfish/work/src/edk2/MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
{ReportStatusCodeLib}
/Users/andrewfish/work/src/edk2/EmulatorPkg/Library/DxeCoreTimerLib/DxeCoreTimerLib.inf
{TimerLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
{DxeServicesLib}
/Users/andrewfish/work/src/edk2/MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
{DebugAgentLib}
/Users/andrewfish/work/src/edk2/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
{CpuExceptionHandlerLib}
/Users/andrewfish/work/src/edk2/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf
{NULL:  C = DxeCrc32GuidedSectionExtractLibConstructor}
/Users/andrewfish/work/src/edk2/IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
{NULL:  C = LzmaDecompressLibConstructor}
<---------------------------------------------------------------------------------------------------------------------->

 
MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
 

Library
------------------------------------------------------------------------------------------------------------------------
/Users/andrewfish/work/src/edk2/MdePkg/Library/BaseLib/BaseLib.inf
{BaseLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
{BaseMemoryLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/DxePcdLib/DxePcdLib.inf
{PcdLib:  Depex = gEfiPcdProtocolGuid }
/Users/andrewfish/work/src/edk2/MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
{DebugPrintErrorLevelLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf
{PrintLib}
/Users/andrewfish/work/src/edk2/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.inf
{SerialPortLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
{DebugLib:  C = BaseDebugLibSerialPortConstructor}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
{MemoryAllocationLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
{UefiRuntimeServicesTableLib:  C = UefiRuntimeServicesTableLibConstructor}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
{DevicePathLib}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
{UefiBootServicesTableLib:  C = UefiBootServicesTableLibConstructor}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiLib/UefiLib.inf
{UefiLib:  C = UefiLibConstructor}
/Users/andrewfish/work/src/edk2/MdePkg/Library/DxeHobLib/DxeHobLib.inf
{HobLib:  C = HobLibConstructor}
/Users/andrewfish/work/src/edk2/EmulatorPkg/Library/DxeEmuLib/DxeEmuLib.inf
{EmuThunkLib:  C = DxeEmuLibConstructor}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
{UefiRuntimeLib:  C = RuntimeDriverLibConstruct D = RuntimeDriverLibDeconstruct}
/Users/andrewfish/work/src/edk2/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
{UefiDriverEntryPoint}
/Users/andrewfish/work/src/edk2/MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
{ReportStatusCodeLib}
<---------------------------------------------------------------------------------------------------------------------->

It looks like a HOB lib with the constructor is what triggers the issue?

Thanks,

Andrew Fish

> Thanks,
> Star
>> 
>> Thanks,
>> 
>> Andrew Fish
>> 
>>> Thanks,
>>> Star
>>>> 
>>>> Any ideas?
>>>> 
>>>> Thanks,
>>>> 
>>>> Andrew Fish
>>>> 
>>> 
>>> _______________________________________________
>>> edk2-devel mailing list
>>> [email protected]
>>> https://lists.01.org/mailman/listinfo/edk2-devel
> 

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to