From nobody Tue Apr 11 20:02:41 2023 X-Original-To: tcltk@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pwxb54ZGqz44TjR for ; Tue, 11 Apr 2023 20:02: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) 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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pwxb529TXz4L2f for ; Tue, 11 Apr 2023 20:02:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681243361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1kJa9/0g4Q9lP8sVOvRhCI3KCEGx8BUjsTpb5q2YWdg=; b=SXXjg/YQ8KGs4Dbn00p5e1y99O3OiOrQTqzemo0COgSirhqONRRHjEBul3jl2lAJWqYtNE 0zrQRKeohhK37+F6CDMduRlztw+lKbqvOxfHXDYdXEnG9hpeFsr+GtHKWjnk6+Pq6Oa9d7 3+wZxhg7qZEjkhZAfC6ACxXAEthpnPk0Csivn5Fflf+qVf5/Bj4XD5/zO7KLnd/87Gb9v/ qxN1iTVmemd9x2CYyGJqW6US0quLSu4AVhN3xZUr/30oj+rRlkshl2v08q+ICbGgCa6gKj L6iEhMtDA7e2hJwQO4wXiHow2gBYGfAbvsbRPhAWMsR3pmjSaBPANUh5FxGX2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681243361; a=rsa-sha256; cv=none; b=aIt4ASaeKKsUTRTvyX5zQk7AC/3Q9j2ha/UC1OKX0DHR+cnRi8Com8ItKUzuXhx3y5LqZO uY6mu8qPVMjpy8yywdPFuG2s9BFYo7e/Yzkezb3Wo8UeCDc/hHXtWi3aVR1EJCFgO/HOD4 2vk3+3AiZtZr+3kwDLsJ6pODZnvL/vLVUJ9ass6SZ6NcDGajO2SqrtlXJyXe1vfi2CP6Bv lINkWMCm1hLhMVYJ6OtSdRQ65H4O8fg7AxKE6/AMRHB+LTKPn4cy4KmD7L75NYAZj6cqrd Q2vpbCmyJ8wDK3YoDpc1DSc1aKyBSPhxnxffY85ZW7fSTpZF5hwUSbufBAbkXw== 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 4Pwxb51H0rzWPp for ; Tue, 11 Apr 2023 20:02:41 +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 33BK2fHj061175 for ; Tue, 11 Apr 2023 20:02:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 33BK2fvr061174 for tcltk@FreeBSD.org; Tue, 11 Apr 2023 20:02:41 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: tcltk@FreeBSD.org Subject: maintainer-feedback requested: [Bug 270768] lang/tcl86: fails to build WITH_LLVM_BINUTILS (LLVM strip) Date: Tue, 11 Apr 2023 20:02:41 +0000 X-Bugzilla-Type: request 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: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: tcltk@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: FreeBSD-specific Tcl/Tk discussions List-Archive: https://lists.freebsd.org/archives/freebsd-tcltk List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-tcltk@freebsd.org X-BeenThere: freebsd-tcltk@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N Bugzilla Automation has asked freebsd-tcltk (Nobody) for maintainer-feedback: Bug 270768: lang/tcl86: fails to build WITH_LLVM_BINUTILS (LLVM strip) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270768 --- Description --- >From the exp-run in PR258872 https://pkg-status.freebsd.org/gohan05/data/mainamd64PR258872-default/2023-= 04-0 5_14h36m44s/logs/errors/tcl86-8.6.13.log =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Installing libtclstub86.a to /wrkdirs/usr/ports/lang/tcl86/work/stage/usr/local/lib/ strip: error: '/wrkdirs/usr/ports/lang/tcl86/work/stage/usr/local/lib/_inst.91375_': not stripping symbol '.L.str.1' because it is named in a relocation *** Error code 1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D error can be reproduced in isolation: # strip -o /dev/null -x tclStubLib.o=20 strip: error: 'tclStubLib.o': not stripping symbol '.L.str.1' because it is named in a relocation in this case .L.str.1 is a local symbol: # readelf -s tclStubLib.o=20 Symbol table '.symtab' contains 12 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND=20 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS tclStubLib.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 2 .text 3: 0000000000000031 4 OBJECT LOCAL DEFAULT 5 .L.str.1 4: 0000000000000000 49 OBJECT LOCAL DEFAULT 5 .L.str 5: 0000000000000000 475 FUNC GLOBAL HIDDEN 2 Tcl_InitStubs 6: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_guard 7: 0000000000000000 8 OBJECT GLOBAL HIDDEN 4 tclStubsPtr 8: 0000000000000008 8 OBJECT GLOBAL HIDDEN 4 tclPlatStubsPtr 9: 0000000000000010 8 OBJECT GLOBAL HIDDEN 4 tclIntStubsPtr 10: 0000000000000018 8 OBJECT GLOBAL HIDDEN 4 tclIntPlatStubsPtr 11: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND __stack_chk_fail tcl's build has asked to strip all non-global symbols (strip -x), but .L.st= r.1 is referenced by relocations: # readelf -r tclStubLib.o | grep .L.str.1 000000000000004e 0000000300000002 R_X86_64_PC32 0000000000000031 .L.str.1 - 4 00000000000000f3 0000000300000002 R_X86_64_PC32 0000000000000031 .L.str.1 - 4 0000000000000153 0000000300000002 R_X86_64_PC32 0000000000000031 .L.str.1 - 4 Both GNU strip and ELF Tool Chain strip silently handle this case (and just retain the local symbol), but LLVM strip is stricter and emits an error upon request to strip a non-removable local symbol. There is an LLVM ticket open for this at https://github.com/llvm/llvm-project/issues/47468. It may make sense for LL= VM strip to behave the same as GNU and ELF Tool Chain strip, but I think tcl should just not use strip -x when there are symbols that cannot be stripped= . My suggestion would be to just avoid stripping the .a altogether.