On Sun, Oct 30, 2016 at 9:04 AM, Zheng, Lv <lv.zheng@xxxxxxxxx> wrote: > Hi, Andy > >> From: linux-acpi-owner@xxxxxxxxxxxxxxx [mailto:linux-acpi-owner@xxxxxxxxxxxxxxx] On Behalf Of Zheng, >> Lv >> Subject: RE: Fix in ACPICA tools broke cross compilation of tools/power/acpi >> >> Hi, >> >> > From: Andy Shevchenko [mailto:andy.shevchenko@xxxxxxxxx] >> > Subject: Re: Fix in ACPICA tools broke cross compilation of tools/power/acpi >> > >> > On Sat, Oct 29, 2016 at 3:23 AM, Zheng, Lv <lv.zheng@xxxxxxxxx> wrote: >> > > Hi, >> > > >> > > Please try this patch: >> > > https://patchwork.kernel.org/patch/9392155/ >> > > Which makes tools/power/acpi build more robust to survive toolchains that are not generated from >> the >> > current kernel header. >> > >> > >> > Better, but no, it doesn't fully fix the issue. >> > >> > DESCEND power/acpi >> > DESCEND tools/acpidbg >> > output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -D_LINUX >> > -I../../../include -I.. >> > /../../drivers/acpi/acpica -Wall -Wstrict-prototypes >> > -Wdeclaration-after-statement -O1 -g -DDEBUG -DACPI_APPLICATI >> > ON -DACPI_SINGLE_THREAD -DACPI_DEBUGGER -I. >> > -I../../../../../drivers/acpi/acpica -I../../include -c -o acpidbg.o >> > acpidbg.c >> > acpidbg.c:12:23: fatal error: acpi/acpi.h: No such file or directory >> > #include <acpi/acpi.h> >> > ^ > > How did you trigger this? I'm compiling it as a package in Buildroot environment which uses uClibc and cross compiler. > I just tried to cross compile all tools, similar failures can be seen on many other tools. > > Could you stay in the kernel srctree, and I'm afraid I can't do exactly this one. I'm using make O=/path/to/kernel/build. But I will try to look what I have there. > # cd tools > # make ARCH=your_arch CROSS_COMPILE=your_compiler-prefix acpi_clean > # make ARCH=your_arch CROSS_COMPILE=your_compiler-prefix acpi > # ls power/acpi/include/acpi > > What will be shown then? $ ls -l tools/power/acpi/ total 4 drwxr-xr-x 3 andy andy 4096 Oct 29 19:03 tools There is no include folder. > > Thanks and best regards > Lv > >> > compilation terminated. >> > <builtin>: recipe for target 'acpidbg.o' failed >> >> If you mean this line is not correct: >> + ln -s ../../../../include/acpi include/acpi >> I'll try to improve it. >> >> Thanks >> Lv >> >> > >> > >> > >> > > >> > > Thanks >> > > Lv >> > > >> > >> From: Andy Shevchenko [mailto:andy.shevchenko@xxxxxxxxx] >> > >> Subject: Fix in ACPICA tools broke cross compilation of tools/power/acpi >> > >> >> > >> Hi! >> > >> >> > >> Reverting of the commit e323c02dee59 ("ACPICA: MSVC9: Fix <sys/stat.h> >> > >> inclusion order issue") fixes the following issue: >> > >> >> > >> DESCEND power/acpi >> > >> DESCEND tools/acpidbg >> > >> output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -D_LINUX >> > >> -I../../../include -I../../../drivers/acpi/acpica -Wall >> > >> -Wstrict-prototypes -Wdeclaration-after-statement -O1 -g -DDEBUG >> > >> -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGGER -I. >> > >> -I../../../../../drivers/acpi/acpica -I../../../../../include -c -o >> > >> acpidbg.o acpidbg.c >> > >> In file included from >> > >> output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/include/asm/sigcontext.h:18:0, >> > >> from >> > >> output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/sigcontext.h:30, >> > >> from >> > >> output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/include/signal.h:335, >> > >> from ../../../../../include/acpi/platform/acenv.h:365, >> > >> from ../../../../../include/acpi/acpi.h:56, >> > >> from acpidbg.c:12: >> > >> ../../../../../include/linux/types.h:14:26: error: conflicting types >> > >> for ‘fd_set’ >> > >> typedef __kernel_fd_set fd_set; >> > >> ^ >> > >> In file included from >> > >> output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/include/sys/types.h:219:0, >> > >> from >> > >> output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/include/stdlib.h:198, >> > >> from ../../../../../include/acpi/platform/acenv.h:357, >> > >> from ../../../../../include/acpi/acpi.h:56, >> > >> from acpidbg.c:12: >> > >> output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/include/sys/select.h:77:5: >> > >> note: previous declaration of ‘fd_set’ was here >> > >> } fd_set; >> > >> ^ >> > >> In file included from >> > >> output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/include/asm/sigcontext.h:18:0, >> > >> from >> > >> output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/include/bits/sigcontext.h:30, >> > >> from >> > >> output/host/usr/i586-buildroot-linux-uclibc/sysroot/usr/include/signal.h:335, >> > >> from ../../../../../include/acpi/platform/acenv.h:365, >> > >> from ../../../../../include/acpi/acpi.h:56, >> > >> from acpidbg.c:12: >> > >> ../../../../../include/linux/types.h:15:25: error: conflicting types for ‘dev_t’ >> > >> typedef __kernel_dev_t dev_t; >> > >> >> > >> And so on... >> > >> >> > >> After revert: >> > >> >> > >> DESCEND power/acpi >> > >> DESCEND tools/acpidbg >> > >> output/host/usr/bin/i586-buildroot-linux-uclibc-gcc -D_LINUX >> > >> -I../../../include -I../../../drivers/acpi/acpica -Wall >> > >> -Wstrict-prototypes -Wdeclaration-after-statement -O1 -g -DDEBUG >> > >> -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGGER -I. >> > >> -I../../../../../drivers/acpi/acpica -I../../../../../include -c -o >> > >> acpidbg.o acpidbg.c >> > >> LD test-topic/acpidbg >> > >> /usr/bin/install -c -d output/target/usr/sbin >> > >> /usr/bin/install -c test-topic/acpidbg output/target/usr/sbin >> > >> >> > >> Any ideas how to fix this properly? >> > >> >> > >> -- >> > >> With Best Regards, >> > >> Andy Shevchenko >> > >> > >> > >> > -- >> > With Best Regards, >> > Andy Shevchenko >> ��칻 �&�~�&� ��+-��ݶ ��w��˛���m�b��Zr����^n�r���z� ��h����&�� �G���h� (�階 >> �ݢj"�� � m�����z�ޖ���f���h���~�m� -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html