Summary: | app-admin/cpulimit undefined reference to `timediff' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nathan Dehnel <ncdehnel> |
Component: | Current packages | Assignee: | Andrew Savchenko <bircoph> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jstein |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/gentoo/pull/29452 https://bugs.gentoo.org/show_bug.cgi?id=576216 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 913052 | ||
Attachments: | build log |
Description
Nathan Dehnel
2019-05-22 06:04:12 UTC
I can compile on all my systems but two Intel Atom machines. >>> Emerging (1 of 1) app-admin/cpulimit-2.4::gentoo * cpulimit-2.4.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking cpulimit-2.4.tar.gz to /var/tmp/portage/app-admin/cpulimit-2.4/work >>> Source unpacked in /var/tmp/portage/app-admin/cpulimit-2.4/work >>> Preparing source in /var/tmp/portage/app-admin/cpulimit-2.4/work/cpulimit-2.4 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-admin/cpulimit-2.4/work/cpulimit-2.4 ... >>> Source configured. >>> Compiling source in /var/tmp/portage/app-admin/cpulimit-2.4/work/cpulimit-2.4 ... make -j3 x86_64-pc-linux-gnu-gcc -o cpulimit cpulimit.c -pthread -lrt -DLINUX -Os -march=atom -mtune=atom -mmmx -msse -msse2 -msse3 -mssse3 -pipe -fomit-frame-pointer -Os -march=atom -mtune=atom -mmmx -msse -msse2 -msse3 -mssse3 -pipe -fomit-frame-pointer /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-admin/cpulimit-2.4/temp/ccjH3Nfn.o: in function `compute_cpu_usage.part.0': cpulimit.c:(.text+0x5d5): undefined reference to `timediff' /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-admin/cpulimit-2.4/temp/ccjH3Nfn.o: in function `main': cpulimit.c:(.text.startup+0x7f0): undefined reference to `timediff' collect2: error: ld returned 1 exit status make: *** [Makefile:18: cpulimit] Error 1 * ERROR: app-admin/cpulimit-2.4::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-admin/cpulimit-2.4::gentoo'`, There inline function timediff which wrongly compiles on -Os. Following command simply reproduces error: CFLAGS="${CFLAGS} -Os" emerge -av =app-admin/cpulimit-2.4 In fact on recent GCC inline keyword is pretty useless if defined in *.c code. Better to make it static or completely remove inline keyword. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fe5e537a744ac90cacd63babb2a4772da1fdb5a commit 0fe5e537a744ac90cacd63babb2a4772da1fdb5a Author: Azamat H. Hackimov <azamat.hackimov@gmail.com> AuthorDate: 2023-02-06 16:10:05 +0000 Commit: Conrad Kostecki <conikost@gentoo.org> CommitDate: 2023-04-23 15:47:40 +0000 app-admin/cpulimit: add 2.8 Migrate to EAPI8, building and compilation fixes. Closes: https://bugs.gentoo.org/686528 Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/29452 Signed-off-by: Conrad Kostecki <conikost@gentoo.org> app-admin/cpulimit/Manifest | 1 + app-admin/cpulimit/cpulimit-2.8.ebuild | 28 ++++++++++++++++++++++ .../cpulimit/files/cpulimit-2.8-inline-func.patch | 11 +++++++++ .../cpulimit/files/cpulimit-2.8-makefile.patch | 25 +++++++++++++++++++ 4 files changed, 65 insertions(+) |