-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Open
Labels
A-dynamic-libraryArea: Dynamic/Shared LibrariesArea: Dynamic/Shared LibrariesA-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesA-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-bugCategory: This is a bug.Category: This is a bug.O-freebsdOperating system: FreeBSDOperating system: FreeBSDT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
On FreeBSD the extern char** environ symbol is defined in the CRT rather than libc. This is known to cause linking problems for shared libraries when the linker is passed --no-undefined. The usual workaround for this issue is to resolve environ dynamically as suggested in https://reviews.freebsd.org/D30842#840642 I already pushed such a fix into LLVM and some other projects.
I've put up a minimal reproduction code at https://github.com/arrowd/rust-environ-problem Simply run make to get the linking error.
CC @asomers
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-dynamic-libraryArea: Dynamic/Shared LibrariesArea: Dynamic/Shared LibrariesA-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesA-processArea: `std::process` and `std::env`Area: `std::process` and `std::env`C-bugCategory: This is a bug.Category: This is a bug.O-freebsdOperating system: FreeBSDOperating system: FreeBSDT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.