Bug 969955

Summary: Fedora doesn't install libfdt_env.h
Product: [Fedora] Fedora Reporter: Paolo Bonzini <pbonzini>
Component: dtcAssignee: Arnd Bergmann <arnd>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: arnd, crobinso, jwboyer, pbonzini
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dtc-1.3.0-6.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-12 16:39:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paolo Bonzini 2013-06-03 07:26:42 UTC
This patch:

http://git.jdl.com/gitweb/?p=dtc.git;a=commitdiff;h=8716901d2215a314504b7df6282aedfcf89da1ea

modified libfdt to install libfdt_env.h.  Other distros already do so.  Please make the same change to the Fedora package.

(libfdt_env.h is customizable, but the default version should be good enough for userspace applications and is meant to be placed in /usr/include).

Comment 1 Josh Boyer 2013-06-03 12:33:30 UTC
Fixed.  libfdt_env.h is included in the libfdt-devel subpackage with 1.3.0-7.

Comment 2 Paolo Bonzini 2013-06-04 09:40:36 UTC
Josh,

thanks for updating dtc!  I backported that single patch to the el6 branch (commit 602419e4).  Any chance of having that in f19 too?

Comment 3 Fedora Update System 2013-06-04 10:10:06 UTC
dtc-1.3.0-6.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/dtc-1.3.0-6.el6

Comment 4 Josh Boyer 2013-06-04 13:10:41 UTC
(In reply to Paolo Bonzini from comment #2)
> Josh,
> 
> thanks for updating dtc!  I backported that single patch to the el6 branch
> (commit 602419e4).  Any chance of having that in f19 too?

Yes.  I'll build and submit an update later today.

Comment 5 Fedora Update System 2013-06-04 13:21:28 UTC
dtc-1.3.0-7.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/dtc-1.3.0-7.fc19

Comment 6 Cole Robinson 2013-06-11 20:32:33 UTC
So with this update I can't get qemu.git to build. Bunch of errors like:

In file included from /usr/include/libfdt.h:55:0,
                 from /home/crobinso/src/qemu/device_tree.c:28:
/usr/include/fdt.h:58:2: error: unknown type name ‘fdt32_t’
  fdt32_t magic;    /* magic word FDT_MAGIC */
  ^
/usr/include/fdt.h:59:2: error: unknown type name ‘fdt32_t’
  fdt32_t totalsize;   /* total size of DT block */


Paolo, do you know what's going on? I assume this bz was motivated by something qemu related.

Comment 7 Cole Robinson 2013-06-11 21:28:29 UTC
Here's a full build log:

http://kojipkgs.fedoraproject.org//work/tasks/3832/5493832/build.log

Reopening, though maybe this is just a qemu issue.

Comment 8 Josh Boyer 2013-06-12 13:31:26 UTC
The types it's complaining about are clearly defined in libfdt_env.h from libfdt-devel:

typedef uint16_t __bitwise fdt16_t;
typedef uint32_t __bitwise fdt32_t;
typedef uint64_t __bitwise fdt64_t;

/usr/include/libfdt.h includes libfdt_env.h before it includes fdt.h:

#include <libfdt_env.h>
#include <fdt.h>


I noticed qemu-1.5.0 seems to include it's own copy of dtc.  Then I looked in the include/ directory and saw that it also has it's own copy of libfdt_env.h.  That copy is stale and doesn't have the above defines.

I'm guessing because of all the crazy -I switches being passed, the compiler is picking up qemu-1.5.0/include/libfdt_env.h and not the one provided by libfdt-devel.  If you add a patch to qemu to delete that file, does it build?

Comment 9 Josh Boyer 2013-06-12 14:11:16 UTC
(In reply to Josh Boyer from comment #8)
> The types it's complaining about are clearly defined in libfdt_env.h from
> libfdt-devel:
> 
> typedef uint16_t __bitwise fdt16_t;
> typedef uint32_t __bitwise fdt32_t;
> typedef uint64_t __bitwise fdt64_t;
> 
> /usr/include/libfdt.h includes libfdt_env.h before it includes fdt.h:
> 
> #include <libfdt_env.h>
> #include <fdt.h>
> 
> 
> I noticed qemu-1.5.0 seems to include it's own copy of dtc.  Then I looked
> in the include/ directory and saw that it also has it's own copy of
> libfdt_env.h.  That copy is stale and doesn't have the above defines.
> 
> I'm guessing because of all the crazy -I switches being passed, the compiler
> is picking up qemu-1.5.0/include/libfdt_env.h and not the one provided by
> libfdt-devel.  If you add a patch to qemu to delete that file, does it build?

I answered my own question.  The answer seems to be yes:

http://koji.fedoraproject.org/koji/taskinfo?taskID=5495943

Comment 10 Cole Robinson 2013-06-12 16:39:29 UTC
Thanks Josh, reclosing.

Comment 11 Fedora Update System 2013-06-15 03:13:04 UTC
dtc-1.3.0-8.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2013-06-21 19:38:13 UTC
dtc-1.3.0-6.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.