Gentoo Archives: gentoo-user

From: Akater <nuclearspace@×××××.com>
To: Martin Vaeth <martin@×××××.de>, gentoo-user@l.g.o
Subject: [gentoo-user] [SOLVED] Please help with `C compiler cannot create executables'
Date: Mon, 30 Jul 2018 20:50:16
Message-Id: 87o9eowiz3.fsf@gmail.com
In Reply to: [gentoo-user] Re: Please help with `C compiler cannot create executables' by Martin Vaeth
1 Martin Vaeth <martin@×××××.de> writes:
2
3 > So "normally" the correct solution would be to clean up /usr/local/.
4 > Of course, if you intentionally installed something there, this
5 > might be wrong. But your problem is very likely caused by this.
6 This was indeed the cause, thank you.
7
8 Further comments made for the
9 reference, in case someone has the same issue.
10
11 >>> cc1: fatal error: /usr/local/include/stdc-predef.h: Permission denied
12 >
13 > It seems that you have this file but that it is not readable
14 > by user/group portage:portage.
15 There is no such file. I posted the relevant ls output in the original
16 message.
17
18 > The main question is: Why do you have something in /usr/local/ at all?
19 > If you did not install anything outside of portage, this directory
20 > should be empty (up to some perhaps empty directories).
21 Indeed, I did install something outside of portage. Found no appropriate
22 ebuilds (ebuild repositories included); instead of writing my own,
23 just followed the procedure as described upstream. This was likely a bad idea.
24
25 Gentoo keeps /usr/local in the list of paths for gcc. If /usr/local is
26 missing something crucial, gcc becomes broken, I guess. In my case, I
27 removed directories and symlinks
28 /usr/local/include
29 /usr/local/lib
30 /usr/local/lib64
31 /usr/local/share
32 that were all created at the time of outside-portage installation. GCC
33 works fine now.

Attachments

File name MIME type
signature.asc application/pgp-signature