-
Notifications
You must be signed in to change notification settings - Fork 73
Fail to build sbsigntool #194
Comments
@yizhao1 any more info on the build? Distro, release etc would be useful. I compiled this on arm/x86 and couldn't reproduce it locally, this is probably coming from the gnu-efi you are using |
I built it against with latest poky source.
http://git.yoctoproject.org/cgit/cgit.cgi/poky/
Git rev: master / 281eba70c2c3beef556949980d7f81e7461ba5dd
MACHINE = genericx86-64
Host: Ubuntu 18.04 x86_64
…On 3/10/21 2:10 PM, Ilias Apalodimas wrote:
@yizhao1 <https://github.com/yizhao1> any more info on the build?
Distro, release etc would be useful. I compiled this on arm/x86 and
couldn't reproduce it locally.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#194 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJEALV7PO3Y5RWYTRVNITTLTC4ENVANCNFSM4Y5AOHVQ>.
|
@apalos If the gnu-efi is installed on the host, there is no such issue. But this is not correct, it shouldn't check host gnu-efi. |
|
@yizhao1 confirmed it, the configure.ac of the upstream sbsigntools hardcodes the search dir for gnu-efi to Let me see if I can send a patch making those configurable |
@yizhao1 can you give this a shot? Since we explicitly add the correct include directories, removing the check should be fine. index 4ffb68ffa024..34bb998a2201 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,9 +75,9 @@ for path in /lib /lib64 /usr/lib /usr/lib64 /usr/lib32 /lib/efi /lib64/efi /usr/
CRTPATH=$path
fi
done
-if test -z "$CRTPATH"; then
- AC_MSG_ERROR([cannot find the gnu-efi crt path])
-fi
+#if test -z "$CRTPATH"; then
+ #AC_MSG_ERROR([cannot find the gnu-efi crt path])
+#fi
EFI_CPPFLAGS="-I/usr/include/efi -I/usr/include/efi/$EFI_ARCH \
-DEFI_FUNCTION_WRAPPER" |
@yizhao1 even betterm can you apply the following and let me know? It seemed fine on my arm64/x86 here, but the more the merrier I guess. |
@apalos I have tested your patch but I found there seems something wrong with git.ozlabs.org, I can not pull the ccan git repo. It's not a good idea to download the source during do_configure/do_compile. The users may set BB_NO_NETWORK in their project to disable network access. We'd better to download all sources in do_fetch step. So I think the better way is keep the ccan.git.tar.bz2 and comple it in do_configure. Just like previous recipe did before. |
@yizhao1 fair enough, I can probably revert that change. |
@apalos I have tested today. It works for me now. But there is a warning against with poky latest master brach: |
nothing to add except I'm also seeing this issue, and thanks for looking at it promptly. |
@coreycothrum yea apologies for causing it in the first place. I did a clean compile on x86/arm and thought everything was 'fine'. Unfortunately both of those machines had gnu-efi installed, so I completely missed it. I'll probably be able to post a PR fixing all of them within the day |
@coreycothrum @yizhao1 can you check if |
The same commit also given me a very early parse error (from bitbake). Here I am using the head of the poky warrior branch.
If I back up meta-secure-core one commit earlier, the problem goes away. |
@salerio-gs Does the proposed PR solves your problems as well? |
Not tried but I can do shortly |
Please do, the SRC_URI changed as well on the PR. It probably fixes your poky builds as well |
Exactly the same error I'm afraid (fix branch of https://github.com/apalos/meta-secure-core.git). |
The weird this is that the SRC_URI the previous version was complaining about changed from Can you do a bitbake -c cleanall sbsigntool before rebuilding? (and make sure your SRC_URI is correct) |
I understand the issue now. As I noted I use the meta-intel layer. It turns out that this layer has its own sbsigntool-native recipe (https://git.yoctoproject.org/cgit/cgit.cgi/meta-intel/tree/recipes-support/sbsigntool/sbsigntool-native_git.bb?h=warrior) and the error is being cause by you having changed the SRC_URI from that in the meta-intel recipe (I think) which causes bitbake to get very confused. If I BBMASK your modified recipe my build works again. Not sure of the final solution here, but if the build uses meta-intel BSP layer then this will occur. I was wrong, the above explanation is incorrect. I found a sbsigntool.bbappend in my own layer (which I had totally forgot about). |
Ok no worries. The intel recipe you pasted fixes the ccan problem though, so I'll update that as well |
I just forced pushed the changes with ccan being static as well |
@apalos I should get a chance to try this out tomorrow. I'm not sure if it's an issue, but the inheritance of the native class seems a little outside of best practices. We've now got both Does that make sense for this recipe? I don't see any reason to change that aspect from what it was before. |
The previous binary was not running on anything but x86 anyway. So I don't think the non-native build made too much sense to begin with. |
Working for me |
It works well with latest git rev. Thanks. |
The commit fa5550d introduced a do_configure error:
| configure: error: cannot find the gnu-efi crt path
The text was updated successfully, but these errors were encountered: