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.
This happens on amd64? Let me double-check ...
Can you also reproduce this problem on stable/12 amd64?
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.
A commit references this bug:
Date: Sat Jan 19 17:45:15 UTC 2019
New revision: 490727
Workaround a hopefully transient linker problem on head
Reported by: glebius