[MacPorts] #63875: mysql8 @8.0.27_0: Undefined symbols "_xdr_sizeof"

MacPorts noreply at macports.org
Thu Nov 11 13:44:47 UTC 2021


#63875: mysql8 @8.0.27_0: Undefined symbols "_xdr_sizeof"
---------------------------+-------------------------
  Reporter:  chrstphrchvz  |      Owner:  herbygillot
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.7.1
Resolution:                |   Keywords:
      Port:  mysql8        |
---------------------------+-------------------------

Comment (by chrstphrchvz):

 Using a test program on 10.13 with Xcode clang 1000.11.45.5 (Xcode 10.1
 command line tools), it links to libsystem_info.dylib.

 {{{#!c
 #include <stdio.h>
 #include <signal.h>
 #include <rpc/types.h>
 #include <rpc/xdr.h>

 extern u_long xdr_sizeof(xdrproc_t, void *);

 int main(void) {
         //raise(SIGINT);
         printf("%p\n", xdr_sizeof);
 }
 }}}

 prints `0x7fff58f66840`, corresponding to:

 {{{
 (lldb) image lookup -va 0x7fff58f66840
       Address: libsystem_info.dylib[0x0000000000042840]
 (libsystem_info.dylib.__TEXT.__text + 267856)
       Summary: libsystem_info.dylib`xdr_sizeof
        Module: file = "/usr/lib/system/libsystem_info.dylib", arch =
 "x86_64"
        Symbol: id = {0x00000460}, range =
 [0x00007fff58f66840-0x00007fff58f66960), name="xdr_sizeof"
 }}}

 I don’t have ready access to macOS 10.14, but I’m inclined to think that
 libsystem_info.dylib on 10.14 is what dropped `xdr_sizeof()` (I don’t know
 why—the [https://opensource.apple.com/source/Libinfo/ source code for
 Libinfo on opensource.apple.com] continues to contain an `xdr_sizeof()`
 implementation in rpc.subproj/xdr_sizeof.c, so my guess is that it no
 longer being compiled), and that the installed Xcode clang version is not
 a factor.

 This would mean the problem is that `CMAKE_C_COMPILER_VERSION` is not what
 MySQL should be checking (such usage probably also assumes Xcode clang
 versioning and not LLVM clang versioning) to determine `xdr_sizeof()`
 availability; it should instead just check the macOS version
 (`CMAKE_OSX_DEPLOYMENT_TARGET`, I think).

-- 
Ticket URL: <https://trac.macports.org/ticket/63875#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list