From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1BE50386F457; Fri, 15 May 2020 06:50:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1BE50386F457 From: "xuchunmei at linux dot alibaba.com" To: systemtap@sourceware.org Subject: [Bug translator/25994] New: inproper order of PATH set cause wrong unexpected gcc used Date: Fri, 15 May 2020 06:50:13 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: xuchunmei at linux dot alibaba.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2020 06:50:14 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25994 Bug ID: 25994 Summary: inproper order of PATH set cause wrong unexpected gcc used Product: systemtap Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: translator Assignee: systemtap at sourceware dot org Reporter: xuchunmei at linux dot alibaba.com Target Milestone: --- Created attachment 12541 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D12541&action=3Ded= it add default "/usr/bin:/bin" after $PATH My use case is like this, I install gcc-4.8.5 and devtoolset-9-gcc, while I set the PATH by "source /opt/rh/devtoolset-9/enable" to use gcc-9, but when I use "stap test.stap", I always get compile errors for "gcc: error: unrecognized command line option =E2=80=98-fpatchable-function-entry=3D2=E2=80=99", the option =E2=80=98-fpatchable-function-entry=3D2=E2=80=99 is not supported by gcc-4.= 8.5 but supported by gcc-9. The stap process building always use gcc-4.8.5 from /usr/bin not from the first path of PATH, such as /opt/rh/devtoolset-9/root/usr/bin/gcc. As I think the default /usr/bin:/bin should be added after $PATH. I add an attachment to fix it, please have a review. --=20 You are receiving this mail because: You are the assignee for the bug.=