Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 565466 - app-laptop/i8kutils-1.42 fails to build with GCC 5 (and has other problems)
Summary: app-laptop/i8kutils-1.42 fails to build with GCC 5 (and has other problems)
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: adi
Depends on:
Blocks: gcc-5
  Show dependency tree
Reported: 2015-11-11 10:01 UTC by Ryan Hill (RETIRED)
Modified: 2015-11-13 12:13 UTC (History)
0 users

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

i8kutils-1.42-gcc5.patch (i8kutils-1.42-gcc5.patch,1.13 KB, patch)
2015-11-11 10:01 UTC, Ryan Hill (RETIRED)
Details | Diff
i8kutils-1.42-Makefile.patch (i8kutils-1.42-Makefile.patch,1.27 KB, patch)
2015-11-11 10:03 UTC, Ryan Hill (RETIRED)
Details | Diff
i8kutils-1.42.ebuild.diff (i8kutils-1.42.ebuild.diff,1.26 KB, patch)
2015-11-11 10:22 UTC, Ryan Hill (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2015-11-11 10:01:01 UTC
Created attachment 416654 [details, diff]

The new version is failing to build due to changes in inline rules for C99:

x86_64-pc-linux-gnu-gcc -O2 -march=native -g -pipe   -c -o i8kctl.o i8kctl.c
gcc -Wall -c -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -DLIB i8kctl.c
gcc -Wall -c -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -DLIB probe_i8k_calls_time.c
gcc -o probe_i8k_calls_time i8kctl.o probe_i8k_calls_time.o
probe_i8k_calls_time.o: In function `main':
probe_i8k_calls_time.c:(.text+0x62): undefined reference to `timestamp'
probe_i8k_calls_time.c:(.text+0x82): undefined reference to `timestamp'
probe_i8k_calls_time.c:(.text+0xa2): undefined reference to `timestamp'
probe_i8k_calls_time.c:(.text+0xbf): undefined reference to `timestamp'
probe_i8k_calls_time.c:(.text+0xdc): undefined reference to `timestamp'
probe_i8k_calls_time.o:probe_i8k_calls_time.c:(.text+0xf9): more undefined references to `timestamp' follow
collect2: error: ld returned 1 exit status
Makefile:24: recipe for target 'probe_i8k_calls_time' failed

While looking at this I ran into a race condition with parallel make.  While looking into that I found more things wrong, etc. etc.  Rather than filing multiple bugs I'll just attach a couple patches for those problems here.
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2015-11-11 10:03:40 UTC
Created attachment 416656 [details, diff]

Fix a race condition causing parallel builds to sometimes fail.

Both probe_i8k_calls_time and i8kctl contain a main() function, though
i8kctl's is omitted when built with -DLIB so they can link without a
conflict.  i8kctl is also a standalone exe so it is built twice, with
and without -DLIB.  When building in parallel you can get into a 
situation where the object file created by the probe_i8k_calls_time
target gets overwritten with the one from i8kctl and bad things happen.
Nothing actually uses the i8kctl.o that has main() so we can just not
build it.

Also move CFLAGS, CC, LDFLAGS respect out of the ebuild.
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2015-11-11 10:22:19 UTC
Created attachment 416658 [details, diff]

Just some little stuff

- Drop examples USE flag since that directory doesn't exist in the sources anymore
- Convert DOCS=( README.i8kutils ) to a dodoc.  None of the eclasses we're inheriting handles DOCS so this wasn't getting installed.
- It looks like the newconfd line got dropped when you did your version bump.
- Drop all the compiler flag sed stuff.  None of it actually did anything, except add LDFLAGS when compiling (but not linking).  As far as I can tell this never worked.  Moved to the Makefile patch.
Comment 3 adi 2015-11-11 17:36:24 UTC
I'll apply these patches locally and send them to upstream. Thank you!
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2015-11-13 12:13:22 UTC
commit 4b4234a933a25f93131c443b51cc3bd5b79ce345
Author: Ioan-Adrian Ratiu <>
Date:   Wed Nov 11 20:37:47 2015 +0200

    app-laptop/i8kutils: fix gcc5 build for v1.42
    Recipe enhancements requested in the bug are also included
    Gentoo bug: #565466
    Signed-off-by: Ioan-Adrian Ratiu <>

commit e8fa20278328ff3ac39a2bfd89d1c3287f57a9b1
Author: Ioan-Adrian Ratiu <>
Date:   Sat Nov 7 20:51:22 2015 +0200

    app-laptop/i8kutils: bump to v1.42
    sys-power/acpi added to RDEPEND