Date
1 - 5 of 5
Magic/File problems
Jeff Mitchell <jmitchell@...>
On my host system I have the "file" utility version 5.05. The version in poky/in my build directories is version 5.04. I'm seeing a lot of builds fail with the following:
| error: magic_load(ms, /usr/share/misc/magic) failed: File 5.4 supports only version 7 magic files. `/usr/share/misc/magic.mgc' is version 8
Note that the version there is 5.4; this doesn't match anything as far as I can tell.
Any ideas?
Thanks,
Jeff
| error: magic_load(ms, /usr/share/misc/magic) failed: File 5.4 supports only version 7 magic files. `/usr/share/misc/magic.mgc' is version 8
Note that the version there is 5.4; this doesn't match anything as far as I can tell.
Any ideas?
Thanks,
Jeff
Saul Wold <sgw@...>
On 08/01/2011 10:55 AM, Jeff Mitchell wrote:
Which version of poky are you working with? There was a problem that we had with file at one point and thought was fixed. If you check in your
tmp/sysroots directory for the host machine, do you have a file.real?
We needed to create a cover script which correctly pointed file to the right magic.mgc file.
Hope that helped.
Sau!
On my host system I have the "file" utility version 5.05. The version inJeff,
poky/in my build directories is version 5.04. I'm seeing a lot of builds
fail with the following:
| error: magic_load(ms, /usr/share/misc/magic) failed: File 5.4 supports
only version 7 magic files. `/usr/share/misc/magic.mgc' is version 8
Note that the version there is 5.4; this doesn't match anything as far
as I can tell.
Any ideas?
Which version of poky are you working with? There was a problem that we had with file at one point and thought was fixed. If you check in your
tmp/sysroots directory for the host machine, do you have a file.real?
We needed to create a cover script which correctly pointed file to the right magic.mgc file.
Hope that helped.
Sau!
Thanks,
Jeff
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto
Jeff Mitchell <jmitchell@...>
Hi there,
On 08/01/2011 06:18 PM, Saul Wold wrote:
Thanks,
Jeff
On 08/01/2011 06:18 PM, Saul Wold wrote:
Which version of poky are you working with?Git master as of that point. Revision 46cf540e63a848512617b20fd8492f81bfb2f704
There was a problem that weI do have a tmp/sysroots/x86_64-linux/usr/bin/file.real -- although I'm building for BeagleBoard, and don't have one in that directory.
had with file at one point and thought was fixed. If you check in your
tmp/sysroots directory for the host machine, do you have a file.real?
Thanks,
Jeff
jani.uusi-rantala@...
I was experiencing same issue today with latest Yocto master ca394457c5d7b2cb4544de7ce2d29008ec6173ae (in Fedora R15):
| error: magic_load(ms, /usr/share/misc/magic) failed: File 5.4 supports only version 7 magic files. `/usr/share/misc/magic.mgc' is version 8
| rpmbuild.real: rpmfc.c:1154: rpmfcClassify: Assertion `mg != ((void *)0)' failed.
This seems to be a problem with rpmbuild using the wrong magic file from rpmfcClassify. This kind of simple fix in package_rpm.class appears to work:
Defines _rpmfc_magic_path variable:
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index ddbfc09..3f00857 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -822,6 +822,8 @@ python do_package_rpm () {
targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
+ magicfile = bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d)
+
bb.mkdirhier(pkgwritedir)
os.chmod(pkgwritedir, 0755)
@@ -834,7 +836,7 @@ python do_package_rpm () {
cmd = cmd + " --define '__find_provides " + outprovides + "'"
cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
cmd = cmd + " --define 'debug_package %{nil}'"
+ cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
cmd = cmd + " -bb " + outspecfile
- Jani
| error: magic_load(ms, /usr/share/misc/magic) failed: File 5.4 supports only version 7 magic files. `/usr/share/misc/magic.mgc' is version 8
| rpmbuild.real: rpmfc.c:1154: rpmfcClassify: Assertion `mg != ((void *)0)' failed.
This seems to be a problem with rpmbuild using the wrong magic file from rpmfcClassify. This kind of simple fix in package_rpm.class appears to work:
Defines _rpmfc_magic_path variable:
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index ddbfc09..3f00857 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -822,6 +822,8 @@ python do_package_rpm () {
targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
+ magicfile = bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d)
+
bb.mkdirhier(pkgwritedir)
os.chmod(pkgwritedir, 0755)
@@ -834,7 +836,7 @@ python do_package_rpm () {
cmd = cmd + " --define '__find_provides " + outprovides + "'"
cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
cmd = cmd + " --define 'debug_package %{nil}'"
+ cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
cmd = cmd + " -bb " + outspecfile
- Jani
Saul Wold <sgw@...>
Jani,
This patch looks good, can you please do a proper git patch with a Signed-off-by: line.
For details please refer to
http://wiki.openembedded.org/index.php/Commit_Patch_Message_Guidelines
The patch should be sent to: openembedded-core@...
Thanks for this fix, it will fix a Yocto bug
http://bugzilla.pokylinux.org/show_bug.cgi?id=1358
So please include [YOCTO #1358] in your git commit message.
Thanks again
Sau!
toggle quoted message
Show quoted text
This patch looks good, can you please do a proper git patch with a Signed-off-by: line.
For details please refer to
http://wiki.openembedded.org/index.php/Commit_Patch_Message_Guidelines
The patch should be sent to: openembedded-core@...
Thanks for this fix, it will fix a Yocto bug
http://bugzilla.pokylinux.org/show_bug.cgi?id=1358
So please include [YOCTO #1358] in your git commit message.
Thanks again
Sau!
On 08/09/2011 08:57 AM, jani.uusi-rantala@... wrote:
I was experiencing same issue today with latest Yocto master
ca394457c5d7b2cb4544de7ce2d29008ec6173ae (in Fedora R15):
| error: magic_load(ms, /usr/share/misc/magic) failed: File 5.4 supports
only version 7 magic files. `/usr/share/misc/magic.mgc' is version 8
| rpmbuild.real: rpmfc.c:1154: rpmfcClassify: Assertion `mg != ((void
*)0)' failed.
This seems to be a problem with rpmbuild using the wrong magic file from
rpmfcClassify. This kind of simple fix in package_rpm.class appears to work:
Defines _rpmfc_magic_path variable:
diff --git a/meta/classes/package_rpm.bbclass
b/meta/classes/package_rpm.bbclass
index ddbfc09..3f00857 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -822,6 +822,8 @@ python do_package_rpm () {
targetvendor = bb.data.getVar('TARGET_VENDOR', d, True)
pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
+ magicfile =
bb.data.expand('${STAGING_DIR_NATIVE}/usr/share/misc/magic.mgc', d)
+
bb.mkdirhier(pkgwritedir)
os.chmod(pkgwritedir, 0755)
@@ -834,7 +836,7 @@ python do_package_rpm () {
cmd = cmd + " --define '__find_provides " + outprovides + "'"
cmd = cmd + " --define '_unpackaged_files_terminate_build 0'"
cmd = cmd + " --define 'debug_package %{nil}'"
+ cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
cmd = cmd + " -bb " + outspecfile
- Jani
_______________________________________________
yocto mailing list
yocto@...
https://lists.yoctoproject.org/listinfo/yocto