Bad path on removal of libatomic causing compilation failure

Anubis 1101 Anubis1101@pm.me
Sun Nov 16 14:55:38 GMT 2025


Just figured it out, I was in a hurry to compile it and didn't perform the basic step of creating a separate 
build directory; I tried to compile right from the source directory, and that caused the failure.

I agree though, it shouldn't fail. If this is such a critical problem, I feel like a simple check for it should be
included, like "Hey, buddy, ever heard of Best Practices?".
But, GCC is a huge project, so perhaps there's a specific reason why they don't, or perhaps it's an easy filter for
people like me.




On Sunday, November 16th, 2025 at 7:24 AM, Segher Boessenkool <segher@kernel.crashing.org> wrote:

> 
> 
> On Sat, Nov 15, 2025 at 02:11:41AM +0000, Anubis 1101 via Gcc-help wrote:
> 
> > I'm trying to compile GCC 15.1 for my x86 Linux machine. Everything seems to be going well, and it compiles happily for about 20 minutes or so, until it fails an rm command on libatomic.la, with the message:
> > rm: cannot remove '[...]/x86_64-pc-linux-gnu/32/libatomic/../../../gcc//32/libatomic.la': No such file or directory
> > 
> > It seems obvious to me that that '//' isn't right. None of the other paths had any such issues, so it might be something specific I can just fix, perhaps in the makefile or a config file somewhere.
> > I've been poking around all day, and can't seem to find a solution, online or in GCC material. I'm entirely blind here- I've never compiled a project of this complexity before, and I'm not sure where to start looking for this problem.
> > 
> > As I understand it, this is included with the libmulti 32-bit libraries, which are apparently optional? I'd like to have them around just in case, but if this is going to be a serious issue, I'll try to reconfigure it without them.
> 
> 
> Names containing "//" are just fine, it means exactly the same as a
> single "/" in any POSIX-conforming shell (as is required for building
> GCC, see https://gcc.gnu.org/install/prerequisites.html).
> 
> 
> The "rm" command resulting in an error can be ignored by prefixing the
> command with "-", like
> -rm $(gcc_objdir)$(MULTISUBDIR)/libatomic.la
> here. This should not fail at all of course, that's not how this is
> written.
> 
> But the recipe has libatomic.la as prerequisite, so how can this fail?
> The prerequisite does not have the subdir stuff in there, maybe that is
> why it is failing?
> 
> 
> Segher


More information about the Gcc-help mailing list