-
Notifications
You must be signed in to change notification settings - Fork 176
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
Build error when libfdt.h is installed in the system #73
Comments
Trying to make my own equivilent to https://source.denx.de/u-boot/u-boot/commit/e0d20dc1521e74b82dbd69be53a048847798a90a, replacing line 249 of tools/Makefile with |
Replacing it with |
It was taking too long to try to find out whatever automatic thing is causing this, so as a workaround, I tried replacing:
with
Which then results in a, finally, DIFFERENT error:
So I was going to replace that one too, until...
Hmm, yeah, I wasn't going for elegant, but this would just be a bit too unelegant to replace every single one of these. So, I will try to push on in finding an automatic solution. |
I have tried moving the -I option from line 249 to 248, to put it as early as possible. It did not seem to help. |
I have now reversed this change. |
I have now changed the section to be:
For better debugging. Interestingly enough, this changes the error output to be in colour when it was not before! The error output (without colour, since GitHub doesn't support it) is now:
I am going to try adding debug lines to see where exactly this error occurs so that I can see if the line is not being included, or if it is. |
I have now added
|
sudo apt-get purge -y --auto-remove libfdt-dev command will fix this issue. It is version related, you should not get these errors with the latest libfdt-dev package. |
For anyone facing this issue but needing libfdt-dev or dtc installed in system (like I do). Copying "fdt.h" "libfdt.h" and "libfdt_env.h" from include/ to lib/libfdt/ fixed the build errors as it was then using the local fdt headers rather than system versions. Later versions of u-boot have all of these headers included in a single folder which is why this issue doesn't occur in the later versions. |
diff --git a/tools/Makefile b/tools/Makefile HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h
|
diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c #include <../include/libfdt.h> |
and sudo apt-get remove libfdt-dev |
When trying to build u-boot, Odroid XU4 branch, I get the following log/error output:
Other people seem to have a similar issue in other repositories.
Looking at openbmc/openbmc#3274, it looks like it is an issue with libfdt.h being installed system-wide and being pulled in when it should not.
Looking at buildroot/buildroot@bf73334, it looks like someone has created a patch for it. I will try installing the patch.
The text was updated successfully, but these errors were encountered: