Skip to content

ld: Undefined symbols: _libiconv _libiconv_close _libiconv_open #6644

@ryandesign

Description

@ryandesign

I'm a MacPorts developer, and a user reported to us that libgit2 failed to build with undefined libiconv symbols. In fact they reported it twice: once eight months ago, and we closed it because we could not reproduce the issue and because by then we were providing precompiled binaries of libgit2 for that OS version, and again today where I've now done some more investigation.

Comparing the user's failed builds with successful builds on my computer and our automated build system, the successful builds have this to say about libiconv:

-- Looking for iconv_open
-- Looking for iconv_open - not found
-- Found Iconv: -L/opt/local/lib -liconv

This output appears to be coming from the FindIconv.cmake file included with libgit2. This causes the variables ICONV_INCLUDE_DIR and ICONV_LIBRARIES to be defined. Elsewhere, in CMakeLists.txt, libgit2 appends these variables to LIBGIT2_SYSTEM_INCLUDES, LIBGIT2_SYSTEM_LIBS, and LIBGIT2_PC_LIBS, which result in -L/opt/local/lib -liconv being passed to the linker at link time, and everything works.

libgit2/src/CMakeLists.txt

Lines 189 to 194 in 4939fa7

if(ICONV_FOUND)
set(GIT_USE_ICONV 1)
list(APPEND LIBGIT2_SYSTEM_INCLUDES ${ICONV_INCLUDE_DIR})
list(APPEND LIBGIT2_SYSTEM_LIBS ${ICONV_LIBRARIES})
list(APPEND LIBGIT2_PC_LIBS ${ICONV_LIBRARIES})
endif()

The failed builds have this to say:

-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Failed
-- Found Iconv: /opt/local/lib/libiconv.dylib (found version "1.17") 

This output appears to be coming from the FindIconv.cmake file installed as part of CMake. That version of FindIconv.cmake is completely different. It does not set the variables ICONV_INCLUDE_DIR and ICONV_LIBRARIES that libgit2 is expecting. Instead, it sets Iconv_INCLUDE_DIRS and Iconv_LIBRARIES which libgit2 does not use. libgit2 still understands that libiconv has been found, but because the expected variable was not filled with anything, no flag is used to try to link with libiconv at link time, hence of course the build fails when the libiconv symbols aren't found anywhere.

I see two possible solutions:

  1. Somehow convince CMake to always use the libgit2 copy of FindIconv.cmake. I don't know how to do that, or why on most systems that already happens.
  2. Delete the libgit2 copy of FindIconv.cmake so that the CMake copy always gets used and adjust the libgit2 CMakeLists.txt to match the different variable names and other differences in the CMake copy of FindIconv.cmake. This is the option I would suggest, unless the bundled copy is thought to be superior to the CMake copy in some way.

Reproduction steps

Unknown. For some users, a build from source succeeds; for others, it fails with the error.

Expected behavior

successful build

Actual behavior

