[Buildroot] git failing to build: zlib.h: No such file or directory

Arnout Vandecappelle arnout at mind.be
Fri Oct 15 19:23:57 UTC 2021



On 15/10/2021 18:28, William Tambe wrote:
> Hi,
> 
> I am not able to build git on BuildRoot 2021.08.1; it complains about
> not finding zlib.h despite the header existing at
> target/usr/include/zlib.h .

  Whether it's in target doesn't matter, it has to be in the staging directory, 
i.e. host/pu32-buildroot-linux-gnu/sysroot/usr/include/zlib.h

  If it's not there: can you reproduce this with a clean build?

  Also, we have no architecture called "pu32", so you must be using a fork of 
buildroot.

  To debug this further, run the failing command manually and add -v to the gcc 
command line:

cd /home/tambewilliam/Documents/buildroot-build/build/git-2.31.1/
/home/tambewilliam/Documents/buildroot-build/host/bin/pu32-elf-gcc -v -o 
fuzz-pack-idx.o -c -MF ./.depend/fuzz-pack-idx.o.d -MQ fuzz-pack-idx.o -MMD -MP 
  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0 
-static -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"x86_64\"" -DHAVE_ALLOCA_H -DNO_CURL 
-DNO_OPENSSL -DNO_GETTEXT -DNO_DEFLATE_BOUND -DSHA1_DC 
-DSHA1DC_NO_STANDARD_INCLUDES -DSHA1DC_INIT_SAFE_HASH_DEFAULT=0 
-DSHA1DC_CUSTOM_INCLUDE_SHA1_C="\"cache.h\"" 
-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C="\"git-compat-util.h\"" -DSHA256_BLK 
-lpthread -DHAVE_PATHS_H -DHAVE_STRINGS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME 
-DHAVE_CLOCK_MONOTONIC -DHAVE_GETDELIM 
'-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"'  -DSNPRINTF_RETURNS_BOGUS 
-DFREAD_READS_DIRECTORIES -DNO_STRLCPY -DSHELL_PATH='"/bin/sh"' 
-DPAGER_ENV='"LESS=FRX LV=-c"'  fuzz-pack-idx.c

This will give you a list of all the include paths that are used, so you can 
check that the one containing zlib.h is there.


  Regards,
  Arnout


More information about the buildroot mailing list