Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510102 - app-portage/eix-0.30.2: c++1y triggers incompatibility of clang-3.4/gcc-4.7.3/glibc-2.17
Summary: app-portage/eix-0.30.2: c++1y triggers incompatibility of clang-3.4/gcc-4.7.3...
Status: RESOLVED OBSOLETE
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Martin Väth
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2014-05-11 22:08 UTC by Jauhien Piatlicki (RETIRED)
Modified: 2016-06-22 22:07 UTC (History)
2 users (show)

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


Attachments
build.log (build.log,16.13 KB, text/plain)
2014-05-11 22:08 UTC, Jauhien Piatlicki (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jauhien Piatlicki (RETIRED) gentoo-dev 2014-05-11 22:08:06 UTC
Created attachment 376736 [details]
build.log

Build log attached. No ide why it tries to include something from gcc, previous versions of eix compiled without any problems.
Comment 1 Jauhien Piatlicki (RETIRED) gentoo-dev 2014-05-11 22:09:15 UTC
Please, try to reproduce it.
Comment 2 Martin Väth 2014-05-12 12:36:11 UTC
IIRC, clang provides no c++ library, so it just uses that from gcc.
The code which fails in eix is completely harmless: #include <string>
So I suppose that something is messed up with your compilers. Maybe the two versions of gcc and clang which you have installed do not work with each other.
I guess there is nothing reasonable which can be done in eix about it.
Comment 3 Jauhien Piatlicki (RETIRED) gentoo-dev 2014-05-12 12:40:17 UTC
Yes, you are right, libcxx is a separated project, so clang indeed uses gcc's one.

What seemed strange to me that previous version of eix compiled without any problems. So let me see, if it's indeed some mess on my machine I'll just close this bug, otherwise i'll post additional info.
Comment 4 Jauhien Piatlicki (RETIRED) gentoo-dev 2014-05-12 12:59:40 UTC
Ok, it's not the mess on my computer, it's switching in eix to c++-1y:

http://stackoverflow.com/questions/17775390/clang-3-3-in-c1y-mode-cannot-parse-cstdio-header

It seems to be a bug in <gcc-4.9
Comment 5 Martin Väth 2014-05-12 17:16:54 UTC
Thanks for the analysis.
The test for c++1y now adds
#include <unistd.h>
#include <string>
I hope that this triggers the issue.

The new test is in eix git master on BerliOS and GitHub.
If you find the time, please test (a live ebuild is in the mv overlay).
Comment 6 Jauhien Piatlicki (RETIRED) gentoo-dev 2014-05-12 17:46:21 UTC
app-portage/eix-99999999 compiles with clang. but there are runtime problems now: when called it hangs forever. i have no time to look at the reason currently, will address it later.

It would be helpfull if you compiled eix with clang and tried to run it and see if it works.
Comment 7 Martin Väth 2014-05-13 06:56:10 UTC
(In reply to Jauhien Piatlicki from comment #6)
> app-portage/eix-99999999 compiles with clang.

Thanks for testing

> It would be helpfull if you compiled eix with clang

I always develop/test with clang and never had problems with it (but I did not switch various gcc and glibc versions when doing so)

> but there are runtime problems now [...] hangs forever

Thanks for the reminder: These arose here with upgrade to clang-4.3.1-r100, and so I had conjectured a bug of that particular version.
I will look at it when I have time.
Comment 8 Martin Väth 2014-05-13 10:15:19 UTC
(In reply to Martin Väth from comment #7)
> Thanks for the reminder: These arose here with upgrade to clang-4.3.1-r100

I remember now that I had already checked and decided that I do not know what to do about it: It is simply the first call of fread() which does not return, and the issue is avoided if -D_FORTIFY_SOURCE=2 is not passed on the command line.

Really, it seems to be a problem of clang with handling D_FORTIFY_SOURCE=2 incorrectly (perhaps in the interplay with gentoo's patches for gcc/glibc for D_FORTIFY_SOURCE=2?).

I cannot write a compatible ./configure test for this issue.

You can avoid it "manually" by USE="-security -strong-security"
Comment 9 Austin English (RETIRED) gentoo-dev 2016-06-22 22:07:32 UTC
eix-0.30.10.ebuild
eix-0.30.11.ebuild
eix-0.30.4.ebuild
eix-0.31.4.ebuild
eix-0.31.6.ebuild
eix-0.31.7.ebuild
eix-0.31.7-r1.ebuild

all work for me with sys-devel/clang-3.4.2-r100, sys-devel/clang-3.5.0-r100, and sys-devel/clang-3.7.1-r100 (current stable clang versions).

I also tried with eix-0.30.2 (had to copy 0.30.4's ebuild, and add eautoreconf, using a tarball I manually prepared from a git checkout). That also worked in all three clang versions as well.