From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 528BD3858C2C for ; Sat, 16 Apr 2022 19:41:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 528BD3858C2C Received: by mail-wm1-x32f.google.com with SMTP id r64so6690224wmr.4 for ; Sat, 16 Apr 2022 12:41:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0PBvyNNv/30YxXqgOshx1AItVbCO1J9nmFW060W5x+0=; b=vxEdfXGICI8TV6yu0borKGd7ddCKrQfx31NuC+/kUgHXW5kp9I1R/mK9wX+V0MMDKV f+XxsOeBNDyoVB18ZC3OOC0QxCQatUeaCLjxhI78U3BEyM03deXrFgXSWX/xzadBqNbh ssYSz3v9m8IrabqdgSrigUOq9kqJGJt+8lQA3vGDAfbPTCaITFoWEnCLVn10+lyYTdsV F3m+WYqbXJJUhsDJRf2T1p59M/otFy5p7oj6/pry0XCVdTnrksnggn+33SXYSt801ScT R0sCVW19flFy3vYjrTUf0ADhWNOErFHyHCjbjYoE2K8HNvu9bYj+Ef27lTSdQHjQLaox snWA== X-Gm-Message-State: AOAM533QZrgpWBwT1LYL32xtlqGnlnH8NX2pndByJom40azZ5VsCK/Zf Il2XgLkkHYS2OGYEsqbB33eYIyaR9o2wQnz8ul4= X-Google-Smtp-Source: ABdhPJyEil6IisFb4+IajjaH9NbXAuXPWlbO2UQlpgapiSTMwVZ4qVLMfndfNDtJvN812TNH1lVNDT/HHNouLgONcyo= X-Received: by 2002:a05:600c:3555:b0:392:68aa:a46d with SMTP id i21-20020a05600c355500b0039268aaa46dmr4987934wmq.20.1650138110984; Sat, 16 Apr 2022 12:41:50 -0700 (PDT) MIME-Version: 1.0 References: <20220416053920.4hj6vcnqqlscile7@mattwilson.org> <20220416192445.dxuftlrblkhctmir@mattwilson.org> In-Reply-To: <20220416192445.dxuftlrblkhctmir@mattwilson.org> From: Jonathan Wakely Date: Sat, 16 Apr 2022 20:41:36 +0100 Message-ID: Subject: Re: Error when building gcc w/ Go language on Solaris To: "Matthew R. Wilson" Cc: gcc-help X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2022 19:41:54 -0000 On Sat, 16 Apr 2022, 20:24 Matthew R. Wilson, wrote: > On 04.16.2022 07:33, Jonathan Wakely wrote: > >On Sat, 16 Apr 2022, 06:40 Matthew R. Wilson, > >wrote: > > > >> I am revisiting my attempts to build GCC with Go language support on > >> Solaris/SPARCv9. > >> > >> The error I get when I make is: > >> ../.././gotools/../libgo/go/cmd/go/main.go:10:16: error: > >> > /export/home/mwilson/gcc-build/gcc-11.2.0/host-sparcv9-sun-solaris2.11/gcc/context.o > >> exists but does not contain any Go export data > >> > >> 3) Set my PATH to: /opt/mrwgcc:/usr/bin:/usr/sbin > >> > >> 4) configured gcc 11.2 with a similar set of options as the > >> Solaris-provided gcc: > >> > >> ./configure --prefix=/opt/mrwgcc \ > >> --enable-languages=c,c++,go --enable-shared \ > >> --enable-initfini-array \ > >> --disable-rpath --with-system-zlib --with-build-config=no \ > >> --without-gnu-ld --with-ld=/usr/bin/ld \ > >> --with-gnu-as --with-as=/opt/mrwgcc/bin/as > sparcv9-sun-solaris2.11 > > > >Just a guess, but maybe the Go build uses sed or another command like > >that, and relies on the POSIX-conforming version in /usr/xpg4/bin > >rather than the /usr/bin one. Try putting /usr/xpg4/bin in your path, > >just after /opt/mrwgcc/bin > > Aha! What a great guess -- that fixed it! Thank you so much! > Great! We should document this, if we don't already. And even better would be if the build failed with a clear error mentioning the need for POSIX sed (or whichever command it was).