Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open input file BaseIoLibIntrinsic.lib #3

Closed
rafpodgorski opened this issue Oct 27, 2021 · 10 comments · Fixed by #16
Closed

Cannot open input file BaseIoLibIntrinsic.lib #3

rafpodgorski opened this issue Oct 27, 2021 · 10 comments · Fixed by #16

Comments

@rafpodgorski
Copy link

When I am trying to build PowerMonkey I am getting error like in title. I follow instruction from reade.me

@psyq321
Copy link
Owner

psyq321 commented Oct 27, 2021

Are you building using VisualUEFI?

If so, you will need to extend its base EDK-II library by using files from the official EDK2 distribution (TianoCore). Alex Ionescu probably selected some subset of the interfaces for whatever he was working on. It shall be fairly simple to extend.

If you still have issues, I can commit changes somewhere.

@dmiten
Copy link

dmiten commented Nov 11, 2021

It would be great to use VisualUEFI. Can you please commit the extension?

@obrobrio2000
Copy link

It would be great to use VisualUEFI. Can you please commit the extension?

+1, would be really appreciated!

@alandolt
Copy link

Also struggling with this issue, could you maybe share some hints of how we can solve it? Thank you very much.

@alandolt
Copy link

Here my solution for this problem (not really the good way, as I personally don't really know how to use Visual Studio).
So, I've added two new projects in Visual Studio. Then I've went to the folder where they were saved (EDK-II), noted the ProjectGuid and replaced the content of the first file (for the compillation of the BaseCacheMaintenanceLib) with:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <Keyword>Win32Proj</Keyword>
    <ProjectGuid>{YOUR OLD PROJECT GUID OF THE FIRST PROJECT CREATED}</ProjectGuid>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <Import Project="$(SolutionDir)\edk2.default.props" />
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
  <Import Project="$(SolutionDir)\edk2.props" />
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
  <ItemGroup>
    <ClCompile Include="$(EDK_PATH)\MdePkg\Library\BaseCacheMaintenanceLib\X86Cache.c" />
  </ItemGroup>
</Project>

and the second file (for the compillation of the BaseIoLibIntrinsic lib) with:

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <Keyword>Win32Proj</Keyword>
    <ProjectGuid>{YOUR OLD PROJECT GUID OF THE SECOND PROJECT CREATED}</ProjectGuid>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <Import Project="$(SolutionDir)\edk2.default.props" />
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <Import Project="$(SolutionDir)\MSBuild\nasm.props" />
  <Import Project="$(SolutionDir)\edk2.props" />
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <Import Project="$(SolutionDir)\MSBuild\nasm.targets" />
  <ItemGroup>
    <NASM Include="$(EDK_PATH)\MdePkg\Library\BaseIoLibIntrinsic\X64\IoFifo.nasm" />
    <NASM Include="$(EDK_PATH)\MdePkg\Library\BaseIoLibIntrinsic\X64\IoFifoSev.nasm" />
  </ItemGroup>
</Project>

After a rebuild of the Visual UEFI enviromenet, the build of powermonkey was sucessfull.
I know that this is not the ideal solution, but for me it was the fastest.
Thanks to psyq321 for providing us PowerMonkey, working without problem. Thanks for your hard work and thanks for sharing it.

@fredriklundholm
Copy link

fredriklundholm commented Feb 3, 2022

Here my solution for this problem (not really the good way, as I personally don't really know how to use Visual Studio).
So, I've added two new projects in Visual Studio. Then I've went to the folder where they were saved (EDK-II), noted the >ProjectGuid and replaced the content of the first file (for the compillation of the BaseCacheMaintenanceLib)

Thanks for the description, could you please share "what" you downloaded and the "new projects" you added to Visual Studio in a little more detail? I am in the same situation.

@protonpony
Copy link

Are you building using VisualUEFI?

If so, you will need to extend its base EDK-II library by using files from the official EDK2 distribution (TianoCore). Alex Ionescu probably selected some subset of the interfaces for whatever he was working on. It shall be fairly simple to extend.

If you still have issues, I can commit changes somewhere.

The error remains even after extending the base EDK-II library in VisualUEFI with project files pulled directly from tianocore/edk2. So, unless you get around to committing those changes, the "Visual Studio" route of building PowerMonkey should be considered defunct and thus removed from the readme. Thank-you for your diligence.

@psyq321
Copy link
Owner

psyq321 commented Feb 13, 2022

Here is a snapshot of my VisualUEFI root directory + modified EDK-II

PowerMonkey goes in /workspace subdirectory - it builds without problems. I will add an explainer of what needs to be done in the README.

Since VisualUEFI has not been updated for a good while (a shame, IMHO) it is probably a good idea to obsolete it at some point. Ideally, the alternative shall be much simpler - fully self-contained build w/o edk2. This is possible and done by some projects, but it would take some effort to implement all necessary calls, and then again it needs maintenance to keep up with whatever UEFI throws in.

VisualUEFI_root.zip

@protonpony
Copy link

Thank-you for the prompt response. Unfortunately, I still encounter build errors after dropping in your snapshot. So, I'll wait for your updated README before posting the output. I only just noticed powermonkey, but I'm impressed nonetheless. If necessary, I'll setup an edk2 build environment in a VM and go that route. Thanks for all your hard work.

@rafpodgorski
Copy link
Author

Can someone create tutorial step by step how to build it? It's very hard even for person with experience

@bin bin mentioned this issue Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants