"make xconfig" fails with "No rule to make target …/qconf-moc.cc …"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$ make O=~/repos/build/linux/ xconfig V=1

make -f linux/scripts/Makefile.build obj=scripts/kconfig xconfig
# HOSTCXX scripts/kconfig/qconf.o
  g++ -Wp,-MMD,scripts/kconfig/.qconf.o.d -Wall -O2    -std=c++11 -fPIC -I/usr/include/qt6/QtCore -I/usr/include/qt6 -DQT_CORE_LIB -I/usr/lib64/qt6/mkspecs/linux-g++ -I/usr/include/qt6/QtGui -DQT_GUI_LIB -I/usr/include/qt6/QtWidgets -DQT_WIDGETS_LIB -std=c++17 -I ./scripts/kconfig -c -o scripts/kconfig/qconf.o linux/scripts/kconfig/qconf.cc
make[3]: *** No rule to make target 'linux/scripts/kconfig/qconf-moc.cc', needed by 'scripts/kconfig/qconf-moc.o'.  Stop.

The culprit seems to be 0e912c03208075b95ea726076bf1b45db8419bc2. If I revert 
this like the following I'm able to do "make xconfig" again:

--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -198,22 +198,22 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)): | $(obj)/mconf-cflags
 
 # qconf: Used for the xconfig target based on Qt
 hostprogs      += qconf
-qconf-cxxobjs  := qconf.o qconf-moc.o
+qconf-cxxobjs  := qconf.o
 qconf-objs     := images.o $(common-objs)
 
 HOSTLDLIBS_qconf         = $(call read-file, $(obj)/qconf-libs)
 HOSTCXXFLAGS_qconf.o     = -std=c++11 -fPIC $(call read-file, $(obj)/qconf-cflags)
-HOSTCXXFLAGS_qconf-moc.o = -std=c++11 -fPIC $(call read-file, $(obj)/qconf-cflags)
 $(obj)/qconf: | $(obj)/qconf-libs
-$(obj)/qconf.o $(obj)/qconf-moc.o: | $(obj)/qconf-cflags
+$(obj)/qconf.o: | $(obj)/qconf-cflags
+$(obj)/qconf.o: $(obj)/qconf.moc
 
 quiet_cmd_moc = MOC     $@
-      cmd_moc = $(call read-file, $(obj)/qconf-bin)/moc $< -o $@
+      cmd_moc = $(call read-file, $(obj)/qconf-bin)/moc -i $< -o $@
 
-$(obj)/qconf-moc.cc: $(src)/qconf.h FORCE | $(obj)/qconf-bin
+$(obj)/%.moc: $(src)/%.h FORCE | $(obj)/qconf-bin
        $(call if_changed,moc)
 
-targets += qconf-moc.cc
+targets += qconf.moc
 
 # gconf: Used for the gconfig target based on GTK+
 hostprogs      += gconf
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index c6c42c0f4e5d..283b427f4321 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -25,6 +25,7 @@
 #include "lkc.h"
 #include "qconf.h"
 
+#include "qconf.moc"
 #include "images.h"
 

I don't think this is the proper solution, but at least it works. I hope you 
find a better way to fix this.

Regards,

Eike
-- 
Rolf Eike Beer

emlix GmbH
Headquarters: Berliner Str. 12, 37073 Göttingen, Germany
Phone +49 (0)551 30664-0, e-mail info@xxxxxxxxx
District Court of Göttingen, Registry Number HR B 3160
Managing Directors: Heike Jordan, Dr. Uwe Kracke
VAT ID No. DE 205 198 055
Office Berlin: Panoramastr. 1, 10178 Berlin, Germany
Office Bonn: Bachstr. 6, 53115 Bonn, Germany
http://www.emlix.com

emlix - your embedded Linux partner

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux