Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 427352 - =dev-libs/klibc-1.5.25 fails to build with clang-3.1-r4
Summary: =dev-libs/klibc-1.5.25 fails to build with clang-3.1-r4
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: systemwide-clang 410945
  Show dependency tree
 
Reported: 2012-07-20 15:56 UTC by Fabio Scaccabarozzi
Modified: 2019-03-22 07:17 UTC (History)
4 users (show)

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


Attachments
emerge fail log (dev-libs:klibc-1.5.25:20120720-142022.log,41.09 KB, text/plain)
2012-07-20 15:56 UTC, Fabio Scaccabarozzi
Details
Patch for klibc-2.0.4 to compile with 4.4.1 kernel sources. (klibc_ebuild_KV_4.4.1.patch,1.78 KB, patch)
2016-02-06 12:38 UTC, Fabio Scaccabarozzi
Details | Diff
Emerge compile log with ebuild patches. (dev-libs:klibc-2.0.4:20160206-112342.log,7.10 KB, text/x-log)
2016-02-06 12:38 UTC, Fabio Scaccabarozzi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Scaccabarozzi 2012-07-20 15:56:38 UTC
Created attachment 318748 [details]
emerge fail log

=dev-libs/klibc-1.5.25 fails to build with clang-3.1-r4
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-12-26 21:55:59 UTC
Please retest on klibc-2.0.3, so we can stabilize the new series and drop the 1.5 series if all tests are good.
Comment 2 Fabio Scaccabarozzi 2014-06-26 12:38:54 UTC
(In reply to Robin Johnson from comment #1)
> Please retest on klibc-2.0.3, so we can stabilize the new series and drop
> the 1.5 series if all tests are good.

Retested with clang-3.4.2 and klibc 2.0.3-r1. It now fails because of invalid arguments (fno-delete-null-pointer-checks and maccumulate-outgoing-args).
I tried to track these down in the sources, but couldn't find them.
Comment 3 Fabio Scaccabarozzi 2016-02-06 12:37:48 UTC
Retested with klibc-2.0.4 and clang-3.7/3.8_rc1, still fails when compiling.
I bumped the kernel version used by the ebuild to 4.4.1, to no avail (except for the fact that the unknown compile flags are not hard errors anymore, but just soft warnings). Note that with the linux-3.12 headers the errors may be much harder to fix, and anyway klibc's usr/klibc/README.klibc mentions "Extract a recent Linux kernel into a directory".

Please see the attached patch for the ebuild updates and the compile log with the patched ebuild.
Note that I removed all the logic for calculating the kernel version and patches. I know fetching patches is the preferred way because it reuses the same kernel base tarball, on the other hand it's much harder to read and understand - feel free to ignore those changes and/or fix as needed the original ebuild.
Comment 4 Fabio Scaccabarozzi 2016-02-06 12:38:26 UTC
Created attachment 424728 [details, diff]
Patch for klibc-2.0.4 to compile with 4.4.1 kernel sources.
Comment 5 Fabio Scaccabarozzi 2016-02-06 12:38:56 UTC
Created attachment 424730 [details]
Emerge compile log with ebuild patches.
Comment 6 Austin English (RETIRED) gentoo-dev 2016-06-05 03:25:08 UTC
klibc-1.5.25.ebuild
klibc-2.0.2.ebuild
klibc-2.0.2-r1.ebuild
klibc-2.0.3.ebuild
klibc-2.0.3-r1.ebuild
klibc-2.0.4.ebuild

all build for me with clang 3.5.0.
Comment 7 Austin English (RETIRED) gentoo-dev 2016-06-05 04:18:46 UTC
(In reply to Austin English from comment #6)
> klibc-1.5.25.ebuild
> klibc-2.0.2.ebuild
> klibc-2.0.2-r1.ebuild
> klibc-2.0.3.ebuild
> klibc-2.0.3-r1.ebuild
> klibc-2.0.4.ebuild
> 
> all build for me with clang 3.5.0.

Mistake on my end, forgot to put clang after package name in package.env.

1.5.25 still fails:
x86_64-pc-linux-gnu-clang-3.5.0: error: unknown argument: '-fno-delete-null-pointer-checks'
x86_64-pc-linux-gnu-clang-3.5.0: error: unknown argument: '-maccumulate-outgoing-args'
Comment 8 Austin English (RETIRED) gentoo-dev 2016-06-05 04:19:01 UTC
Confirming.
Comment 9 Austin English (RETIRED) gentoo-dev 2016-06-15 19:36:38 UTC
Currently blocked by:
https://llvm.org/bugs/show_bug.cgi?id=9251
https://llvm.org/bugs/show_bug.cgi?id=28145

in clang-3.8, and bug 410945 (linux kernel doesn't build with clang).
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-12-30 10:27:03 UTC
Reassigning to the maintainer.
Comment 11 Pacho Ramos gentoo-dev 2019-01-12 10:31:53 UTC
still valid with 2.0.4-r3?
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-03-22 07:17:48 UTC
Many changes in clang since.  Please reopen if you can still repro it with new versions of clang.