Bug 277712 - lang/tcl86: strip: error: ... not stripping symbol '.L.str.1' because it is named in a relocation
Summary: lang/tcl86: strip: error: ... not stripping symbol '.L.str.1' because it is n...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-tcltk (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-15 06:02 UTC by O. Hartmann
Modified: 2024-04-04 16:59 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (tcltk)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2024-03-15 06:02:24 UTC
Host is a recent CURRENT running a poudriere jail (also CURRENT as its host, FreeBSD 15.0-CURRENT #9 master-n268772-906521f8176: Wed Mar 13 06:22:59 CET 2024 amd64). Either on a 14.0-RELENG host and jail, 14-STABLE host and jail and on bare metal CURRENT host, port lang/tcl86 fails to compile due to the strip error shown below:

[...]
cc -O2 -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -pipe   -Wl,-z,muldefs -fstack-protector-strong  -Wl,--export-dynamic tclAppInit.o  -L/wrkdirs/usr/ports/lang/tcl86/work/tcl8.6.14/unix -ltcl86 libtclstub86.a -ldl -lz -lpthread -lm   "-Wl,-rpath,/usr/local/lib" -o tclsh
===========================================================================
=======================<phase: run-depends    >============================
===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0
===========================================================================
=======================<phase: stage          >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Staging for tcl86-8.6.14_1
===>   Generating temporary packing list
/usr/bin/make install-binaries install-msgs  install-headers    INSTALL_PROGRAM="STRIPPROG='strip' /bin/sh /wrkdirs/usr/ports/lang/tcl86/work/tcl8.6.14/unix/install-sh -c -s"  INSTALL_LIBRARY="STRIPPROG='strip -x' /bin/sh /wrkdirs/usr/ports/lang/tcl86/work/tcl8.6.14/unix/install-sh -c -s"
Making directory /wrkdirs/usr/ports/lang/tcl86/work/stage/usr/local/lib/tcl8.6
Installing libtcl86.so.1 to /wrkdirs/usr/ports/lang/tcl86/work/stage/usr/local/lib/
Installing libtcl86.a to /wrkdirs/usr/ports/lang/tcl86/work/stage/usr/local/lib
Installing tclsh as /wrkdirs/usr/ports/lang/tcl86/work/stage/usr/local/bin/tclsh8.6
Installing tclConfig.sh to /wrkdirs/usr/ports/lang/tcl86/work/stage/usr/local/lib/tcl8.6/
Installing tclooConfig.sh to /wrkdirs/usr/ports/lang/tcl86/work/stage/usr/local/lib/tcl8.6/
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.76732_': not stripping symbol '.L.str.1' because it is named in a relocation
*** Error code 1

Stop.
make[1]: stopped in /wrkdirs/usr/ports/lang/tcl86/work/tcl8.6.14/unix
*** Error code 1
Comment 1 O. Hartmann 2024-03-19 12:23:43 UTC
After digging the net I found some strange misbehaviours of llvm-objcopy regarding symbol in relocations.

A quick and dirty workaround of fixing this bugging problem is to replace the line

(replace this line)
INSTALL_TARGET=        install-strip install-libraries install-private-headers

(with)
INSTALL_TARGET= install install-libraries install-private-headers

leaving the objects unstripped.
Comment 2 Pietro Cerutti freebsd_committer freebsd_triage 2024-03-19 19:15:36 UTC
This sounds a lot like bug #270768. Can you please double check why the patch committed in the scope of that ticker doesn't fix this issue?
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-03-19 20:05:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=46238ef8139282444bd9723af21c18a036624bae

commit 46238ef8139282444bd9723af21c18a036624bae
Author:     Pietro Cerutti <gahr@FreeBSD.org>
AuthorDate: 2024-03-19 19:54:30 +0000
Commit:     Pietro Cerutti <gahr@FreeBSD.org>
CommitDate: 2024-03-19 20:04:53 +0000

    lang/tcl86, x11-toolkits/tk86: fix build with WITH_LLVM_BINUTILS (again)

    The patch committed in 4ef4b5 as part of PR 270768 was lost during the
    latest update.

    PR:             277712
    Reported by:    O. Hartmann (ohartmann@walstatt.org)

 lang/tcl86/Makefile                       |  2 +-
 lang/tcl86/files/patch-unix-Makefile.in   |  9 +++++++++
 x11-toolkits/tk86/files/patch-Makefile.in | 11 ++++++++++-
 3 files changed, 20 insertions(+), 2 deletions(-)
Comment 4 Pietro Cerutti freebsd_committer freebsd_triage 2024-03-19 20:08:00 UTC
My bad, the fix in bug #270768 was lost during the last update. Fixed again now.