From owner-freebsd-ports-bugs@freebsd.org Mon Mar 9 04:21:42 2020 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B7BF256F68 for ; Mon, 9 Mar 2020 04:21:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48bQ5x3mwvz42vP for ; Mon, 9 Mar 2020 04:21:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 11539256F67; Mon, 9 Mar 2020 04:21:41 +0000 (UTC) Delivered-To: ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0916F256F65 for ; Mon, 9 Mar 2020 04:21:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48bQ5v5L7qz42t0 for ; Mon, 9 Mar 2020 04:21:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8528453E7 for ; Mon, 9 Mar 2020 04:21:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 0294Ld4Y084347 for ; Mon, 9 Mar 2020 04:21:39 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0294Ld5u084256 for ports-bugs@FreeBSD.org; Mon, 9 Mar 2020 04:21:39 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 214404] base/gcc: and base/binutils -r424540 for TARGET_ARCH=powerpc64 example: file placement and gcc/g++ internal file lookups do not match so gcc/g++ do not work Date: Mon, 09 Mar 2020 04:21:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2020 04:21:42 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214404 --- Comment #4 from Mark Millard --- (In reply to Steve Wills from comment #1) To test I used a chroot and I did "make package" for base/gcc6 and then installed it (inside the chroot). This was without involving base/binutils before or after that. It did involve: # make build-depends-list /usr/ports/ports-mgmt/pkg /usr/ports/devel/gmake /usr/ports/print/texinfo and what they indirectly require. (The run-depends-list was empty.) So, for example, the system linker is lld for this powerpc64 context. The result of attempting to compile/link main.c was: # cc -std=3Dc99 -pedantic main.c ld: error: unable to find library -lgcc ld: error: unable to find library -lgcc_s ld: error: unable to find library -lc ld: error: unable to find library -lgcc ld: error: unable to find library -lgcc_s collect2: error: ld returned 1 exit status The linker ld (really lld) is found and used but other things are not. So: # truss -a -f -o output cc -std=3Dc99 -pedantic main.c ld: error: unable to find library -lgcc ld: error: unable to find library -lgcc_s ld: error: unable to find library -lc ld: error: unable to find library -lgcc ld: error: unable to find library -lgcc_s collect2: error: ld returned 1 exit status And using libgcc_s as an example: # grep libgcc_s output | more 96678: open("/lib/libgcc_s.so.1",O_RDONLY|O_CLOEXEC|O_VERIFY,02005070032) = =3D 3 (0x3) 96679: open("/lib/libgcc_s.so.1",O_RDONLY|O_CLOEXEC|O_VERIFY,02114270032) = =3D 3 (0x3) 96681: open("/lib/libgcc_s.so.1",O_RDONLY|O_CLOEXEC|O_VERIFY,02003670032) = =3D 3 (0x3) 96682: open("/lib/libgcc_s.so.1",O_RDONLY|O_CLOEXEC|O_VERIFY,02171470032) = =3D 3 (0x3) 96682: access("/usr/lib/gcc/powerpc64-unknown-freebsd13.0/6.5.0/libgcc_s.so",F_OK) ERR#2 'No such file or directory' 96682: access("/usr/lib/gcc/powerpc64-unknown-freebsd13.0/6.5.0/libgcc_s.a",F_OK) ERR#2 'No such file or directory' 96682: access("/usr/lib/gcc/powerpc64-unknown-freebsd13.0/6.5.0/libgcc_s.so",F_OK) ERR#2 'No such file or directory' 96682: access("/usr/lib/gcc/powerpc64-unknown-freebsd13.0/6.5.0/libgcc_s.a",F_OK) ERR#2 'No such file or directory' It turns out that: 96679 is for: "/usr/libexec/gcc/powerpc64-unknown-freebsd13.0/6.5.0/cc1", "-quiet", "main= .c", "-quiet", "-dumpbase", "main.c", "-auxbase", "main", "-Wpedantic", "-std=3D= c99", "-o", "/tmp//cczJu591.s" 96681 is for: "/usr/libexec/gcc/powerpc64-unknown-freebsd13.0/6.5.0/collect2", "--sysroot= =3D/", "--eh-frame-hdr", "-melf64ppc_fbsd", "-dynamic-linker", "/libexec/ld-elf.so= .1", "/usr/lib/crt1.o", "/usr/lib/crti.o", "/usr/lib/crtbegin.o", "-L/usr/lib/gcc/powerpc64-unknown-freebsd13.0/6.5.0", "/tmp//ccabilZp.o", "-lgcc", "--as-needed", "-lgcc_s", "--no-as-needed", "-lc", "-lgcc", "--as-needed", "-lgcc_s", "--no-as-needed", "/usr/lib/crtend.o", "/usr/lib/crtn.o" Note the -L/usr/lib/gcc/powerpc64-unknown-freebsd13.0/6.5.0 Note the lack of some form of -L/lib 96682 is for: "/usr/bin/ld", "--sysroot=3D/", "--eh-frame-hdr", "-melf64ppc_fbsd", "-dynamic-linker", "/libexec/ld-elf.so.1", "/usr/lib/crt1.o", "/usr/lib/crti.o", "/usr/lib/crtbegin.o", "-L/usr/lib/gcc/powerpc64-unknown-freebsd13.0/6.5.0", "/tmp//ccabilZp.o", "-lgcc", "--as-needed", "-lgcc_s", "--no-as-needed", "-lc", "-lgcc", "--as-needed", "-lgcc_s", "--no-as-needed", "/usr/lib/crtend.o", "/usr/lib/crtn.o" Note the -L/usr/lib/gcc/powerpc64-unknown-freebsd13.0/6.5.0 Note the lack of some form of -L/lib Note that: 96682: open("/lib/libgcc_s.so.1",O_RDONLY|O_CLOEXEC|O_VERIFY,02171470032) = =3D 3 (0x3) is for lld itself being bound to the library, not for the linking of main. The linker (lld) is looking in the wrong places for various libraries --but based on what it has been told on its command line. For reference: # find /lib*/ /usr/lib*/ -name "libgcc_s*" -print | more /lib/libgcc_s.so.1 /usr/lib/debug/lib/libgcc_s.so.1.debug /usr/lib/debug/usr/lib32/libgcc_s.so.1.debug /usr/lib/libgcc_s.so /usr/lib32/libgcc_s.so.1 /usr/lib32/libgcc_s.so Context notes: The context is head -r538510 based, with ports based on -r526539 . --=20 You are receiving this mail because: You are the assignee for the bug.=