Skip to content

Undefined symbols for architecture x86_64: "_environ" #276

@Schamschula

Description

@Schamschula

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:

libtool: link: /usr/bin/clang -dynamiclib  -o .libs/sudo_intercept.so  .libs/exec_preload.o .libs/sudo_intercept.o .libs/sudo_intercept_common.o .libs/intercept.pb-c.o   -Wl,-force_load,../lib/protobuf-c/.libs/libprotobuf-c.a  -L/opt/local/lib ../lib/util/.libs/libsudo_util.dylib /opt/local/lib/libintl.dylib -lcrypto -ldl  -Wl,-headerpad_max_install_names -arch x86_64 -fstack-protector-all   -install_name  /opt/local/libexec/sudo/sudo_intercept.so  -Wl,-single_module
Undefined symbols for architecture x86_64:
  "_environ", referenced from:
      _my_system in sudo_intercept.o
      _my_execv in sudo_intercept.o
      _my_execvp in sudo_intercept.o
      _exec_wrapper in sudo_intercept.o
      _execl_wrapper in sudo_intercept.o
      _sudo_interposer_init in sudo_intercept_common.o
ld: symbol(s) not found for architecture x86_64

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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions