You are not logged in.

#1 2013-07-13 04:16:26

mlmoses
Member
From: Michigan, USA
Registered: 2012-04-14
Posts: 55

sys-devel/gcc-4.6.4 seems to have broken sys-devel/clang

After my systems were upgraded from GCC 4.6.3 to 4.6.4, I could no longer use Clang. Every time I try to compile a source file which includes a header provided by GCC, Clang fails because it can't find the header file. If I run clang++ with the -v switch, the GCC include directories aren't even listed in paths to search. For example, the following C++ source file, when compiled with Clang, will generate an error about not being able to find "cstring":

#include <cstring>
#include <iostream>

int main(int argc, char **argv) {
    std::cout << "Hello, world!" << std::endl;
    return 0;
}

First, I tried re-installing Clang. This failed because at some point during the build, the newly compiled Clang is used to build parts of itself, but it wasn't finding the headers which are supposed to be supplied by GCC. Thinking it was a problem with Clang, I tried to downgrade to Clang 3.2. This compiled and installed OK, but still exhibited the same inability to locate GCC's header files. So I've temporarily gone back to GCC 4.6.3 to complete my other updates.

Is there some other package I need to re-compile to get Clang working with the updated GCC?

Offline

#2 2013-07-20 17:48:34

mlmoses
Member
From: Michigan, USA
Registered: 2012-04-14
Posts: 55

Re: sys-devel/gcc-4.6.4 seems to have broken sys-devel/clang

I've tried to dig into this more over the last few days. Since Clang will emerge and run fine with GCC 4.6.3, and not GCC 4.6.4, I think the problem might be related to the new GCC ebuild (FL-507). I've taken the following steps, but Clang still can't build because it can't find GCC's headers (specifically, <algorithm>):

  1. Remove Clang and LLVM.

  2. Update GCC 4.6.3 to 4.6.4.

  3. Reinstall GCC 4.6.4 using itself (because there were a couple of errors at the end of the previous step)

  4. Install Clang and LLVM.

There must be some additional package I need to re-install or something, but I'm not sure what to try next. Do I have to re-merge @world? Any insight is appreciated.

Offline

#3 2013-07-26 14:43:29

mlmoses
Member
From: Michigan, USA
Registered: 2012-04-14
Posts: 55

Re: sys-devel/gcc-4.6.4 seems to have broken sys-devel/clang

I unmasked GCC 4.7 and was able to successfully compile Clang. My results so far:

  • sys-devel/gcc-4.6.3: Clang compiles and runs successfully.

  • sys-devel/gcc-4.6.4: Clang will not compile (see earlier posts).

  • sys-devel/gcc-4.7.2-r1: Clang compiles and runs successfully.

I won't be able to spend any more time on this issue for the next week or so, so I'm sticking with GCC 4.7 for the time being. If anyone has any idea on what else I need to do to use sys-devel/gcc-4.6.4 with clang, please let me know.

Offline

#4 2013-09-17 04:38:37

mlmoses
Member
From: Michigan, USA
Registered: 2012-04-14
Posts: 55

Re: sys-devel/gcc-4.6.4 seems to have broken sys-devel/clang

I'm running into this problem again, since I never solved it in the first place. Due to some changes on my desktop, I needed to recompile gcc. It turns out gcc-4.7.2-r1 no longer merges because of a missing patch file. So I tried gcc-4.8.1-r2, but I had the same result I had with gcc-4.6.4 which prompted my original post. Then I tried gcc-4.6.4-r1; again with the same result. I thought about digging up the ebuild for gcc-4.6.3 out the history and putting it in my overlay (that was the last version of gcc which seemed to work), but that's not really solving the problem.

Because this has been such a colossal waste of time, and it's been preventing me from having a workable system, I've removed or otherwise disabled anything that depends on llvm.

It would be really great, awesome even, if someone could point me in the right direction here. I don't know what to check next.

Offline

#5 2013-09-17 06:05:24

angry_vincent
Staff
From: Ukraine
Registered: 2010-10-07
Posts: 687

Re: sys-devel/gcc-4.6.4 seems to have broken sys-devel/clang

this is Funtoo-specific bug. I've faced this issue some monthes back but had no time to make a bug report. This will be reported asap.

Offline

#6 2013-09-17 14:25:33

mlmoses
Member
From: Michigan, USA
Registered: 2012-04-14
Posts: 55

Re: sys-devel/gcc-4.6.4 seems to have broken sys-devel/clang

Good to know. I was beginning to think I had misconfigured something in some subtle way on both my laptop and desktop. When I get a chance, I'll go look for the bug on Funtoo's issue tracker so I can follow the progress.

Offline

Board footer

Powered by FluxBB