From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 7F6A93858C98; Mon, 25 Dec 2023 16:29:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7F6A93858C98 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7F6A93858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=63.228.1.57 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703521757; cv=none; b=oG9v3pNuEjqwqsUXyo85LeGs7zzj5mxpzIFP0vdl60kOQyOjEIZAWhx+8WGez3B2q531LPO61CJAiAwW52z9nOXWL/F7TOs7hwEkt/4gBaHW+H/wTc6Ev3dsKJf4GBaRamNhMCJotsXDYWXANgSYsjHG7te51risQMiEICjlY9k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703521757; c=relaxed/simple; bh=RPg50jCoDBkWFw6wJmV8SAGM1C7rUYBfhzivoxMFku4=; h=Date:From:To:Subject:Message-ID:Mime-Version; b=u2SyZkT3Y1gz/Sd7F7ASoIz8vqXd4JkwDI1QjBNGtUDxf0/9PURR47Ytr8RfeydWKqVU9LpQAICn4u5pKmjiZw4Xu0dgMTSrEAk5si+HMRtPl5lhFSGf3Xxd0hoR09VjP/4nJmg325yrh4CwBDdO2N0f6KIhVgDBqK6Mwnq11gg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 3BPGSFEk030908; Mon, 25 Dec 2023 10:28:15 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 3BPGSEW1030907; Mon, 25 Dec 2023 10:28:14 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 25 Dec 2023 10:28:14 -0600 From: Segher Boessenkool To: Prashant Cc: gcc-help@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: 'posix_spawnp' error in build Message-ID: <20231225162814.GS19790@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi! On Mon, Dec 25, 2023 at 08:11:23PM +0530, Prashant via Gcc-help wrote: > I'm trying to build the gcc repository. Based on the instructions given on > the SummerOfCode - GCC Wiki (gnu.org) > and GCC for New > Contributors — GCC Contributors Guide 0.1 documentation > (gcc-newbies-guide.readthedocs.io) > , I have tried the > following commands. > > 1) git clone git://gcc.gnu.org/git/gcc.git > 2) cd gcc & ./contrib/download_prerequisites > 3) mkdir objdir & cd objdir > 4) ../gcc/configure --prefix=/home/path/to/gcc --enable-languages=c,c++ That is wrong. Build dir as a subdir of the source dir is not supported. It might work in many cases, but that does not mean it is okay to do. > Running the 5th throws the following error: > 'xgcc: fatal error: cannot execute ‘cc1plus’: posix_spawnp: No such file or > directory > compilation terminated.' I don't know if that is one of the weird problems caused by this. Easy enough to find out. First "make distclean", and then "git status". The error message says that the newly compiled compiler driver ("xgcc", which will be insbtalled as just "gcc" eventually) cannot execute the newly compiled actual C++ compiler ("cc1plus"), not from the place it thinks it put it, anyway. gl;hf, happy holidays, let us know how it went / what else you find out, Segher