From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 9D14C3858430 for ; Sat, 16 Apr 2022 05:39:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9D14C3858430 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=mattwilson.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mattwilson.org Received: by mail-pl1-x629.google.com with SMTP id d15so8535442pll.10 for ; Fri, 15 Apr 2022 22:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mattwilson.org; s=google; h=date:from:to:subject:message-id:mime-version:content-disposition; bh=FQRNccuFLS9fy2Ijs/StR4pwV51ZPLtCVDzzjpA7nUI=; b=WzZ91tBwam1O+yoeNAGc1xG+JtCwGrSnYOdSkVAufANXLJzs8/54BCThk/qBKYnSJa xwJpVc2I6uxSZe2eynuoiKKxA12ZB+B9o5r2FCkJ/G0TfPAEcKmcVPF3Tke/HqC9glLQ YPxheonCo+jpzCxGilgg5wz/z7elGAOTP9eto= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition; bh=FQRNccuFLS9fy2Ijs/StR4pwV51ZPLtCVDzzjpA7nUI=; b=3Jaei0IvqpWzIr2NcE2z+DNSluGaiGDQfel4EWX27UflxvbGmV5ZkHUxjuZTlJk4cC Yn7/cQX0zXhOZ2xb0VIRsiouXnk63nWne6WFaBkLy0CerA5nbq6DnxbqUnTeiLjow4cA Y56nAfgrx+EmA6fdrKn1BahAJeQ56AkVy6mdnfJEyj6jQ4RWDyCsnwC3ynN07Nbb7rI5 mablCyW39y60L15kwGdwdrDsmP9pAZT76Raaa953YzqijtQoYV4iOgrdZX+XoomUmuUB FPzCYqg54ejNLFLQWlblzPRR6BmsqvjCNBDUWZBXMuWtYV2+P2GVnyN9IlX6Q0L9IvlS 9IOw== X-Gm-Message-State: AOAM5318+4fUsCOwDhtCeilFnuQZAWy9DUkZNPG+F0XqRQeLDxKB0gRu uVnpYY7J+5DlKmGztxwfUadcmLG8Kggvow== X-Google-Smtp-Source: ABdhPJzwLnjPRuUzAfcgoC4US9HeEwS6cZd3Wv1DbNyUTbcWqFPZ3TnkPZpb6C/p1GoJb1UEDPsujQ== X-Received: by 2002:a17:903:2311:b0:158:6e0d:fb49 with SMTP id d17-20020a170903231100b001586e0dfb49mr2270323plh.65.1650087562338; Fri, 15 Apr 2022 22:39:22 -0700 (PDT) Received: from mattwilson.org ([50.45.185.53]) by smtp.gmail.com with ESMTPSA id qe15-20020a17090b4f8f00b001c6f4991cd4sm10210768pjb.45.2022.04.15.22.39.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 22:39:21 -0700 (PDT) Date: Fri, 15 Apr 2022 22:39:20 -0700 From: "Matthew R. Wilson" To: gcc-help@gcc.gnu.org Subject: Error when building gcc w/ Go language on Solaris Message-ID: <20220416053920.4hj6vcnqqlscile7@mattwilson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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 05:39:25 -0000 Hello, I am revisiting my attempts to build GCC with Go language support on Solaris/SPARCv9. The error I get when I make is: /export/home/mwilson/gcc-build/gcc-11.2.0/host-sparcv9-sun-solaris2.11/gcc/gccgo -B/export/home/mwilson/gcc-build/gcc-11.2.0/host-sparcv9-sun-solaris2.11/gcc/ -B/opt/mrwgcc/sparcv9-sun-solaris2.11/bin/ -B/opt/mrwgcc/sparcv9-sun-solaris2.11/lib/ -isystem /opt/mrwgcc/sparcv9-sun-solaris2.11/include -isystem /opt/mrwgcc/sparcv9-sun-solaris2.11/sys-include -g -O2 -I ../sparcv9-sun-solaris2.11/libgo -L ../sparcv9-sun-solaris2.11/libgo -L ../sparcv9-sun-solaris2.11/libgo/.libs -o go ../.././gotools/../libgo/go/cmd/go/alldocs.go ../.././gotools/../libgo/go/cmd/go/go11.go ../.././gotools/../libgo/go/cmd/go/main.go ../sparcv9-sun-solaris2.11/libgo/libgotool.a ../.././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 ...followed by many errors about import files (starting with 'context') not found. This is when trying to build GCC 11.2, but I had the same problem over many attempts to build GCC 11.1 a while ago. (I've gotten the same error when I get this far when trying to build on AIX/ppc64, but we'll just stay focused on Solaris here.) It must be possible to build gccgo support on this platform, because the latest Solaris 11.4 update includes it. With the gcc that is included in Solaris, I can run `gcc -v` and see: Configured with: /builds2/ulhg/mrcarson-trunk_111/components/gcc11/gcc-11.2.0/configure --prefix=/usr/gcc/11 --mandir=/usr/gcc/11/share/man --bindir=/usr/gcc/11/bin --sbindir=/usr/gcc/11/sbin --libdir=/usr/gcc/11/lib --infodir=/usr/gcc/11/share/info --libexecdir=/usr/gcc/11/lib --enable-languages=ada,c,c++,fortran,go,objc --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=/usr/gnu/bin/as --disable-bootstrap 'BOOT_CFLAGS=-g -O2' sparcv9-sun-solaris2.11 To try to build my own from scratch, I have done the following on Solaris 11.4.42.111.0: 1) build the latest gnu binutils and installed at prefix /opt/mrwgcc (building gcc w/ go seems to *require* objcopy be present) 2) renamed the binutils-provided "ld" to "gnuld" just to make sure it isn't picked up by anything in preference to the Solaris ld. (The GCC platform notes for Solaris recommend using the Solaris ld.) 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 Despite using what appear to be the same options (in particular, using the Solaris ld and not binutils ld) as the working gccgo that comes with Solaris, I can't get my build to work. I hit that "/context.o exists but does not contain any Go export data" error no matter what I try. A build with only --enable-languages=c,c++ works fine. I'm thinking there must be something else about my environment that differs from the package build environment, but I don't know what the magic needed to build gccgo is. If anyone has any suggestions, I'd appreciate them. Thanks, Matthew