<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
span.code-keyword
        {mso-style-name:code-keyword;}
span.code-quote
        {mso-style-name:code-quote;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">While building ovmf recipe I faced one issue regarding sqlite python module. The recipe is trying to access host python packages in order to build it. On my system I had multiple puthon version installed and the one which Ovmf was picking
did not had sqlite module installed so I got this error<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">Copying $EDK_TOOLS_PATH/Conf/target.template<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> to /</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">var</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/git/Conf/target.txt<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">using prebuilt tools<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">Running edk2 build
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">for</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> OvmfPkgX64<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">Traceback (most recent call last):<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/var/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">,
line 42, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> from AutoGen.AutoGen
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> *<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/var/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/Source/Python/AutoGen/AutoGen.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">,
line 36, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> from GenFds.FdfParser
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> *<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/var/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/Source/Python/GenFds/FdfParser.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">,
line 21, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> Fd<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/var/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/Source/Python/GenFds/Fd.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">,
line 19, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> Fv<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/var/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/Source/Python/GenFds/Fv.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">,
line 24, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> AprioriSection<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/var/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/Source/Python/GenFds/AprioriSection.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">,
line 21, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> FfsFileStatement<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/var/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/Source/Python/GenFds/FfsFileStatement.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">,
line 29, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> from GuidSection
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> GuidSection<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/var/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/Source/Python/GenFds/GuidSection.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">,
line 30, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> from GenFds
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> FindExtendTool<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/var/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/Source/Python/GenFds/GenFds.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">,
line 25, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> from Workspace.WorkspaceDatabase
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> WorkspaceDatabase<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/var/mentor/sfarooq/MEL/181206_1816/myproject_uno/workspace/build/tmp/work/corei7-64-mel-linux/ovmf/git-r0/recipe-sysroot-native/usr/bin/edk2_basetools/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">,
line 18, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> sqlite3<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/usr/local/lib/python2.7/sqlite3/__init__.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">, line 24, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> from dbapi2
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> *<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> File
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#009100">"/usr/local/lib/python2.7/sqlite3/dbapi2.py"</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">, line 28, in <module><o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> from _sqlite3
</span><span style="font-size:9.0pt;font-family:"Courier New";color:#910091">import</span><span style="font-size:9.0pt;font-family:"Courier New";color:#333333"> *<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">ImportError: No module named _sqlite3<o:p></o:p></span></p>
<p class="MsoNormal" style="background:whitesmoke"><span style="font-size:9.0pt;font-family:"Courier New";color:#333333">WARNING: exit code 1 from a shell command.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I also inherited the recipe with python3native but it is still accessing host python. Can you guide me how we can modify this recipe so that it start using build system python3 packages.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Noor<o:p></o:p></p>
</div>
</body>
</html>