Bug 234845 - multimedia/mplayer: fails to properly link with lld
Summary: multimedia/mplayer: fails to properly link with lld
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-01-11 07:39 UTC by Gleb Smirnoff
Modified: 2019-01-19 17:47 UTC (History)
0 users

See Also:
riggs: maintainer-feedback+


Attachments
use GNU ld (370 bytes, patch)
2019-01-11 07:39 UTC, Gleb Smirnoff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:

>mplayer 
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

Log:
  Workaround a hopefully transient linker problem on head

  PR:		234845
  Reported by:	glebius

Changes:
  head/multimedia/mencoder/Makefile
  head/multimedia/mplayer/Makefile
  head/multimedia/mplayer/Makefile.options