From owner-freebsd-bugs@freebsd.org Mon Sep 28 05:26:24 2020 Return-Path: Delivered-To: freebsd-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 C5E553F6EBA for ; Mon, 28 Sep 2020 05:26:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4C09ww4vlpz3d5L for ; Mon, 28 Sep 2020 05:26:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id A876F3F6E65; Mon, 28 Sep 2020 05:26:24 +0000 (UTC) Delivered-To: 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 A84113F6EB9 for ; Mon, 28 Sep 2020 05:26:24 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4C09ww42hcz3dLk for ; Mon, 28 Sep 2020 05:26:24 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F62218A5C for ; Mon, 28 Sep 2020 05:26:24 +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 08S5QOg8019948 for ; Mon, 28 Sep 2020 05:26:24 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 08S5QOhx019947 for bugs@FreeBSD.org; Mon, 28 Sep 2020 05:26:24 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: bugs@FreeBSD.org Subject: [Bug 249951] installworld results bad symbolic links to libraries and non-root users get link error like -lgcc_s Date: Mon, 28 Sep 2020 05:26:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ota@j.email.ne.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: 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-bugs@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2020 05:26:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D249951 Bug ID: 249951 Summary: installworld results bad symbolic links to libraries and non-root users get link error like -lgcc_s Product: Base System Version: 11.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: ota@j.email.ne.jp After running installworld, non-root users cannot properly read symbolic li= nks from /usr/lib and causing link error like not finding -lgcc_s library. Root user can link a program without a problem while all others fails to li= nk. I have / and /usr separate mount points. After each installworld, I need to run the following to adjust symbolic lin= ks: cd /usr/lib ls -l *.so | nawk '$NF ~ /..\/..\/lib/{cmd=3D"ln -sf " substr($NF, 6) " " $(NF-2);system(cmd)}' These are the commands to expose errors and comparison between a root user = and non-root user. % is command as my own user account. $ is the root user. % uname -a FreeBSD XXX 12.2-BETA2 FreeBSD 12.2-BETA2 #348 r365986M: Sat Sep 19 14:36:23 EDT 2020 hiro@XXX:/usr/obj/usr/src/i386.i386/sys/ZFS i386 % cd /tmp % cat main.c=20 int main() { return 0; } % cc main.c=20 ld: error: unable to find library -lgcc_s ld: error: unable to find library -lgcc_s cc: error: linker command failed with exit code 1 (use -v to see invocation) % c++ main.c=20 c++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated] ld: error: cannot open /usr/lib/libcxxrt.so: Permission denied ld: error: unable to find library -lgcc_s ld: error: unable to find library -lgcc_s c++: error: linker command failed with exit code 1 (use -v to see invocatio= n) % ls -lsd /usr/lib/libcxxrt.so=20 0 lrwxr-xr-x 1 root wheel 23 Sep 21 23:27 /usr/lib/libcxxrt.so -> ../../lib/libcxxrt.so.1 % ls -lsd /lib/libcxxrt.so.1 90 -r--r--r-- 1 root wheel 90644 Sep 21 23:27 /lib/libcxxrt.so.1 % mount /dev/ada0s4a on / (ufs, local, soft-updates) devfs on /dev (devfs, local, multilabel) /dev/ada0s4d on /usr (ufs, local, noatime, soft-updates) /dev/ada0s4e on /usr/local (ufs, local, noatime, soft-updates) $ cc main.c $ ./a.out $ I had run the re-link program from comment above. % ls -lsd /usr/lib/libcxxrt.so /lib/libcxxrt.so.1 90 -r--r--r-- 1 root wheel 90644 Sep 21 23:27 /lib/libcxxrt.so.1 0 lrwxr-xr-x 1 root wheel 23 Sep 21 23:27 /usr/lib/libcxxrt.so -> ../../lib/libcxxrt.so.1 % ls -lsd /usr/lib/libcxxrt.so /lib/libcxxrt.so.1 90 -r--r--r-- 1 root wheel 90644 Sep 21 23:27 /lib/libcxxrt.so.1 0 lrwxr-xr-x 1 root wheel 18 Sep 22 22:58 /usr/lib/libcxxrt.so -> /lib/libcxxrt.so.1 % cc main.c=20 % ./a.out=20 % --=20 You are receiving this mail because: You are the assignee for the bug.=