madmonkey1907 / hakchi

GNU General Public License v3.0
143 stars 37 forks source link

Compile errors in pop!_OS 20.04 #57

Open TheLongDefeat opened 3 years ago

TheLongDefeat commented 3 years ago

I was trying to run make to build in Pop!_OS 20.04, and I received the following error message:

make[1]: Entering directory '/home/luisrivera/Downloads/hakchi/3rdparty/mkbootimg' gcc -o mkbootimg.o -ffunction-sections -O3 -c mkbootimg.c -I. -Werror mkbootimg.c: In function ‘main’: mkbootimg.c:381:40: error: taking address of packed member of ‘struct boot_img_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 381 | kernel_data = load_file(kernel_fn, &hdr.kernel_size); | ^~~~ mkbootimg.c:391:46: error: taking address of packed member of ‘struct boot_img_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 391 | ramdisk_data = load_file(ramdisk_fn, &hdr.ramdisk_size); | ^~~~~ mkbootimg.c:399:44: error: taking address of packed member of ‘struct boot_img_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 399 | second_data = load_file(second_fn, &hdr.second_size); | ^~~~ mkbootimg.c:407:36: error: taking address of packed member of ‘struct boot_img_hdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 407 | dt_data = load_file(dt_fn, &hdr.dt_size); | ^~~~ cc1: all warnings being treated as errors make[1]: [Makefile:35: mkbootimg.o] Error 1 make[1]: Leaving directory '/home/luisrivera/Downloads/hakchi/3rdparty/mkbootimg' make: [Makefile:43: 3rdparty/mkbootimg/mkbootimg] Error 2