Bug 234845

Summary: multimedia/mplayer: fails to properly link with lld
Product: Ports & Packages Reporter: Gleb Smirnoff <glebius>
Component: Individual Port(s)Assignee: Thomas Zander <riggs>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: needs-qa, patch
Priority: --- Flags: riggs: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
use GNU ld none

Description Gleb Smirnoff freebsd_committer 2019-01-11 07:39:58 UTC
Created attachment 201013 [details]
use GNU ld

This is not a dup of 234836! Probably the problem shows up only on head and amd64?

Port successfully builds, but binary isn't working:

ld-elf.so.1: /usr/local/lib/libglib-2.0.so.0: Undefined symbol "environ"

The problem is that glib indeed uses this symbol, but the symbol isn't in libc or any other library. It resides in crt1.o, and should be left in the binary if any of the libraries the binary is linked against uses it. However, due to bug in lld this doesn't happen.

A workaround is to use GNU ld.
Comment 1 Thomas Zander freebsd_committer 2019-01-11 17:20:59 UTC
This happens on amd64? Let me double-check ...
Comment 2 Thomas Zander freebsd_committer 2019-01-13 14:54:15 UTC
Can you also reproduce this problem on stable/12 amd64?
Comment 3 Gleb Smirnoff freebsd_committer 2019-01-14 16:54:09 UTC
I can't. Don't have any stable installations. However, I can confirm that problem exist on all of my head installations :)
You can try binary from the official pkg repo - it also is broken.
Comment 4 commit-hook freebsd_committer 2019-01-19 17:46:03 UTC
A commit references this bug:

Author: riggs
Date: Sat Jan 19 17:45:15 UTC 2019
New revision: 490727
URL: https://svnweb.freebsd.org/changeset/ports/490727

  Workaround a hopefully transient linker problem on head

  PR:		234845
  Reported by:	glebius