[MacPorts] #68409: libgit2 @1.7.1: Undefined symbols _libiconv _libiconv_close _libiconv_open

MacPorts noreply at macports.org
Tue Oct 10 07:23:13 UTC 2023


#68409: libgit2 @1.7.1: Undefined symbols _libiconv _libiconv_close _libiconv_open
-----------------------+---------------------------
  Reporter:  jrabinow  |      Owner:  (none)
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.8.1
Resolution:            |   Keywords:  sonoma, arm64
      Port:  libgit2   |
-----------------------+---------------------------

Comment (by jrabinow):

 Going through the issues you linked to:
 https://stackoverflow.com/a/57734435 this suggests that it's not (just)
 finding the wrong `FindIconv.cmake` but finding the wrong libiconv.dylib.
 Could the opportunistic linking to gssapi you brought up earlier be a clue
 there's opportunistic linking to the first libiconv.dylib that comes
 along?

 (side note, I just got bitten by GNU find
 https://superuser.com/q/1679798):
 {{{
 $ fd '.*iconv\..*' /
 /Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS
 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libiconv.2.dylib
 /Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS
 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libiconv.dylib
 /Users/user/Library/Developer/Xcode/iOS DeviceSupport/16.5.1 (20F75)
 arm64e/Symbols/usr/lib/libiconv.2.dylib
 /Users/user/Library/Developer/Xcode/iOS DeviceSupport/16.2 (20C65)
 arm64e/Symbols/usr/lib/libiconv.2.dylib
 /System/Volumes/Data/Users/user/Library/Developer/Xcode/iOS
 DeviceSupport/16.5.1 (20F75) arm64e/Symbols/usr/lib/libiconv.2.dylib
 /System/Volumes/Data/Users/user/Library/Developer/Xcode/iOS
 DeviceSupport/16.2 (20C65) arm64e/Symbols/usr/lib/libiconv.2.dylib
 /System/Volumes/Data/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS
 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libiconv.dylib
 /System/Volumes/Data/Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS
 17.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libiconv.2.dylib
 /System/Volumes/Data/opt/local/lib/libiconv.dylib
 /System/Volumes/Data/opt/local/lib/libiconv.2.dylib
 /opt/local/lib/libiconv.dylib
 /opt/local/lib/libiconv.2.dylib
 }}}
 None of these look like good candidates. If there was a libiconv.dylib
 under `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk` or
 `/usr/{local/,}lib/` that would have been an interesting find. Then again,
 my system is the one with the failing build so it makes sense there's no
 other good candidate.

 I can't do the following experiment on my system since it will only use
 the libiconv under my `/opt/local`, but I'd be curious what `otool -L
 /opt/local/lib/libgit2.1.7.1.dylib` says after a clean build on your
 machine. Or if you renamed `/opt/local/lib/libiconv*` to something else,
 does macports libgit2 still build?
 Word of caution if you choose to run the rename experiment: anything
 linked to libiconv will be unable to run, and it's a dependency for a lot
 of things potentially including the shell, GNU coreutils binaries and
 terminal multiplexers.

 > https://github.com/libgit2/libgit2/issues/6644

 Many thanks for digging and for putting it all together.

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


More information about the macports-tickets mailing list