Closed Schamschula closed 1 year ago
I don't know of any code changes that would have caused this but in 1.9.14 the -no-undefined
libtool flag is used on darwin. Perhaps that is causing the problem.
No such problem on newer versions of macOS, even with this flag.
Can you try backing out ae12d18ff04c3b242c2790a937659cfd68649947 to see if that makes a difference? I don't have access macOS versions that old.
Just for the record. My patch is only for macOS. The header file doesn't exist for other Apple OSs, e.g. iOS.
See: https://bug-gnulib.gnu.narkive.com/3IFzYnBv/environ-on-macos-x
I personally don't have access to older versions of macOS. MacPorts GitHub CI only supports macOS 11 - 13.
It turns out I had an old macOS 10.6.8 hackintosh in the closet. I was able to reproduce the problem and verified that backing out https://github.com/sudo-project/sudo/commit/ae12d18ff04c3b242c2790a937659cfd68649947 avoids the issue.
In other words https://github.com/sudo-project/sudo/commit/ae12d18ff04c3b242c2790a937659cfd68649947 could be modified to only apply to darwin 12 and above.
Yes, exactly.
Perhaps a form of my patch might be a better solution, as it defines _environ
for older macOS versions.
Yes, the patch is needed to be able to actually use intercept mode and log_subcmds. The -no-undefined
turns a run-time error into a link-time error so that is working as intended.
Thanks!
After the update to sudo 1.9.14 the MacPorts build bots found the following build error for macOS 10.6 (i386 and x86_64) and 10.7:
I worked around this with
https://github.com/macports/macports-ports/blob/master/sysutils/sudo/files/patch-environ.diff
However, I couldn't find any change between 1.9.13p3 and 1.9.14 to cause this issue, as 1.9.13p3 built cleanly on this platforms.
See: https://ports.macports.org/port/sudo/builds/