/usr/bin/clang -D_GNU_SOURCE -pipe -Os -DNDEBUG -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -Werror -Wno-error -Wall -Wextra -fvisibility=hidden -fPIC -Wdocumentation -Wno-documentation-deprecated-sync -Wno-missing-field-initializers -Wmissing-declarations -Wstrict-aliasing -Wstrict-prototypes -Wdeclaration-after-statement -Wshift-count-overflow -Wunused-const-variable -Wunused-function -Wint-conversion -Wc11-extensions -Wformat -Wformat-security -O2 -g -DNDEBUG -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-min=14.0 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk CMakeFiles/libgit2_tests.dir/__/clar/clar.c.o CMakeFiles/libgit2_tests.dir/__/clar/clar_libgit2.c.o CMakeFiles/libgit2_tests.dir/__/clar/clar_libgit2_alloc.c.o CMakeFiles/libgit2_tests.dir/__/clar/clar_libgit2_timer.c.o CMakeFiles/libgit2_tests.dir/__/clar/clar_libgit2_trace.c.o CMakeFiles/libgit2_tests.dir/__/clar/main.c.o CMakeFiles/libgit2_tests.dir/apply/apply_helpers.c.o CMakeFiles/libgit2_tests.dir/apply/both.c.o CMakeFiles/libgit2_tests.dir/apply/callbacks.c.o CMakeFiles/libgit2_tests.dir/apply/check.c.o CMakeFiles/libgit2_tests.dir/apply/fromdiff.c.o CMakeFiles/libgit2_tests.dir/apply/fromfile.c.o CMakeFiles/libgit2_tests.dir/apply/index.c.o CMakeFiles/libgit2_tests.dir/apply/partial.c.o CMakeFiles/libgit2_tests.dir/apply/tree.c.o CMakeFiles/libgit2_tests.dir/apply/workdir.c.o CMakeFiles/libgit2_tests.dir/attr/file.c.o CMakeFiles/libgit2_tests.dir/attr/flags.c.o CMakeFiles/libgit2_tests.dir/attr/lookup.c.o CMakeFiles/libgit2_tests.dir/attr/macro.c.o CMakeFiles/libgit2_tests.dir/attr/repo.c.o CMakeFiles/libgit2_tests.dir/blame/blame_helpers.c.o CMakeFiles/libgit2_tests.dir/blame/buffer.c.o CMakeFiles/libgit2_tests.dir/blame/getters.c.o CMakeFiles/libgit2_tests.dir/blame/harder.c.o CMakeFiles/libgit2_tests.dir/blame/simple.c.o CMakeFiles/libgit2_tests.dir/checkout/binaryunicode.c.o CMakeFiles/libgit2_tests.dir/checkout/checkout_helpers.c.o CMakeFiles/libgit2_tests.dir/checkout/conflict.c.o CMakeFiles/libgit2_tests.dir/checkout/crlf.c.o CMakeFiles/libgit2_tests.dir/checkout/head.c.o CMakeFiles/libgit2_tests.dir/checkout/icase.c.o CMakeFiles/libgit2_tests.dir/checkout/index.c.o CMakeFiles/libgit2_tests.dir/checkout/nasty.c.o CMakeFiles/libgit2_tests.dir/checkout/tree.c.o CMakeFiles/libgit2_tests.dir/checkout/typechange.c.o CMakeFiles/libgit2_tests.dir/cherrypick/bare.c.o CMakeFiles/libgit2_tests.dir/cherrypick/workdir.c.o CMakeFiles/libgit2_tests.dir/clone/empty.c.o CMakeFiles/libgit2_tests.dir/clone/local.c.o CMakeFiles/libgit2_tests.dir/clone/nonetwork.c.o CMakeFiles/libgit2_tests.dir/clone/transport.c.o CMakeFiles/libgit2_tests.dir/commit/commit.c.o CMakeFiles/libgit2_tests.dir/commit/parent.c.o CMakeFiles/libgit2_tests.dir/commit/parse.c.o CMakeFiles/libgit2_tests.dir/commit/signature.c.o CMakeFiles/libgit2_tests.dir/commit/write.c.o CMakeFiles/libgit2_tests.dir/config/add.c.o CMakeFiles/libgit2_tests.dir/config/backend.c.o CMakeFiles/libgit2_tests.dir/config/conditionals.c.o CMakeFiles/libgit2_tests.dir/config/config_helpers.c.o CMakeFiles/libgit2_tests.dir/config/configlevel.c.o CMakeFiles/libgit2_tests.dir/config/find.c.o CMakeFiles/libgit2_tests.dir/config/global.c.o CMakeFiles/libgit2_tests.dir/config/include.c.o CMakeFiles/libgit2_tests.dir/config/memory.c.o CMakeFiles/libgit2_tests.dir/config/multivar.c.o CMakeFiles/libgit2_tests.dir/config/new.c.o CMakeFiles/libgit2_tests.dir/config/read.c.o CMakeFiles/libgit2_tests.dir/config/readonly.c.o CMakeFiles/libgit2_tests.dir/config/rename.c.o CMakeFiles/libgit2_tests.dir/config/snapshot.c.o CMakeFiles/libgit2_tests.dir/config/stress.c.o CMakeFiles/libgit2_tests.dir/config/validkeyname.c.o CMakeFiles/libgit2_tests.dir/config/write.c.o CMakeFiles/libgit2_tests.dir/core/buf.c.o CMakeFiles/libgit2_tests.dir/core/env.c.o CMakeFiles/libgit2_tests.dir/core/features.c.o CMakeFiles/libgit2_tests.dir/core/hashsig.c.o CMakeFiles/libgit2_tests.dir/core/oid.c.o CMakeFiles/libgit2_tests.dir/core/oidarray.c.o CMakeFiles/libgit2_tests.dir/core/oidmap.c.o CMakeFiles/libgit2_tests.dir/core/opts.c.o CMakeFiles/libgit2_tests.dir/core/pool.c.o CMakeFiles/libgit2_tests.dir/core/structinit.c.o CMakeFiles/libgit2_tests.dir/core/useragent.c.o CMakeFiles/libgit2_tests.dir/date/date.c.o CMakeFiles/libgit2_tests.dir/date/rfc2822.c.o CMakeFiles/libgit2_tests.dir/delta/apply.c.o CMakeFiles/libgit2_tests.dir/describe/describe.c.o CMakeFiles/libgit2_tests.dir/describe/describe_helpers.c.o CMakeFiles/libgit2_tests.dir/describe/t6120.c.o CMakeFiles/libgit2_tests.dir/diff/binary.c.o CMakeFiles/libgit2_tests.dir/diff/blob.c.o CMakeFiles/libgit2_tests.dir/diff/diff_helpers.c.o CMakeFiles/libgit2_tests.dir/diff/diffiter.c.o CMakeFiles/libgit2_tests.dir/diff/drivers.c.o CMakeFiles/libgit2_tests.dir/diff/externalmodifications.c.o CMakeFiles/libgit2_tests.dir/diff/format_email.c.o CMakeFiles/libgit2_tests.dir/diff/index.c.o CMakeFiles/libgit2_tests.dir/diff/notify.c.o CMakeFiles/libgit2_tests.dir/diff/parse.c.o CMakeFiles/libgit2_tests.dir/diff/patch.c.o CMakeFiles/libgit2_tests.dir/diff/patchid.c.o CMakeFiles/libgit2_tests.dir/diff/pathspec.c.o CMakeFiles/libgit2_tests.dir/diff/racediffiter.c.o CMakeFiles/libgit2_tests.dir/diff/rename.c.o CMakeFiles/libgit2_tests.dir/diff/stats.c.o CMakeFiles/libgit2_tests.dir/diff/submodules.c.o CMakeFiles/libgit2_tests.dir/diff/tree.c.o CMakeFiles/libgit2_tests.dir/diff/userdiff.c.o CMakeFiles/libgit2_tests.dir/diff/workdir.c.o CMakeFiles/libgit2_tests.dir/email/create.c.o CMakeFiles/libgit2_tests.dir/fetch/local.c.o CMakeFiles/libgit2_tests.dir/fetchhead/nonetwork.c.o CMakeFiles/libgit2_tests.dir/filter/bare.c.o CMakeFiles/libgit2_tests.dir/filter/blob.c.o CMakeFiles/libgit2_tests.dir/filter/crlf.c.o CMakeFiles/libgit2_tests.dir/filter/custom.c.o CMakeFiles/libgit2_tests.dir/filter/custom_helpers.c.o CMakeFiles/libgit2_tests.dir/filter/file.c.o CMakeFiles/libgit2_tests.dir/filter/ident.c.o CMakeFiles/libgit2_tests.dir/filter/query.c.o CMakeFiles/libgit2_tests.dir/filter/stream.c.o CMakeFiles/libgit2_tests.dir/filter/systemattrs.c.o CMakeFiles/libgit2_tests.dir/filter/wildcard.c.o CMakeFiles/libgit2_tests.dir/grafts/basic.c.o CMakeFiles/libgit2_tests.dir/grafts/parse.c.o CMakeFiles/libgit2_tests.dir/grafts/shallow.c.o CMakeFiles/libgit2_tests.dir/graph/ahead_behind.c.o CMakeFiles/libgit2_tests.dir/graph/commitgraph.c.o CMakeFiles/libgit2_tests.dir/graph/descendant_of.c.o CMakeFiles/libgit2_tests.dir/graph/reachable_from_any.c.o CMakeFiles/libgit2_tests.dir/ignore/path.c.o CMakeFiles/libgit2_tests.dir/ignore/status.c.o CMakeFiles/libgit2_tests.dir/index/add.c.o CMakeFiles/libgit2_tests.dir/index/addall.c.o CMakeFiles/libgit2_tests.dir/index/bypath.c.o CMakeFiles/libgit2_tests.dir/index/cache.c.o CMakeFiles/libgit2_tests.dir/index/collision.c.o CMakeFiles/libgit2_tests.dir/index/conflicts.c.o CMakeFiles/libgit2_tests.dir/index/crlf.c.o CMakeFiles/libgit2_tests.dir/index/filemodes.c.o CMakeFiles/libgit2_tests.dir/index/inmemory.c.o CMakeFiles/libgit2_tests.dir/index/names.c.o CMakeFiles/libgit2_tests.dir/index/nsec.c.o CMakeFiles/libgit2_tests.dir/index/racy.c.o CMakeFiles/libgit2_tests.dir/index/read_index.c.o CMakeFiles/libgit2_tests.dir/index/read_tree.c.o CMakeFiles/libgit2_tests.dir/index/rename.c.o CMakeFiles/libgit2_tests.dir/index/reuc.c.o CMakeFiles/libgit2_tests.dir/index/splitindex.c.o CMakeFiles/libgit2_tests.dir/index/stage.c.o CMakeFiles/libgit2_tests.dir/index/tests.c.o CMakeFiles/libgit2_tests.dir/index/tests256.c.o CMakeFiles/libgit2_tests.dir/index/version.c.o CMakeFiles/libgit2_tests.dir/iterator/index.c.o CMakeFiles/libgit2_tests.dir/iterator/iterator_helpers.c.o CMakeFiles/libgit2_tests.dir/iterator/tree.c.o CMakeFiles/libgit2_tests.dir/iterator/workdir.c.o CMakeFiles/libgit2_tests.dir/mailmap/basic.c.o CMakeFiles/libgit2_tests.dir/mailmap/blame.c.o CMakeFiles/libgit2_tests.dir/mailmap/parsing.c.o CMakeFiles/libgit2_tests.dir/merge/analysis.c.o CMakeFiles/libgit2_tests.dir/merge/annotated_commit.c.o CMakeFiles/libgit2_tests.dir/merge/driver.c.o CMakeFiles/libgit2_tests.dir/merge/files.c.o CMakeFiles/libgit2_tests.dir/merge/merge_helpers.c.o CMakeFiles/libgit2_tests.dir/merge/trees/automerge.c.o CMakeFiles/libgit2_tests.dir/merge/trees/commits.c.o CMakeFiles/libgit2_tests.dir/merge/trees/modeconflict.c.o CMakeFiles/libgit2_tests.dir/merge/trees/recursive.c.o CMakeFiles/libgit2_tests.dir/merge/trees/renames.c.o CMakeFiles/libgit2_tests.dir/merge/trees/treediff.c.o CMakeFiles/libgit2_tests.dir/merge/trees/trivial.c.o CMakeFiles/libgit2_tests.dir/merge/trees/whitespace.c.o CMakeFiles/libgit2_tests.dir/merge/workdir/dirty.c.o CMakeFiles/libgit2_tests.dir/merge/workdir/recursive.c.o CMakeFiles/libgit2_tests.dir/merge/workdir/renames.c.o CMakeFiles/libgit2_tests.dir/merge/workdir/setup.c.o CMakeFiles/libgit2_tests.dir/merge/workdir/simple.c.o CMakeFiles/libgit2_tests.dir/merge/workdir/submodules.c.o CMakeFiles/libgit2_tests.dir/merge/workdir/trivial.c.o CMakeFiles/libgit2_tests.dir/message/trailer.c.o CMakeFiles/libgit2_tests.dir/network/cred.c.o CMakeFiles/libgit2_tests.dir/network/fetchlocal.c.o CMakeFiles/libgit2_tests.dir/network/refspecs.c.o CMakeFiles/libgit2_tests.dir/network/remote/defaultbranch.c.o CMakeFiles/libgit2_tests.dir/network/remote/delete.c.o CMakeFiles/libgit2_tests.dir/network/remote/isvalidname.c.o CMakeFiles/libgit2_tests.dir/network/remote/local.c.o CMakeFiles/libgit2_tests.dir/network/remote/push.c.o CMakeFiles/libgit2_tests.dir/network/remote/remotes.c.o CMakeFiles/libgit2_tests.dir/network/remote/rename.c.o CMakeFiles/libgit2_tests.dir/notes/notes.c.o CMakeFiles/libgit2_tests.dir/notes/notesref.c.o CMakeFiles/libgit2_tests.dir/object/blob/filter.c.o CMakeFiles/libgit2_tests.dir/object/blob/fromstream.c.o CMakeFiles/libgit2_tests.dir/object/blob/write.c.o CMakeFiles/libgit2_tests.dir/object/cache.c.o CMakeFiles/libgit2_tests.dir/object/commit/commitstagedfile.c.o CMakeFiles/libgit2_tests.dir/object/commit/parse.c.o CMakeFiles/libgit2_tests.dir/object/lookup.c.o CMakeFiles/libgit2_tests.dir/object/lookup256.c.o CMakeFiles/libgit2_tests.dir/object/lookupbypath.c.o CMakeFiles/libgit2_tests.dir/object/message.c.o CMakeFiles/libgit2_tests.dir/object/peel.c.o CMakeFiles/libgit2_tests.dir/object/raw/chars.c.o CMakeFiles/libgit2_tests.dir/object/raw/compare.c.o CMakeFiles/libgit2_tests.dir/object/raw/convert.c.o CMakeFiles/libgit2_tests.dir/object/raw/fromstr.c.o CMakeFiles/libgit2_tests.dir/object/raw/hash.c.o CMakeFiles/libgit2_tests.dir/object/raw/short.c.o CMakeFiles/libgit2_tests.dir/object/raw/size.c.o CMakeFiles/libgit2_tests.dir/object/raw/type2string.c.o CMakeFiles/libgit2_tests.dir/object/raw/write.c.o CMakeFiles/libgit2_tests.dir/object/shortid.c.o CMakeFiles/libgit2_tests.dir/object/tag/list.c.o CMakeFiles/libgit2_tests.dir/object/tag/parse.c.o CMakeFiles/libgit2_tests.dir/object/tag/peel.c.o CMakeFiles/libgit2_tests.dir/object/tag/read.c.o CMakeFiles/libgit2_tests.dir/object/tag/write.c.o CMakeFiles/libgit2_tests.dir/object/tree/attributes.c.o CMakeFiles/libgit2_tests.dir/object/tree/duplicateentries.c.o CMakeFiles/libgit2_tests.dir/object/tree/frompath.c.o CMakeFiles/libgit2_tests.dir/object/tree/parse.c.o CMakeFiles/libgit2_tests.dir/object/tree/read.c.o CMakeFiles/libgit2_tests.dir/object/tree/update.c.o CMakeFiles/libgit2_tests.dir/object/tree/walk.c.o CMakeFiles/libgit2_tests.dir/object/tree/write.c.o CMakeFiles/libgit2_tests.dir/object/validate.c.o CMakeFiles/libgit2_tests.dir/odb/alternates.c.o CMakeFiles/libgit2_tests.dir/odb/backend/backend_helpers.c.o CMakeFiles/libgit2_tests.dir/odb/backend/loose.c.o CMakeFiles/libgit2_tests.dir/odb/backend/mempack.c.o CMakeFiles/libgit2_tests.dir/odb/backend/multiple.c.o CMakeFiles/libgit2_tests.dir/odb/backend/nobackend.c.o CMakeFiles/libgit2_tests.dir/odb/backend/nonrefreshing.c.o CMakeFiles/libgit2_tests.dir/odb/backend/refreshing.c.o CMakeFiles/libgit2_tests.dir/odb/backend/simple.c.o CMakeFiles/libgit2_tests.dir/odb/emptyobjects.c.o CMakeFiles/libgit2_tests.dir/odb/foreach.c.o CMakeFiles/libgit2_tests.dir/odb/freshen.c.o CMakeFiles/libgit2_tests.dir/odb/largefiles.c.o CMakeFiles/libgit2_tests.dir/odb/loose.c.o CMakeFiles/libgit2_tests.dir/odb/mixed.c.o CMakeFiles/libgit2_tests.dir/odb/open.c.o CMakeFiles/libgit2_tests.dir/odb/packed.c.o CMakeFiles/libgit2_tests.dir/odb/packed256.c.o CMakeFiles/libgit2_tests.dir/odb/packedone.c.o CMakeFiles/libgit2_tests.dir/odb/packedone256.c.o CMakeFiles/libgit2_tests.dir/odb/sorting.c.o CMakeFiles/libgit2_tests.dir/odb/streamwrite.c.o CMakeFiles/libgit2_tests.dir/online/badssl.c.o CMakeFiles/libgit2_tests.dir/online/clone.c.o CMakeFiles/libgit2_tests.dir/online/customcert.c.o CMakeFiles/libgit2_tests.dir/online/fetch.c.o CMakeFiles/libgit2_tests.dir/online/fetchhead.c.o CMakeFiles/libgit2_tests.dir/online/push.c.o CMakeFiles/libgit2_tests.dir/online/push_util.c.o CMakeFiles/libgit2_tests.dir/online/remotes.c.o CMakeFiles/libgit2_tests.dir/online/shallow.c.o CMakeFiles/libgit2_tests.dir/pack/filelimit.c.o CMakeFiles/libgit2_tests.dir/pack/indexer.c.o CMakeFiles/libgit2_tests.dir/pack/midx.c.o CMakeFiles/libgit2_tests.dir/pack/packbuilder.c.o CMakeFiles/libgit2_tests.dir/pack/sharing.c.o CMakeFiles/libgit2_tests.dir/pack/threadsafety.c.o CMakeFiles/libgit2_tests.dir/patch/parse.c.o CMakeFiles/libgit2_tests.dir/patch/print.c.o CMakeFiles/libgit2_tests.dir/path/validate.c.o CMakeFiles/libgit2_tests.dir/perf/helper__perf__do_merge.c.o CMakeFiles/libgit2_tests.dir/perf/helper__perf__timer.c.o CMakeFiles/libgit2_tests.dir/perf/merge.c.o CMakeFiles/libgit2_tests.dir/rebase/abort.c.o CMakeFiles/libgit2_tests.dir/rebase/inmemory.c.o CMakeFiles/libgit2_tests.dir/rebase/iterator.c.o CMakeFiles/libgit2_tests.dir/rebase/merge.c.o CMakeFiles/libgit2_tests.dir/rebase/setup.c.o CMakeFiles/libgit2_tests.dir/rebase/sign.c.o CMakeFiles/libgit2_tests.dir/rebase/submodule.c.o CMakeFiles/libgit2_tests.dir/refs/basic.c.o CMakeFiles/libgit2_tests.dir/refs/branches/checkedout.c.o CMakeFiles/libgit2_tests.dir/refs/branches/create.c.o CMakeFiles/libgit2_tests.dir/refs/branches/delete.c.o CMakeFiles/libgit2_tests.dir/refs/branches/ishead.c.o CMakeFiles/libgit2_tests.dir/refs/branches/iterator.c.o CMakeFiles/libgit2_tests.dir/refs/branches/lookup.c.o CMakeFiles/libgit2_tests.dir/refs/branches/move.c.o CMakeFiles/libgit2_tests.dir/refs/branches/name.c.o CMakeFiles/libgit2_tests.dir/refs/branches/remote.c.o CMakeFiles/libgit2_tests.dir/refs/branches/upstream.c.o CMakeFiles/libgit2_tests.dir/refs/branches/upstreamname.c.o CMakeFiles/libgit2_tests.dir/refs/crashes.c.o CMakeFiles/libgit2_tests.dir/refs/create.c.o CMakeFiles/libgit2_tests.dir/refs/delete.c.o CMakeFiles/libgit2_tests.dir/refs/dup.c.o CMakeFiles/libgit2_tests.dir/refs/foreachglob.c.o CMakeFiles/libgit2_tests.dir/refs/isvalidname.c.o CMakeFiles/libgit2_tests.dir/refs/iterator.c.o CMakeFiles/libgit2_tests.dir/refs/list.c.o CMakeFiles/libgit2_tests.dir/refs/listall.c.o CMakeFiles/libgit2_tests.dir/refs/lookup.c.o CMakeFiles/libgit2_tests.dir/refs/namespaces.c.o CMakeFiles/libgit2_tests.dir/refs/normalize.c.o CMakeFiles/libgit2_tests.dir/refs/overwrite.c.o CMakeFiles/libgit2_tests.dir/refs/pack.c.o CMakeFiles/libgit2_tests.dir/refs/peel.c.o CMakeFiles/libgit2_tests.dir/refs/races.c.o CMakeFiles/libgit2_tests.dir/refs/read.c.o CMakeFiles/libgit2_tests.dir/refs/ref_helpers.c.o CMakeFiles/libgit2_tests.dir/refs/reflog/drop.c.o CMakeFiles/libgit2_tests.dir/refs/reflog/messages.c.o CMakeFiles/libgit2_tests.dir/refs/reflog/reflog.c.o CMakeFiles/libgit2_tests.dir/refs/reflog/reflog_helpers.c.o CMakeFiles/libgit2_tests.dir/refs/rename.c.o CMakeFiles/libgit2_tests.dir/refs/revparse.c.o CMakeFiles/libgit2_tests.dir/refs/setter.c.o CMakeFiles/libgit2_tests.dir/refs/shorthand.c.o CMakeFiles/libgit2_tests.dir/refs/tags/name.c.o CMakeFiles/libgit2_tests.dir/refs/transactions.c.o CMakeFiles/libgit2_tests.dir/refs/unicode.c.o CMakeFiles/libgit2_tests.dir/refs/update.c.o CMakeFiles/libgit2_tests.dir/remote/create.c.o CMakeFiles/libgit2_tests.dir/remote/fetch.c.o CMakeFiles/libgit2_tests.dir/remote/httpproxy.c.o CMakeFiles/libgit2_tests.dir/remote/insteadof.c.o CMakeFiles/libgit2_tests.dir/remote/list.c.o CMakeFiles/libgit2_tests.dir/repo/config.c.o CMakeFiles/libgit2_tests.dir/repo/discover.c.o CMakeFiles/libgit2_tests.dir/repo/env.c.o CMakeFiles/libgit2_tests.dir/repo/extensions.c.o CMakeFiles/libgit2_tests.dir/repo/getters.c.o CMakeFiles/libgit2_tests.dir/repo/hashfile.c.o CMakeFiles/libgit2_tests.dir/repo/head.c.o CMakeFiles/libgit2_tests.dir/repo/headtree.c.o CMakeFiles/libgit2_tests.dir/repo/init.c.o CMakeFiles/libgit2_tests.dir/repo/message.c.o CMakeFiles/libgit2_tests.dir/repo/new.c.o CMakeFiles/libgit2_tests.dir/repo/objectformat.c.o CMakeFiles/libgit2_tests.dir/repo/open.c.o CMakeFiles/libgit2_tests.dir/repo/pathspec.c.o CMakeFiles/libgit2_tests.dir/repo/repo_helpers.c.o CMakeFiles/libgit2_tests.dir/repo/reservedname.c.o CMakeFiles/libgit2_tests.dir/repo/setters.c.o CMakeFiles/libgit2_tests.dir/repo/shallow.c.o CMakeFiles/libgit2_tests.dir/repo/state.c.o CMakeFiles/libgit2_tests.dir/repo/template.c.o CMakeFiles/libgit2_tests.dir/reset/default.c.o CMakeFiles/libgit2_tests.dir/reset/hard.c.o CMakeFiles/libgit2_tests.dir/reset/mixed.c.o CMakeFiles/libgit2_tests.dir/reset/reset_helpers.c.o CMakeFiles/libgit2_tests.dir/reset/soft.c.o CMakeFiles/libgit2_tests.dir/revert/bare.c.o CMakeFiles/libgit2_tests.dir/revert/rename.c.o CMakeFiles/libgit2_tests.dir/revert/workdir.c.o CMakeFiles/libgit2_tests.dir/revwalk/basic.c.o CMakeFiles/libgit2_tests.dir/revwalk/hidecb.c.o CMakeFiles/libgit2_tests.dir/revwalk/mergebase.c.o CMakeFiles/libgit2_tests.dir/revwalk/signatureparsing.c.o CMakeFiles/libgit2_tests.dir/revwalk/simplify.c.o CMakeFiles/libgit2_tests.dir/stash/apply.c.o CMakeFiles/libgit2_tests.dir/stash/drop.c.o CMakeFiles/libgit2_tests.dir/stash/foreach.c.o CMakeFiles/libgit2_tests.dir/stash/save.c.o CMakeFiles/libgit2_tests.dir/stash/stash_helpers.c.o CMakeFiles/libgit2_tests.dir/stash/submodules.c.o CMakeFiles/libgit2_tests.dir/status/renames.c.o CMakeFiles/libgit2_tests.dir/status/single.c.o CMakeFiles/libgit2_tests.dir/status/status_helpers.c.o CMakeFiles/libgit2_tests.dir/status/submodules.c.o CMakeFiles/libgit2_tests.dir/status/worktree.c.o CMakeFiles/libgit2_tests.dir/status/worktree_init.c.o CMakeFiles/libgit2_tests.dir/stream/deprecated.c.o CMakeFiles/libgit2_tests.dir/stream/registration.c.o CMakeFiles/libgit2_tests.dir/stress/diff.c.o CMakeFiles/libgit2_tests.dir/submodule/add.c.o CMakeFiles/libgit2_tests.dir/submodule/escape.c.o CMakeFiles/libgit2_tests.dir/submodule/init.c.o CMakeFiles/libgit2_tests.dir/submodule/inject_option.c.o CMakeFiles/libgit2_tests.dir/submodule/lookup.c.o CMakeFiles/libgit2_tests.dir/submodule/modify.c.o CMakeFiles/libgit2_tests.dir/submodule/nosubs.c.o CMakeFiles/libgit2_tests.dir/submodule/open.c.o CMakeFiles/libgit2_tests.dir/submodule/repository_init.c.o CMakeFiles/libgit2_tests.dir/submodule/status.c.o CMakeFiles/libgit2_tests.dir/submodule/submodule_helpers.c.o CMakeFiles/libgit2_tests.dir/submodule/update.c.o CMakeFiles/libgit2_tests.dir/threads/atomic.c.o CMakeFiles/libgit2_tests.dir/threads/basic.c.o CMakeFiles/libgit2_tests.dir/threads/diff.c.o CMakeFiles/libgit2_tests.dir/threads/iterator.c.o CMakeFiles/libgit2_tests.dir/threads/refdb.c.o CMakeFiles/libgit2_tests.dir/threads/thread_helpers.c.o CMakeFiles/libgit2_tests.dir/threads/tlsdata.c.o CMakeFiles/libgit2_tests.dir/trace/trace.c.o CMakeFiles/libgit2_tests.dir/trace/windows/stacktrace.c.o CMakeFiles/libgit2_tests.dir/transport/register.c.o CMakeFiles/libgit2_tests.dir/transports/smart/packet.c.o CMakeFiles/libgit2_tests.dir/win32/forbidden.c.o CMakeFiles/libgit2_tests.dir/win32/longpath.c.o CMakeFiles/libgit2_tests.dir/win32/systemdir.c.o CMakeFiles/libgit2_tests.dir/worktree/bare.c.o CMakeFiles/libgit2_tests.dir/worktree/config.c.o CMakeFiles/libgit2_tests.dir/worktree/merge.c.o CMakeFiles/libgit2_tests.dir/worktree/open.c.o CMakeFiles/libgit2_tests.dir/worktree/reflog.c.o CMakeFiles/libgit2_tests.dir/worktree/refs.c.o CMakeFiles/libgit2_tests.dir/worktree/repository.c.o CMakeFiles/libgit2_tests.dir/worktree/submodule.c.o CMakeFiles/libgit2_tests.dir/worktree/worktree.c.o CMakeFiles/libgit2_tests.dir/worktree/worktree_helpers.c.o ../../src/util/CMakeFiles/util.dir/alloc.c.o ../../src/util/CMakeFiles/util.dir/allocators/failalloc.c.o ../../src/util/CMakeFiles/util.dir/allocators/stdalloc.c.o ../../src/util/CMakeFiles/util.dir/allocators/win32_leakcheck.c.o ../../src/util/CMakeFiles/util.dir/date.c.o ../../src/util/CMakeFiles/util.dir/filebuf.c.o ../../src/util/CMakeFiles/util.dir/fs_path.c.o ../../src/util/CMakeFiles/util.dir/futils.c.o ../../src/util/CMakeFiles/util.dir/hash.c.o ../../src/util/CMakeFiles/util.dir/net.c.o ../../src/util/CMakeFiles/util.dir/pool.c.o ../../src/util/CMakeFiles/util.dir/posix.c.o ../../src/util/CMakeFiles/util.dir/pqueue.c.o ../../src/util/CMakeFiles/util.dir/rand.c.o ../../src/util/CMakeFiles/util.dir/regexp.c.o ../../src/util/CMakeFiles/util.dir/runtime.c.o ../../src/util/CMakeFiles/util.dir/sortedcache.c.o ../../src/util/CMakeFiles/util.dir/str.c.o ../../src/util/CMakeFiles/util.dir/strmap.c.o ../../src/util/CMakeFiles/util.dir/thread.c.o ../../src/util/CMakeFiles/util.dir/tsort.c.o ../../src/util/CMakeFiles/util.dir/utf8.c.o ../../src/util/CMakeFiles/util.dir/util.c.o ../../src/util/CMakeFiles/util.dir/varint.c.o ../../src/util/CMakeFiles/util.dir/vector.c.o ../../src/util/CMakeFiles/util.dir/wildmatch.c.o ../../src/util/CMakeFiles/util.dir/zstream.c.o ../../src/util/CMakeFiles/util.dir/unix/map.c.o ../../src/util/CMakeFiles/util.dir/unix/realpath.c.o ../../src/util/CMakeFiles/util.dir/hash/collisiondetect.c.o ../../src/util/CMakeFiles/util.dir/hash/sha1dc/sha1.c.o ../../src/util/CMakeFiles/util.dir/hash/sha1dc/ubc_check.c.o ../../src/util/CMakeFiles/util.dir/hash/common_crypto.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/annotated_commit.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/apply.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/attr.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/attr_file.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/attrcache.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/blame.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/blame_git.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/blob.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/branch.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/buf.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/cache.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/checkout.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/cherrypick.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/clone.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/commit.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/commit_graph.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/commit_list.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/config.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/config_cache.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/config_entries.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/config_file.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/config_mem.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/config_parse.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/config_snapshot.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/crlf.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/delta.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/describe.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/diff.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/diff_driver.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/diff_file.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/diff_generate.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/diff_parse.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/diff_print.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/diff_stats.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/diff_tform.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/diff_xdiff.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/email.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/errors.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/fetch.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/fetchhead.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/filter.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/grafts.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/graph.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/hashsig.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/ident.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/idxmap.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/ignore.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/index.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/indexer.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/iterator.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/libgit2.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/mailmap.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/merge.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/merge_driver.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/merge_file.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/message.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/midx.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/mwindow.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/notes.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/object.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/object_api.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/odb.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/odb_loose.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/odb_mempack.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/odb_pack.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/offmap.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/oid.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/oidarray.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/oidmap.c.o "../../src/libgit2/CMakeFiles/libgit2.dir/pack-objects.c.o" ../../src/libgit2/CMakeFiles/libgit2.dir/pack.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/parse.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/patch.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/patch_generate.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/patch_parse.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/path.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/pathspec.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/proxy.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/push.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/reader.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/rebase.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/refdb.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/refdb_fs.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/reflog.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/refs.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/refspec.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/remote.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/repository.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/reset.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/revert.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/revparse.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/revwalk.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/signature.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/stash.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/status.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/strarray.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/streams/mbedtls.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/streams/openssl.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/streams/openssl_dynamic.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/streams/openssl_legacy.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/streams/registry.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/streams/schannel.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/streams/socket.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/streams/stransport.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/streams/tls.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/submodule.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/sysdir.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/tag.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/threadstate.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/trace.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/trailer.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transaction.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transport.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/auth.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/auth_gssapi.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/auth_ntlmclient.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/auth_sspi.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/credential.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/credential_helpers.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/git.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/http.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/httpclient.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/local.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/smart.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/smart_pkt.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/smart_protocol.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/ssh.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/transports/winhttp.c.o "../../src/libgit2/CMakeFiles/libgit2.dir/tree-cache.c.o" ../../src/libgit2/CMakeFiles/libgit2.dir/tree.c.o ../../src/libgit2/CMakeFiles/libgit2.dir/worktree.c.o "../../deps/http-parser/CMakeFiles/http-parser.dir/http_parser.c.o" ../../deps/xdiff/CMakeFiles/xdiff.dir/xdiffi.c.o ../../deps/xdiff/CMakeFiles/xdiff.dir/xemit.c.o ../../deps/xdiff/CMakeFiles/xdiff.dir/xhistogram.c.o ../../deps/xdiff/CMakeFiles/xdiff.dir/xmerge.c.o ../../deps/xdiff/CMakeFiles/xdiff.dir/xpatience.c.o ../../deps/xdiff/CMakeFiles/xdiff.dir/xprepare.c.o ../../deps/xdiff/CMakeFiles/xdiff.dir/xutils.c.o ../../deps/ntlmclient/CMakeFiles/ntlmclient.dir/ntlm.c.o ../../deps/ntlmclient/CMakeFiles/ntlmclient.dir/util.c.o ../../deps/ntlmclient/CMakeFiles/ntlmclient.dir/unicode_iconv.c.o ../../deps/ntlmclient/CMakeFiles/ntlmclient.dir/crypt_commoncrypto.c.o -o ../../libgit2_tests  -Wl,-rpath,/opt/local/lib -framework CoreFoundation -framework Security /opt/local/lib/libpcre2-8.dylib /opt/local/lib/libssh2.dylib /opt/local/lib/libssl.dylib /opt/local/lib/libcrypto.dylib /opt/local/lib/libz.dylib 
ld: Undefined symbols:
  _libiconv, referenced from:
      _git_fs_path_iconv in fs_path.c.o
      _unicode_iconv_encoding_convert in unicode_iconv.c.o
  _libiconv_close, referenced from:
      _git_fs_path_direach in fs_path.c.o
      _git_fs_path_iconv_clear in fs_path.c.o
      _git_fs_path_diriter_free in fs_path.c.o
      _git_fs_path_dirload in fs_path.c.o
      _ntlm_unicode_shutdown in unicode_iconv.c.o
      _ntlm_unicode_shutdown in unicode_iconv.c.o
  _libiconv_open, referenced from:
      _git_fs_path_direach in fs_path.c.o
      _git_fs_path_iconv_init_precompose in fs_path.c.o
      _git_fs_path_diriter_init in fs_path.c.o
      _ntlm_unicode_init in unicode_iconv.c.o
      _ntlm_unicode_init in unicode_iconv.c.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Version of libgit2 (release number or SHA1)

1.7.1

Operating system(s) tested

macOS 12, 13, 14

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