Summary: | sys-apps/linux-misc-apps-3.18 - make: *** No rule to make target '../../../../turbostat'. Stop. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Thomas Deutschmann (RETIRED) <whissi> |
Component: | [OLD] Core system | Assignee: | Robin Johnson <robbat2> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gem, holgersson, jasiupsota, kripton, Martin.vGagern, mmokrejs, s7v7nislands, toralf, uzytkownik2, wschlich |
Priority: | Normal | Keywords: | UPSTREAM |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
turbostat build fix + usbip
Patch against linux-misc-apps-3.18 with turbostat fix + usbip |
Description
Thomas Deutschmann (RETIRED)
2014-12-29 13:59:55 UTC
Hi, I don't understand why TARGET_MAKE_SIMPLE=( ... tools/power/x86/turbostat:turbostat ... ) became TARGET_MAKE_SIMPLE=( ... tools/power/x86/turbostat:../../../../turbostat ... ) If we would revert this change, the only left problem is turbostat's Makefile: CC = $(CROSS_COMPILE)gcc BUILD_OUTPUT := $(PWD) PREFIX := /usr DESTDIR := turbostat : turbostat.c CFLAGS += -Wall CFLAGS += -DMSRHEADER='"../../../../arch/x86/include/uapi/asm/msr-index.h"' %: %.c @mkdir -p $(BUILD_OUTPUT) $(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ [...] We call make -C tools/power/x86/turbostat ARCH=x86 turbostat but the "-C" doesn't update the used $PWD variable, therefore our logic in src_install function would fail. Patch suggestion: --- linux-misc-apps-3.18.ebuild.old 2014-12-29 21:09:58.000000000 +0100 +++ linux-misc-apps-3.18.ebuild 2014-12-29 21:46:28.000000000 +0100 @@ -69,7 +69,7 @@ # These have a broken make install, no DESTDIR TARGET_MAKE_SIMPLE=( tools/firewire:nosy-dump - tools/power/x86/turbostat:../../../../turbostat + tools/power/x86/turbostat:turbostat tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy Documentation/misc-devices/mei:mei-amt-version ) @@ -135,7 +135,7 @@ for t in ${TARGET_MAKE_SIMPLE[@]} ; do dir=${t/:*} target=${t/*:} einfo "Building $dir => $target" - emake -C $dir ARCH=${karch} $target + emake -C $dir BUILD_OUTPUT=. ARCH=${karch} $target done } ...we could also patch the Makefile in src_prepare, i.e. s/BUILD_OUTPUT := $(PWD)/BUILD_OUTPUT := $(shell pwd)/ > upgrading sys-apps/linux-misc-apps from v3.6-r2 to v3.18 failed:
+1
Applying the proposed ebuild patch enables build and install for me. (In reply to Thomas D. from comment #1) > ...we could also patch the Makefile in src_prepare, i.e. > > s/BUILD_OUTPUT := $(PWD)/BUILD_OUTPUT := $(shell pwd)/ Your first suggestion appears to work well enough for me. But if there is any reason to prefer something like this second suggestion, how about using the GNU extension $(CURDIR) instead of $(PWD) or $(shell pwd)? Same problem here. @ Martin: I agree with you. $CURDIR should be used. Wasn't sure if we can "depend" on GNU make (also, many Makefiles in kernel source uses multiple variants) but according to the documentation, GNU make is a requirement. I send the patch to upstream, http://thread.gmane.org/gmane.linux.kernel/1858252 If this will be accepted I don't expect to see it before sys-apps/linux-misc-apps-3.19. @ Robin: Would be nice if you could revert the TARGET_MAKE_SIMPLE change in the ebuild, i.e. --- linux-misc-apps-3.18.ebuild.old 2014-12-29 21:09:58.000000000 +0100 +++ linux-misc-apps-3.18.ebuild 2014-12-29 21:46:28.000000000 +0100 @@ -69,7 +69,7 @@ # These have a broken make install, no DESTDIR TARGET_MAKE_SIMPLE=( tools/firewire:nosy-dump - tools/power/x86/turbostat:../../../../turbostat + tools/power/x86/turbostat:turbostat tools/power/x86/x86_energy_perf_policy:x86_energy_perf_policy Documentation/misc-devices/mei:mei-amt-version ) and apply the patch send to upstream. Thanks! *** Bug 536202 has been marked as a duplicate of this bug. *** pump! Tried with Linux 3.19, the issue is not resolved >>> Emerging (1 of 1) sys-apps/linux-misc-apps-3.19::local * linux-3.19.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /lib/modules/3.19.0-e/build * Found sources for kernel version: * 3.19.0-e >>> Unpacking source... >>> Unpacking linux-3.19.tar.xz to /var/tmp/portage/sys-apps/linux-misc-apps-3.19/work >>> Source unpacked in /var/tmp/portage/sys-apps/linux-misc-apps-3.19/work /var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19 /var/tmp/portage/sys-apps/linux-misc-apps-3.19/work /var/tmp/portage/sys-apps/linux-misc-apps-3.19/work >>> Preparing source in /var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19 ... * Building Documentation/accounting/getdelays.c => getdelays make -j2 -f /dev/null M=Documentation/accounting ARCH=x86 Documentation/accounting/getdelays cc -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed Documentation/accounting/getdelays.c -o Documentation/accounting/getdelays * Building tools/cgroup/cgroup_event_listener.c => cgroup_event_listener make -j2 -f /dev/null M=tools/cgroup ARCH=x86 tools/cgroup/cgroup_event_listener cc -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed tools/cgroup/cgroup_event_listener.c -o tools/cgroup/cgroup_event_listener * Building Documentation/laptops/dslm.c => dslm make -j2 -f /dev/null M=Documentation/laptops ARCH=x86 Documentation/laptops/dslm cc -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed Documentation/laptops/dslm.c -o Documentation/laptops/dslm * Building Documentation/laptops/freefall.c => freefall make -j2 -f /dev/null M=Documentation/laptops ARCH=x86 Documentation/laptops/freefall cc -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed Documentation/laptops/freefall.c -o Documentation/laptops/freefall * Building Documentation/networking/timestamping/timestamping.c => timestamping make -j2 -f /dev/null M=Documentation/networking/timestamping ARCH=x86 Documentation/networking/timestamping/timestamping cc -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed Documentation/networking/timestamping/timestamping.c -o Documentation/networking/timestamping/timestamping * Building Documentation/watchdog/src/watchdog-simple.c => watchdog-simple make -j2 -f /dev/null M=Documentation/watchdog/src ARCH=x86 Documentation/watchdog/src/watchdog-simple cc -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed Documentation/watchdog/src/watchdog-simple.c -o Documentation/watchdog/src/watchdog-simple * Building tools/lguest/lguest.c => lguest make -j2 -f /dev/null M=tools/lguest ARCH=x86 tools/lguest/lguest cc -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed tools/lguest/lguest.c -o tools/lguest/lguest tools/lguest/lguest.c: In function ‘map_elf’: tools/lguest/lguest.c:399:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] i, phdr[i].p_memsz, (void *)phdr[i].p_paddr); ^ tools/lguest/lguest.c:88:27: note: in definition of macro ‘verbose’ do { if (verbose) printf(args); } while(0) ^ tools/lguest/lguest.c: In function ‘blk_request’: tools/lguest/lguest.c:1660:4: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘off64_t’ [-Wformat=] errx(1, "Write past end %llu+%u", off, ret); ^ tools/lguest/lguest.c:1658:4: warning: ignoring return value of ‘ftruncate64’, declared with attribute warn_unused_result [-Wunused-result] ftruncate64(vblk->fd, vblk->len); ^ tools/lguest/lguest.c: In function ‘load_bzimage’: tools/lguest/lguest.c:431:2: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] read(fd, &boot, sizeof(boot)); ^ tools/lguest/lguest.c: In function ‘run_guest’: tools/lguest/lguest.c:1837:4: warning: ignoring return value of ‘pread’, declared with attribute warn_unused_result [-Wunused-result] pread(lguest_fd, reason, sizeof(reason)-1, cpu_id); ^ tools/lguest/lguest.c: In function ‘handle_output’: tools/lguest/lguest.c:1142:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(STDOUT_FILENO, from_guest_phys(addr), ^ * Building tools/vm/slabinfo.c => slabinfo make -j2 -f /dev/null M=tools/vm ARCH=x86 tools/vm/slabinfo cc -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed tools/vm/slabinfo.c -o tools/vm/slabinfo tools/vm/slabinfo.c: In function ‘read_slab_dir’: tools/vm/slabinfo.c:1222:4: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result] chdir(".."); ^ * Building usr/gen_init_cpio.c => gen_init_cpio make -j2 -f /dev/null M=usr ARCH=x86 usr/gen_init_cpio cc -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed usr/gen_init_cpio.c -o usr/gen_init_cpio * Building tools/firewire => nosy-dump make -j2 -C tools/firewire ARCH=x86 nosy-dump make: Entering directory '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19/tools/firewire' gcc -march=native -O2 -pipe -DVERSION=\"0.4\" -I../../drivers/firewire -c -o nosy-dump.o nosy-dump.c gcc -march=native -O2 -pipe -DVERSION=\"0.4\" -I../../drivers/firewire -c -o decode-fcp.o decode-fcp.c nosy-dump.c: In function ‘main’: nosy-dump.c:990:4: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] fread(buf, 1, length, input); ^ nosy-dump.c:994:5: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] read(STDIN_FILENO, &c, sizeof c); ^ gcc -Wl,-O1 -Wl,--as-needed nosy-dump.o decode-fcp.o -lpopt -o nosy-dump make: Leaving directory '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19/tools/firewire' * Building tools/power/x86/turbostat => ../../../../turbostat make -j2 -C tools/power/x86/turbostat ARCH=x86 ../../../../turbostat make: Entering directory '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19/tools/power/x86/turbostat' make: *** No rule to make target '../../../../turbostat'. Stop. make: Leaving directory '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19/tools/power/x86/turbostat' * ERROR: sys-apps/linux-misc-apps-3.19::local failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-apps/linux-misc-apps-3.19::local'`, * the complete build log and the output of `emerge -pqv '=sys-apps/linux-misc-apps-3.19::local'`. * The complete build log is located at '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/temp/environment'. * Working directory: '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19' * S: '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19' >>> Failed to emerge sys-apps/linux-misc-apps-3.19, Log file: >>> '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/temp/build.log' * Messages for package sys-apps/linux-misc-apps-3.19: * ERROR: sys-apps/linux-misc-apps-3.19::local failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-apps/linux-misc-apps-3.19::local'`, * the complete build log and the output of `emerge -pqv '=sys-apps/linux-misc-apps-3.19::local'`. * The complete build log is located at '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/temp/environment'. * Working directory: '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19' * S: '/var/tmp/portage/sys-apps/linux-misc-apps-3.19/work/linux-3.19' Created attachment 396438 [details, diff]
turbostat build fix + usbip
1. Turbostat build fix:
TARGET_MAKE_SIMPLE=
- tools/power/x86/turbostat:../../../../turbostat
+ tools/power/x86/turbostat:turbostat
in src_prepare()
+ sed -i -e 's/\(BUILD_OUTPUT.*:= \)$(PWD)/\1./' tools/power/x86/turbostat/Makefile
2. There is no usbip package - so fixes the rest of a patch.
(In reply to Jan Psota from comment #10) > Created attachment 396438 [details, diff] [details, diff] > turbostat build fix + usbip > > 1. Turbostat build fix: > > TARGET_MAKE_SIMPLE= > - tools/power/x86/turbostat:../../../../turbostat > + tools/power/x86/turbostat:turbostat > > in src_prepare() > + sed -i -e 's/\(BUILD_OUTPUT.*:= \)$(PWD)/\1./' > tools/power/x86/turbostat/Makefile > > 2. There is no usbip package - so fixes the rest of a patch. I tested this patch. It fixes the turbostat issue but I get a bit later: make -j2 -C tools/usb/usbip make: Entering directory '/mnt/1TB/var/tmp/portage/sys-apps/linux-misc-apps-3.18-r1/work/linux-3.18/tools/usb/usbip' make all-recursive make[1]: Entering directory '/mnt/1TB/var/tmp/portage/sys-apps/linux-misc-apps-3.18-r1/work/linux-3.18/tools/usb/usbip' Making all in libsrc make[2]: Entering directory '/mnt/1TB/var/tmp/portage/sys-apps/linux-misc-apps-3.18-r1/work/linux-3.18/tools/usb/usbip/libsrc' /bin/sh ../libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DUSBIDS_FILE='"/usr/share/misc/usb.ids"' -Wall -Werror -Wextra -std=gnu99 -O2 -pipe -maes -mpclmul -mpopcnt -mavx -march=native -c -o libusbip_la-names.lo `test -f 'names.c' || echo './'`names.c /bin/sh ../libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DUSBIDS_FILE='"/usr/share/misc/usb.ids"' -Wall -Werror -Wextra -std=gnu99 -O2 -pipe -maes -mpclmul -mpopcnt -mavx -march=native -c -o libusbip_la-usbip_host_driver.lo `test -f 'usbip_host_driver.c' || echo './'`usbip_host_driver.c libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DUSBIDS_FILE=\"/usr/share/misc/usb.ids\" -Wall -Werror -Wextra -std=gnu99 -O2 -pipe -maes -mpclmul -mpopcnt -mavx -march=native -c names.c -fPIC -DPIC -o .libs/libusbip_la-names.o libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DUSBIDS_FILE=\"/usr/share/misc/usb.ids\" -Wall -Werror -Wextra -std=gnu99 -O2 -pipe -maes -mpclmul -mpopcnt -mavx -march=native -c usbip_host_driver.c -fPIC -DPIC -o .libs/libusbip_la-usbip_host_driver.o In file included from names.c:41:0: usbip_common.h:18:25: fatal error: linux/usbip.h: No such file or directory #include <linux/usbip.h> ^ compilation terminated. Makefile:430: recipe for target 'libusbip_la-names.lo' failed make[2]: *** [libusbip_la-names.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from usbip_host_driver.c:28:0: usbip_common.h:18:25: fatal error: linux/usbip.h: No such file or directory #include <linux/usbip.h> ^ compilation terminated. Makefile:437: recipe for target 'libusbip_la-usbip_host_driver.lo' failed make[2]: *** [libusbip_la-usbip_host_driver.lo] Error 1 make[2]: Leaving directory '/mnt/1TB/var/tmp/portage/sys-apps/linux-misc-apps-3.18-r1/work/linux-3.18/tools/usb/usbip/libsrc' (In reply to Martin Mokrejš from comment #11) > (In reply to Jan Psota from comment #10) > > Created attachment 396438 [details, diff] [details, diff] [details, diff] > I tested this patch. It fixes the turbostat issue but I get a bit later: > In file included from names.c:41:0: > usbip_common.h:18:25: fatal error: linux/usbip.h: No such file or directory Strange... There is linux/usbip.h in sys-kernel/linux-headers-3.19 (in kernel sources usbip.h is in uapi/linux/ and is identical) Patched linux-misc-apps-3.18 renamed to ...-3.19 works for me, too. (In reply to Jan Psota from comment #12) > (In reply to Martin Mokrejš from comment #11) > > (In reply to Jan Psota from comment #10) > > > Created attachment 396438 [details, diff] [details, diff] [details, diff] [details, diff] > > > I tested this patch. It fixes the turbostat issue but I get a bit later: > > In file included from names.c:41:0: > > usbip_common.h:18:25: fatal error: linux/usbip.h: No such file or directory > > Strange... There is linux/usbip.h in sys-kernel/linux-headers-3.19 > (in kernel sources usbip.h is in uapi/linux/ and is identical) > > Patched linux-misc-apps-3.18 renamed to ...-3.19 works for me, too. # find /mnt/1TB/var/tmp/portage/sys-apps/ -name usbip.h /mnt/1TB/var/tmp/portage/sys-apps/linux-misc-apps-3.18-r1/work/linux-3.18/include/uapi/linux/usbip.h /mnt/1TB/var/tmp/portage/sys-apps/linux-misc-apps-3.18-r1/work/linux-3.18/tools/usb/usbip/src/usbip.h # I think the 'gcc -I path' has to reflect the correct location. $CWD was [cut]/linux-3.18/tools/usb/usbip/libsrc while the command was: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. [cut] There should be -I../../../../include/uapi if I get it right. We go it! :-) Too old sys-kernel/linux-headers-3.12 had no usbip.h "got"... still failed while using kernel-4.0.0 $ uname -sr Linux 4.0.0-gentoo Created attachment 402800 [details, diff]
Patch against linux-misc-apps-3.18 with turbostat fix + usbip
Hi,
upstream has accepted my patch. It is now available in every released kernel.
I am attaching an updated patch. For better reviewing, the patch is build against linux-misc-apps-3.18. But the resulting ebuild only works with >=linux-4.0.2.
I included the usbip addition from Jan.
I also added a patch for lguest to respect our CFLAGS.
> I included the usbip addition from Jan.
Hihi... Looks like we have net-misc/usbip (3.19 - I didn't tested it) in portage since march 17-th, so we can remove it from linux-misc-apps now :-)
Thank you for your work! :-)
Well, looks like the usbip thing should handled in an own bug. However I contacted Chí-Thanh and asked him if usbip should be integrated. @ Robin: I'd also like to convert linux-misc-apps ebuild to use linux-2 eclass. Currently the ebuild would download the full kernel source. With the linux-2 eclass we could re-use existing linux sources and patch sets from other ebuilds. (In reply to Thomas D. from comment #19) The integration of usbip into linux-misc-apps is handled in bug 395871. It would be better to restrict this bug to the build failure and not bring in any unrelated issues. Note that usbip was integrated once already, and usbip removed from the portage tree. But at some point usbip was dropped again from linux-misc-apps which is why I added it again as its own package. Fixed in 4.4 build. Handling usbip elsewhere. |