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 7F3913858010 for ; Sun, 17 Apr 2022 08:23:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F3913858010 Received: by mail-wm1-x32f.google.com with SMTP id n40-20020a05600c3ba800b0038ff1939b16so6081925wms.2 for ; Sun, 17 Apr 2022 01:23:59 -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=cBIFgZgZ4gY04zyYVShHCblxJV25yBp3RRVu7SLu8v4=; b=WP7A/QYOLZlf5i+aPI2bcrk/LmV7MjiYPMfAkHFR4a21tKprtZ8m6G/MtyJaDjGoFb dNJCLHaBYwaVKYB173yDbuiVyc/SbiwjG7KA2i8Wtv2wNBE+IimDW5CSDJGJ0FRI0H2t 1d+GOMN3HtsiCrW+NVhVTHo+hSFlcMNUPEvza4UTecoGjxWD6D16OVz1W9IQd5zPOM5D OjdsI8q6vvWQ6m+xzhZmT1Icmx4nmbJEVDf1jMazQ4OFed4xuD9/KHDKVp+9L7T81ii5 4lAgDpWAkM54EUWrwgOTApIUyTzPm41h+ZjTeGHpHH/7/wvfJTikp7RoBUeXnHqplQrQ ESZw== X-Gm-Message-State: AOAM530i7+umzHXK7H4rdQoNbHw408UbzqFQkrnQ1hEORN4+Uf9D5WFw e4y826+mI20W/D4SczTfpKt/+92UYko8ITy/llQ= X-Google-Smtp-Source: ABdhPJw3WpGcLlcV5nnoc525YpTBdWSD0ClxEfLsOusvyYVphE8GuUzRQVRZZTDchJ9vABtq/6Ou/r1JQHCspXHzqxE= X-Received: by 2002:a05:600c:682:b0:38e:b64f:f11d with SMTP id a2-20020a05600c068200b0038eb64ff11dmr10648895wmn.202.1650183838133; Sun, 17 Apr 2022 01:23:58 -0700 (PDT) MIME-Version: 1.0 References: <20220416053920.4hj6vcnqqlscile7@mattwilson.org> <20220416192445.dxuftlrblkhctmir@mattwilson.org> In-Reply-To: From: Jonathan Wakely Date: Sun, 17 Apr 2022 09:23:44 +0100 Message-ID: Subject: Re: Error when building gcc w/ Go language on Solaris To: Ian Lance Taylor Cc: "Matthew R. Wilson" , 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: Sun, 17 Apr 2022 08:24:01 -0000 On Sun, 17 Apr 2022, 01:39 Ian Lance Taylor, wrote: > On Sat, Apr 16, 2022 at 12:42 PM Jonathan Wakely via Gcc-help > wrote: > > > > 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). > > I'm happy to fix the POSIX sed requirement if we can find out where it > comes in. > > I can't seem to access any Solaris systems at the moment so I can't > recreate it myself. > We have a couple in the GCC compiler farm. I'll look into it on Tuesday. > It's true that the Go build requires objcopy. It's interesting that > the error message refers to context.o. At that point in the build > there should be context.gox in the libgo build directory, and the > compiler should find that one first. And even if content.gox doesn't > exist for some reason, the context.o file should contain export data > in the ".go_export" section. So I'm puzzled. > > Ian >