Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 592916 - sys-apps/lm_sensors fails to compile in hardened/linux/musl/amd64 profile
Summary: sys-apps/lm_sensors fails to compile in hardened/linux/musl/amd64 profile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-05 11:19 UTC by Chad Joan
Modified: 2017-01-01 18:10 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log. (lm_sensors_build.log,12.18 KB, text/x-log)
2016-09-05 11:19 UTC, Chad Joan
Details
emerge --info (emerge-info-lm_sensors.txt,5.42 KB, text/plain)
2016-09-05 11:20 UTC, Chad Joan
Details
emerge -pqv '=sys-apps/lm_sensors-3.3.5::gentoo' (emerge-pqv.txt,232 bytes, text/plain)
2016-09-05 11:21 UTC, Chad Joan
Details
lm_sensors-8fb3922-sensors-detect-gentoo.patch (lm_sensors-8fb3922-sensors-detect-gentoo.patch,4.54 KB, patch)
2016-09-08 09:43 UTC, Chad Joan
Details | Diff
lm_sensors-3.4.0-r133.ebuild (lm_sensors-3.4.0-r133.ebuild,3.25 KB, text/plain)
2016-09-08 09:46 UTC, Chad Joan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chad Joan 2016-09-05 11:19:54 UTC
Created attachment 445004 [details]
Build log.

The build halts with a message like this:

Unimplemented option: -p
make: *** No rule to make target 'asm/io.h', needed by 'prog/dump/superio.rd'.  Stop.
Comment 1 Chad Joan 2016-09-05 11:20:49 UTC
Created attachment 445006 [details]
emerge --info
Comment 2 Chad Joan 2016-09-05 11:21:44 UTC
Created attachment 445008 [details]
emerge -pqv '=sys-apps/lm_sensors-3.3.5::gentoo'
Comment 3 Felix Janda 2016-09-05 12:06:15 UTC
The warning comes from the ldconfig script we use for musl, and is harmless.

An upstream(?) patch which should fix this bug can be found at:

https://github.com/groeck/lm-sensors/commit/8fb3922219d3c6656b3902d6ae907de9e443797c.patch
Comment 4 Chad Joan 2016-09-05 13:54:05 UTC
Good find!  Thanks.  I will try that out a bit later.  (I'm afraid I'm about to get busy with other things for a while.)
Comment 5 Chad Joan 2016-09-08 09:43:44 UTC
Created attachment 445202 [details, diff]
lm_sensors-8fb3922-sensors-detect-gentoo.patch

This patch replaces lm_sensors-3.3.5-sensors-detect-gentoo.patch for the 8fb3922... commit of lm_sensors.
Comment 6 Chad Joan 2016-09-08 09:46:38 UTC
Created attachment 445204 [details]
lm_sensors-3.4.0-r133.ebuild

ebuild that builds commit 8fb3922... from the lm_sensors github repository.  It depends on the newly added patch.
Comment 7 Chad Joan 2016-09-08 09:51:33 UTC
Felix, the commit you linked me to eventually worked out.  Thanks!

It did take a little doing: upstream changed some code in the sensors-detect script which broke the lm_sensors-3.3.5-sensors-detect-gentoo.patch (which seems to make it possible to use lm_sensors on openrc systems instead of systemd systems).  I did my best to faithfully recreate this patch for the newer version of the sensors-detect file, and it should be fine because the changes weren't very severe.  I ran the modified sensors-detect on my system and didn't have any problems.

I have included the ebuild that I used to grab the correct sources.

Hope that helps!
Comment 8 Felix Janda 2016-09-08 11:48:45 UTC
Thanks for testing and for your work on updating the gentoo specific patch!

In this case the ebuild should be named something like
lm_sensors-3.4.0_p20150831.ebuild to indicate that it is not exactly
version 3.4.0 but a snapshot.

However for this kind of bug the usual solution would be to backport
the upstream patch and to add it to the current ebuild. It is not
unlikely that the upstream patch applies to the versions in portage
without modification. Since the patch does only concern a build
failure even no revbump would be necessary.
Comment 9 Thomas Deutschmann gentoo-dev Security 2016-09-16 12:42:06 UTC
Please re-test latest sys-apps/lm_sensors-3.4.0_p20160725 which is based on latest upstream snapshot release and has a rewritten sensors-detect for Gentoo.
Comment 10 Chad Joan 2016-12-31 05:30:53 UTC
Just installed and ran sys-apps/lm_sensors-3.4.0_p20160725.  It seems to be working fine.  Thanks!
Comment 11 Thomas Deutschmann gentoo-dev Security 2017-01-01 18:10:05 UTC
Thank you for confirmation.