Probably an unclean buildroot see comment inline

On 22.02.2014 19:55, Outback Dingo wrote:
> On Fri, Nov 29, 2013 at 5:00 AM, Dirk Neukirchen <dirkneukirc...@web.de>wrote:
> 
>> including freetype header directly leads
>> to build error:
>> util/grub-mkfont.c:42:30: fatal error: freetype/ftsynth.h: No such file or
>> directory
>> Observed on Debian Testing, because new Freetype2
>> changed include location there
>>
>> add a patch to grub - use provided #include macros documented:
>>
>> http://www.freetype.org/freetype2/docs/reference/ft2-header_file_macros.html#FT_SYNTHESIS_H
>>
>> Signed-off-by: Dirk Neukirchen <dirkneukirc...@web.de>
>> ---
>>  package/boot/grub2/Makefile                               |  1 +
>>  package/boot/grub2/patches/101-freetype2_fix_mkfont.patch | 11 +++++++++++
>>  2 files changed, 12 insertions(+)
>>  create mode 100644
>> package/boot/grub2/patches/101-freetype2_fix_mkfont.patch
>>
>> diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
>> index dd490ff..0f66354 100644
>> --- a/package/boot/grub2/Makefile
>> +++ b/package/boot/grub2/Makefile
>> @@ -18,6 +18,7 @@ PKG_MD5SUM:=e927540b6eda8b024fb0391eeaa4091c
>>
>>  HOST_BUILD_PARALLEL:=1
>>  PKG_BUILD_DEPENDS:=grub2/host
>> +PKG_FIXUP:=autoreconf
>>
>>  include $(INCLUDE_DIR)/host-build.mk
>>  include $(INCLUDE_DIR)/package.mk
>> diff --git a/package/boot/grub2/patches/101-freetype2_fix_mkfont.patch
>> b/package/boot/grub2/patches/101-freetype2_fix_mkfont.patch
>> new file mode 100644
>> index 0000000..fc9f146
>> --- /dev/null
>> +++ b/package/boot/grub2/patches/101-freetype2_fix_mkfont.patch
>> @@ -0,0 +1,11 @@
>> +--- a/util/grub-mkfont.c
>> ++++ b/util/grub-mkfont.c
>> +@@ -39,7 +39,7 @@
>> + #include FT_FREETYPE_H
>> + #include FT_TRUETYPE_TAGS_H
>> + #include FT_TRUETYPE_TABLES_H
>> +-#include <freetype/ftsynth.h>
>> ++#include FT_SYNTHESIS_H
>> +
>> + #undef __FTERRORS_H__
>> + #define FT_ERROR_START_LIST   const char *ft_errmsgs[] = {
>> --
>> 1.8.4.4
>>
>>
>>
> 
> Ive applied this path on the list to my builds but im still seeing errors
> 
> gcc -DHAVE_CONFIG_H -I.  -Wall -W -I./include -DGRUB_UTIL=1
> -DGRUB_LIBDIR=\"/home/dingo/Wireless/openwrt-alix.6f/staging_dir/host/lib/grub\"
> -DLOCALEDIR=\"/home/dingo/Wireless/openwrt-alix.6f/staging_dir/host/share/locale\"
> -DGRUB_FILE=\"util/grub-mkfont.c\" -I. -I. -I. -I. -I./include -I./include
> -I./grub-core/gnulib -I./grub-core/gnulib
>  -I/home/dingo/Wireless/openwrt-alix.6f/staging_dir/host/include
> -fno-builtin-gettext -Wall -W -Wshadow -Wold-style-definition
> -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align
> -Wchar-subscripts -Wcomment -Wdeprecated-declarations
> -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels
> -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit
> -Wimplicit-function-declaration -Wimplicit-int -Winit-self
> -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces
> -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn
> -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith
> -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow
> -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef
> -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label
> -Wunused-parameter -Wunused-value  -Wunused-variable -Wvariadic-macros
> -Wvolatile-register-var -Wwrite-strings -Wnested-externs
> -Wstrict-prototypes -Wpointer-sign -Wno-undef -Wno-sign-compare -Wno-unused
> -Wno-unused-parameter -Wno-redundant-decls -Wno-unreachable-code
> -Wno-conversion -Wno-old-style-definition -Wno-unsafe-loop-optimizations
> -I/usr/include/freetype2  -O2
> -I/home/dingo/Wireless/openwrt-alix.6f/staging_dir/host/include -MT
> util/grub_mkfont-grub-mkfont.o -MD -MP -MF
> util/.deps-util/grub_mkfont-grub-mkfont.Tpo -c -o
> util/grub_mkfont-grub-mkfont.o `test -f 'util/grub-mkfont.c' || echo
> './'`util/grub-mkfont.c
> util/grub-mkfont.c:42:30: fatal error: freetype/ftsynth.h: No such file or
> directory
>  #include <freetype/ftsynth.h>
>                               ^
> compilation terminated.
> make[6]: *** [util/grub_mkfont-grub-mkfont.o] Error 1
> make[6]: Leaving directory
> `/home/dingo/Wireless/openwrt-alix.6f/build_dir/host/grub-2.00'

The patch clearly deletes line 42. 
Yet it is not applied in your case.

Why?
grub2 has a host build (see Makefile and path in your pasted log)
The host-build files were already there when you applied the patch.
"make clean" does not delete openwrt/build_dir/host/ files

so use make dirclean or a complete make distclean before applying 


> make[5]: *** [all-recursive] Error 1
> make[5]: Leaving directory
> `/home/dingo/Wireless/openwrt-alix.6f/build_dir/host/grub-2.00'
> make[4]: *** [all] Error 2
> make[4]: Leaving directory
> `/home/dingo/Wireless/openwrt-alix.6f/build_dir/host/grub-2.00'
> make[3]: ***
> [/home/dingo/Wireless/openwrt-alix.6f/build_dir/host/grub-2.00/.built]
> Error 2
> make[3]: Leaving directory
> `/home/dingo/Wireless/openwrt-alix.6f/package/boot/grub2'
> make[2]: *** [package/boot/grub2/host/compile] Error 2
> make[2]: Leaving directory `/home/dingo/Wireless/openwrt-alix.6f'
> make[1]: ***
> [/home/dingo/Wireless/openwrt-alix.6f/staging_dir/target-i386_geode_uClibc-0.9.33.2/stamp/.package_compile]
> Error 2
> make[1]: Leaving directory `/home/dingo/Wireless/openwrt-alix.6f'
> make: *** [world] Error 2
> 
> dingo@dingo-W530:~/Wireless/openwrt-alix.6f$ ls al package/boot/grub2/
> package/boot/grub2/:
> Makefile  patches
> dingo@dingo-W530:~/Wireless/openwrt-alix.6f$ ls al
> package/boot/grub2/patches/
> package/boot/grub2/patches/:
> 100-grub_setup_root.patch  101-freetype2_fix_mkfont.patch
>  200-fix-gets-removal.patch  200-grub_musl.patch
> 
> this is building on x86 for alix 6f board
> 
> 
> 
> 
> 
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel@lists.openwrt.org
>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>
>>
> 
> 
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to