[Bug 263265] The port audio/dexed fails to build: error: undefined symbol: environ

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 13 Apr 2022 20:51:26 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263265

--- Comment #2 from Dimitry Andric <dim@FreeBSD.org> ---
It looks like Dexed.so is being linked with -Wl,--no-undefined. So then the
linker will complain about undefined symbols, of which environ is a special
case. (I think it's supposed to be filled in by rtld at runtime.)

If I remove -Wl,--no-undefined, the program links just fine. I can't really say
anything about what happens at runtime though. :)

In any case, there are two places in dexed where environ is used:

1) libs/JUCE/modules/juce_core/native/juce_linux_Files.cpp retrieves environ,
then passes it unmodified to execve(2). It could simply use execv(3) instead,
then it would not have to mess with environ at all.

2) libs/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11fileselector.cpp is using
environ for a hand-rolled way of removing LD_LIBRARY_PATH from the environment
before forking. It would be much easier and safer if it used unsetenv(3)
instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.