[MacPorts] #71814: micronucleus @2.5: Undefined symbols _SecTaskCopyValueForEntitlement, _SecTaskCreateFromSelf
MacPorts
noreply at macports.org
Sat Jan 11 04:07:26 UTC 2025
#71814: micronucleus @2.5: Undefined symbols _SecTaskCopyValueForEntitlement,
_SecTaskCreateFromSelf
------------------------+--------------------------
Reporter: ryandesign | Owner: mdholling@…
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.10.5
Keywords: sonoma | Port: micronucleus
------------------------+--------------------------
micronucleus @2.5 doesn't build:
https://build.macports.org/builders/ports-
14_x86_64-builder/builds/55332/steps/install-port/logs/stdio
{{{
Building command line tool: micronucleus...
gcc -I/opt/local/include -Ilibrary -O -g -D MAC_OS -o micronucleus
micronucleus.c micronucleus_lib.o littleWire_util.o
/opt/local/lib/libusb.a /opt/local/lib/libusb-1.0.a -framework
CoreFoundation -framework IOKit
Undefined symbols for architecture x86_64:
"_SecTaskCopyValueForEntitlement", referenced from:
_darwin_detach_kernel_driver in libusb-1.0.a[10](darwin_usb.o)
"_SecTaskCreateFromSelf", referenced from:
_darwin_detach_kernel_driver in libusb-1.0.a[10](darwin_usb.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [micronucleus] Error 1
}}}
I think these symbols are part of the security framework but `-framework
Security` is missing from the link line.
In fact I think this error is caused by the build using the libusb static
libraries. When you use a static library, you need to also link with all
of the libraries that that static library uses; in this case,
[https://github.com/libusb/libusb/blob/de38189e8014fa393f4d8c1d9d3fdf5e2a95899d/libusb/os/darwin_usb.c#L2784-L2790
libusb uses the security framework].
The solution should be to switch to linking with the dynamic libraries
instead of the static libraries.
The Makefile contains some Homebrew-specific nonsense that may need to be
patched out. Or it may just be what happens when pkg-config is not found;
a build dependency on `path:bin/pkg-config:pkgconfig` would need to be
added to the port.
Since this will change installed files, this will require increasing the
port's revision (unless combined with a [ticket:71813 version update]).
--
Ticket URL: <https://trac.macports.org/ticket/71814>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list