x11-misc/xsensors-0.60 doesn't build with lm_sensors-3 (masked) but lm_sensors home page has a patch that applies cleanly http://jdelvare.pck.nerim.net/sensors/xsensors-0.60-libsensors-3.patch Reproducible: Always Steps to Reproduce: 1. emerge =sys-apps/lm_sensors-3 2. emerge =x11-misc/xsensors-0.60 3. Actual Results: lots of build errors like: chips.c: In function 'add_node': chips.c:1614: error: 'SENSORS_ADM1021_PREFIX' undeclared (first use in this function) chips.c:1615: error: 'SENSORS_ADM1023_PREFIX' undeclared (first use in this function) chips.c:1616: error: 'SENSORS_LM84_PREFIX' undeclared (first use in this function) chips.c:1617: error: 'SENSORS_GL523_PREFIX' undeclared (first use in this function) chips.c:1618: error: 'SENSORS_THMC10_PREFIX' undeclared (first use in this function) chips.c:1620: error: 'SENSORS_EEPROM_PREFIX' undeclared (first use in this function) chips.c:1622: error: 'SENSORS_F71805F_PREFIX' undeclared (first use in this function) chips.c:1624: error: 'SENSORS_IT87_PREFIX' undeclared (first use in this function) chips.c:1626: error: 'SENSORS_IT8712_PREFIX' undeclared (first use in this function) chips.c:1628: error: 'SENSORS_LM75_PREFIX' undeclared (first use in this function) chips.c:1630: error: 'SENSORS_LM78_PREFIX' undeclared (first use in this function) chips.c:1632: error: 'SENSORS_LM78J_PREFIX' undeclared (first use in this function) chips.c:1634: error: 'SENSORS_LM79_PREFIX' undeclared (first use in this function) chips.c:1636: error: 'SENSORS_LM80_PREFIX' undeclared (first use in this function) chips.c:1638: error: 'SENSORS_LM85_PREFIX' undeclared (first use in this function) chips.c:1639: error: 'SENSORS_LM85B_PREFIX' undeclared (first use in this function) chips.c:1640: error: 'SENSORS_LM85C_PREFIX' undeclared (first use in this function) chips.c:1641: error: 'SENSORS_ADM1027_PREFIX' undeclared (first use in this function) chips.c:1642: error: 'SENSORS_ADT7463_PREFIX' undeclared (first use in this function) chips.c:1643: error: 'SENSORS_EMC6D100_PREFIX' undeclared (first use in this function) chips.c:1645: error: 'SENSORS_LM87_PREFIX' undeclared (first use in this function) chips.c:1647: error: 'SENSORS_LM90_PREFIX' undeclared (first use in this function) chips.c:1648: error: 'SENSORS_ADM1032_PREFIX' undeclared (first use in this function) chips.c:1650: error: 'SENSORS_MAX1617_PREFIX' undeclared (first use in this function) chips.c:1651: error: 'SENSORS_MC1066_PREFIX' undeclared (first use in this function) chips.c:1653: error: 'SENSORS_MAX1617A_PREFIX' undeclared (first use in this function) chips.c:1655: error: 'SENSORS_SMSC47B397_PREFIX' undeclared (first use in this function) chips.c:1657: error: 'SENSORS_SMSC47M1_PREFIX' undeclared (first use in this function) chips.c:1659: error: 'SENSORS_SMSC47M192_PREFIX' undeclared (first use in this function) chips.c:1661: error: 'SENSORS_VIA686A_PREFIX' undeclared (first use in this function) chips.c:1663: error: 'SENSORS_W83781D_PREFIX' undeclared (first use in this function) chips.c:1665: error: 'SENSORS_W83782D_PREFIX' undeclared (first use in this function) chips.c:1666: error: 'SENSORS_W83627HF_PREFIX' undeclared (first use in this function) chips.c:1667: error: 'SENSORS_W83627THF_PREFIX' undeclared (first use in this function) chips.c:1668: error: 'SENSORS_W83791D_PREFIX' undeclared (first use in this function) chips.c:1670: error: 'SENSORS_W83627EHF_PREFIX' undeclared (first use in this function) chips.c:1672: error: 'SENSORS_W83783S_PREFIX' undeclared (first use in this function) chips.c:1673: error: 'SENSORS_W83697HF_PREFIX' undeclared (first use in this function) chips.c:1675: error: 'SENSORS_AS99127F_PREFIX' undeclared (first use in this function) chips.c:1677: error: 'SENSORS_K8TEMP_PREFIX' undeclared (first use in this function) make[2]: *** [chips.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/x11-misc/xsensors-0.60/work/xsensors-0.60/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/x11-misc/xsensors-0.60/work/xsensors-0.60' make: *** [all] Error 2 Expected Results: success patch found on: http://www.lm-sensors.org/wiki/Download ebuild worked after trivially adding epatch command. I don't know if this breaks compatibility with lm_sensors-2, if so, either slot it or use a USE flag.
With this patch xsensors does not build against lm_sensors-2, so maybe add a masked -r2 that goes hand in hand with lm_sensors-3? But that I guess really is a question for desktop-misc as those are the maintainers for xsensors. So why was this assigned to mobile herd in the first place?
Everything that mentions lm_sensors is initially assigned to mobile. Look up the various bugzilla entries. It is either a bad regexp rule or a misbehaving person not much brighter than a finite state automaton.
The patch could be modified to take both versions into account, probably not worth the time though. I suspect desktop-misc will just want to drop an -r1 and make each DEPEND on the =sys-apps/lm_sensors-{2,3}* version it requires.
>=sys-apps/lm_sensors-3 has been removed from package.mask. It is (past) time to move on. This package is the only remaining "doesn't build against lm_sensors-3" bug open in bugzilla.
This bug's description includes an incomplete clipping from the build. A more complete clipping: i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -DG_LOG_DOMAIN=\"GnomeCPUInfoApplet\" -DGNOMELOCALEDIR=\""/usr//locale"\" -DDATADIR=\""/usr/share/pixmaps/xsensors"\" -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -ansi -Wall -Wmissing-prototypes -Wmissing-declarations -Werror -march=pentium3 -O3 -pipe -fomit-frame-pointer -MT gui.o -MD -MP -MF .deps/gui.Tpo -c -o gui.o gui.c In file included from gui.c:21: main.h:28:27: error: sensors/chips.h: No such file or directory In file included from main.c:22: main.h:28:27: error: sensors/chips.h: No such file or directory gui.c: In function 'expose_event_callback': gui.c:316: error: 'SENSORS_EEPROM_TYPE' undeclared (first use in this function) gui.c:316: error: (Each undeclared identifier is reported only once gui.c:316: error: for each function it appears in.) cc1: warnings being treated as errors From what I can see, =sys-apps/lm_sensors-3.0.3 fails to install *all* of it's header files. # ls /var/tmp/portage/sys-apps/lm_sensors-3.0.3/work/lm_sensors-3.0.3/prog/sensors/ Module.mk chips.c chips.h main.c main.h sensors.1 # qfile lm_sensors |grep ".h" (shows chips.h is missing... which is required by xsensors to build properly.)
I got a little further just copying over the chips.h file over to /usr/include/sensors/. cp /var/tmp/portage/sys-apps/lm_sensors-3.0.3/work/lm_sensors-3.0.3/prog/sensors/chips.h /usr/include/sensors/ i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -DG_LOG_DOMAIN=\"GnomeCPUInfoApplet\" -DGNOMELOCALEDIR=\""/usr//locale"\" -DDATADIR=\""/usr/share/pixmaps/xsensors"\" -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -ansi -Wall -Wmissing-prototypes -Wmissing-declarations -Werror -march=pentium3 -O3 -pipe -fomit-frame-pointer -MT gui.o -MD -MP -MF .deps/gui.Tpo -c -o gui.o gui.c distcc[10376] ERROR: compile (null) on localhost failed distcc[10374] ERROR: compile (null) on localhost failed In file included from main.h:28, from gui.c:21: /usr/include/sensors/chips.h:25:25: error: lib/sensors.h: No such file or directory Doing the same for lib/sensors.h # cp /var/tmp/portage/sys-apps/lm_sensors-3.0.3/work/lm_sensors-3.0.3/lib/sensors.h /usr/lib/ I now have a completed compiled and install of xsensors. This looks like an upstream bug for lm_sensors-3.0.3 Makefile!?!? I then got another error concerning lib/sensors.h not found via chips.h. Chips.h points to the file being in /usr/include/lib/sensors.h. Now, in my experience, this is way off. But again, I hack on by manually copying in the file: # mkdir /usr/include/sensors/lib/ # cp /var/tmp/portage/sys-apps/lm_sensors-3.0.3/work/lm_sensors-3.0.3/lib/sensors.h /usr/include/sensors/lib/ I get a little further with the xsensors build: gui.c: In function 'expose_event_callback': gui.c:316: error: 'SENSORS_EEPROM_TYPE' undeclared (first use in this function) gui.c:316: error: (Each undeclared identifier is reported only once gui.c:316: error: for each function it appears in.) cc1: warnings being treated as errors gui.c:417: error: implicit declaration of function 'sensors_get_feature' gui.c:420: error: 'SENSORS_EEPROM_ROWADDR' undeclared (first use in this function) gui.c:422: error: 'SENSORS_EEPROM_COLADDR' undeclared (first use in this function) gui.c:424: error: 'SENSORS_EEPROM_NUMROWS' undeclared (first use in this function) gui.c:426: error: 'SENSORS_EEPROM_BANKS' undeclared (first use in this function) gui.c: In function 'add_sensor_tab': gui.c:695: error: 'SENSORS_EEPROM_TYPE' undeclared (first use in this function) gui.c:698: error: implicit declaration of function 'sensors_get_ignored' gui.c:713: error: incompatible type for argument 1 of 'sensors_get_label' gui.c:713: error: passing argument 2 of 'sensors_get_label' makes pointer from integer without a cast gui.c:713: error: too many arguments to function 'sensors_get_label' gui.c: In function 'start_gui': gui.c:882: error: passing argument 1 of 'sensors_get_detected_chips' from incompatible pointer type gui.c:882: error: too few arguments to function 'sensors_get_detected_chips' distcc[16793] ERROR: compile gui.c on localhost failed make[2]: *** [gui.o] Error 1 Not only does this look like some header file rearrangement, but it also looks like some functions were moved around within lm_sensors-3*. xsensors-0.6* might definitely need a patch to bring it up to par with the header file / functions it requires from lm_sensors. What do you think? File upstream correct??
Also, the SENSOR_ declarations xsensors is looking for is now within (the kernel sources): # fgrep /usr/src/linux/drivers/hwmon/Kconfig -e "SENSORS_" ... instead, xsensors thinks the declarations are still within lm_sensors. xsensors definitely looks like it needs updating to show as such. Instead of xsensors having lmsensor's "chips.h", xsensors should replace with /usr/src/linux/drivers/hwmon/ ? (I'm not seeing the hwmon/sensor data within the linux header files... just the kernel sources.)
When I try to download lm_sensor's "xsensors-0.60-libsensors-3.patch" patch file, all I'm getting is a cruddy xml/html/wiki wrapped around a diff. It would be great if somebody could post an actual good URL to the patch or post the patch here.
Created attachment 208288 [details, diff] the patch linked to in the original bug submission
lm_sensors-3* changed its API completely: it moved the drivers into the kernel and the API into sysfs. The includes you are missing are not needed. Also, 3.0.3 is old and does not support ACPI sensors which are needed for some motherboards starting with kernel 2.6.31, so please upgrade lm_sensors to 3.1.1 (ebuild is in bug #244598).
i have restricted the current xsensors-0.60 ebuild to <lm_sensors-3 desktop-misc: please bump xsensors with the attached patch, if compatibility with >lm_sensors-3 is wanted. thanks
After applying this patch, there's a problem doing depclean. http://forums.gentoo.org/viewtopic-p-6142059.html#6142059
yes - you also need to change RDEPEND=">=x11-libs/gtk+-2 <sys-apps/lm_sensors-3" to RDEPEND=">=x11-libs/gtk+-2 >sys-apps/lm_sensors-3"
Please add new ebuild x11-misc/xsensors-0.70 http://www.linuxhardware.org/ http://www.lm-sensors.org/wiki/Download xsensors Supported since 0.70
Someone please bump this package, it's blocking stabilization of lm_sensors-3.
0.70 in portage w/ lm_sensors-3 support