Bug 235957 - multimedia/mplayer fails after clang 7 import to 12-STABLE ld-elf.so.1: /lib/libc.so.7: Undefined symbol "__progname"
Summary: multimedia/mplayer fails after clang 7 import to 12-STABLE ld-elf.so.1: /lib/...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thomas Zander
URL:
Keywords: needs-qa, patch
Depends on:
Blocks:
 
Reported: 2019-02-23 10:22 UTC by jakub_lach
Modified: 2019-02-24 18:06 UTC (History)
1 user (show)

See Also:
riggs: maintainer-feedback+


Attachments
Fix for lld (2.18 KB, patch)
2019-02-23 17:27 UTC, Thomas Zander
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jakub_lach 2019-02-23 10:22:05 UTC
I'm on FreeBSD 12.0-STABLE #0 r344261 amd64, after clang 7 import to base, I've rebuilt all ports, successfully, mplayer fails to run though.

$ mplayer                                                               
ld-elf.so.1: /lib/libc.so.7: Undefined symbol "__progname"
Comment 1 Thomas Zander freebsd_committer freebsd_triage 2019-02-23 16:19:35 UTC
Setting LLD_UNSAFE=yes resolves the issue?
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2019-02-23 16:25:19 UTC
See bug 220103, and apply the diff from there.

*** This bug has been marked as a duplicate of bug 220103 ***
Comment 3 jakub_lach 2019-02-23 16:45:08 UTC
(In reply to Thomas Zander from comment #1)

Yes. Thanks for replies.
Comment 4 Thomas Zander freebsd_committer freebsd_triage 2019-02-23 17:26:56 UTC
Let me track this here for the moment.
Comment 5 Thomas Zander freebsd_committer freebsd_triage 2019-02-23 17:27:38 UTC
Created attachment 202293 [details]
Fix for lld
Comment 6 Thomas Zander freebsd_committer freebsd_triage 2019-02-23 17:28:46 UTC
(In reply to Thomas Zander from comment #5)

Jakub, could you quickly double check attachment 202293 [details] ? Thanks in advance!
Comment 7 Dimitry Andric freebsd_committer freebsd_triage 2019-02-23 17:45:35 UTC
Ah, I had something similar lined up, but using ${RM}:

Index: multimedia/mplayer/Makefile.common
===================================================================
--- multimedia/mplayer/Makefile.common	(revision 493710)
+++ multimedia/mplayer/Makefile.common	(working copy)
@@ -72,3 +72,4 @@ common-post-patch:
 		's|/usr/\\:local/\\:etc/\\:mplayer|${DATADIR:S/\//\/\\\:/g}|g ; \
 		 s|/dev/\\:(dvd[[:alnum:]]*[[:>:]])|${DEFAULT_DVD_DEVICE:S/dev\//dev\/\\\:/}|g ; \
 		 s|/dev/\\:(cdrom[[:alnum:]]*[[:>:]])|${DEFAULT_CDROM_DEVICE:S/dev\//dev\/\\\:/}|g'
+	@${RM} ${WRKSRC}/binary.ver
Index: multimedia/mplayer/Makefile.options
===================================================================
--- multimedia/mplayer/Makefile.options	(revision 493710)
+++ multimedia/mplayer/Makefile.options	(working copy)
@@ -53,10 +53,6 @@ CFLAGS_armv7+=	-no-integrated-as

 LDFLAGS_i386+=	-Wl,-z,notext

-.if ${OSVERSION} >= 1300000 #Hopefully transient linker issue on head
-LLD_UNSAFE=	yes
-.endif
-
 # Extra build options for debugging
 # =================================


but if you prefer to use a patch file, it will work too.
Comment 8 jakub_lach 2019-02-24 03:58:00 UTC
(In reply to Thomas Zander from comment #6)

Works fine, sorry for some delay, was afk.
Comment 9 commit-hook freebsd_committer freebsd_triage 2019-02-24 17:58:23 UTC
A commit references this bug:

Author: riggs
Date: Sun Feb 24 17:57:38 UTC 2019
New revision: 493791
URL: https://svnweb.freebsd.org/changeset/ports/493791

Log:
  Fix linking error with lld 7

  Details:
  - The linker script in mplayer's WRKSRC causes linking problems when
    used with lld 7. Remove it during post-patch

  PR:		235957, 220103
  Reported by:	jakub_lach@mailplus.pl, dim
  Reviewed by:	dim
  MFH:		2019Q1

Changes:
  head/multimedia/mencoder/Makefile
  head/multimedia/mplayer/Makefile
  head/multimedia/mplayer/Makefile.common
  head/multimedia/mplayer/Makefile.options
Comment 10 commit-hook freebsd_committer freebsd_triage 2019-02-24 18:02:38 UTC
A commit references this bug:

Author: riggs
Date: Sun Feb 24 18:02:17 UTC 2019
New revision: 493792
URL: https://svnweb.freebsd.org/changeset/ports/493792

Log:
  MFH: r493791

  Fix linking error with lld 7

  Details:
  - The linker script in mplayer's WRKSRC causes linking problems when
    used with lld 7. Remove it during post-patch

  PR:		235957, 220103
  Reported by:	jakub_lach@mailplus.pl, dim
  Reviewed by:	dim

  Approved by:	ports-secteam (riggs)

Changes:
_U  branches/2019Q1/
  branches/2019Q1/multimedia/mencoder/Makefile
  branches/2019Q1/multimedia/mplayer/Makefile
  branches/2019Q1/multimedia/mplayer/Makefile.common
  branches/2019Q1/multimedia/mplayer/Makefile.options
Comment 11 Thomas Zander freebsd_committer freebsd_triage 2019-02-24 18:06:18 UTC
(In reply to Dimitry Andric from comment #7)

Your solution is simpler, this is clearly preferred over needlessly complicated linker magic. Happily adopted, thanks!