Opened 21 months ago

Closed 16 months ago

Last modified 13 months ago

#66931 closed defect (fixed)

libgit2 @1.5.1: fails to build on arm64

Reported by: jrabinow Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: mascguy (Christopher Nielsen), jrabinow
Port: libgit2

Description (last modified by jrabinow)

Command run: sudo port install libgit2

sudo port install libgit2
--->  Computing dependencies for libgit2
--->  Fetching archive for libgit2
--->  Attempting to fetch libgit2-1.5.1_0+threadsafe.darwin_22.arm64.tbz2 from http://mirror.fcix.net/macports/packages/libgit2
--->  Attempting to fetch libgit2-1.5.1_0+threadsafe.darwin_22.arm64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/libgit2
--->  Attempting to fetch libgit2-1.5.1_0+threadsafe.darwin_22.arm64.tbz2 from https://packages.macports.org/libgit2
--->  Fetching distfiles for libgit2
--->  Verifying checksums for libgit2
--->  Extracting libgit2
--->  Applying patches to libgit2
--->  Configuring libgit2
--->  Building libgit2
Error: Failed to build libgit2: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_libgit2/libgit2/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port libgit2 failed
[Exit 1]

Machine info: macOS 13.1 22C65 arm64 Xcode 14.1 14B47b

Attachments (1)

libgit2_build_fail.txt (1.9 MB) - added by jrabinow 21 months ago.
build log

Download all attachments as: .zip

Change History (9)

comment:1 Changed 21 months ago by jmroot (Joshua Root)

Cc: mascguy added
Owner: set to dbevans
Status: newassigned

Please attach the log.

comment:2 Changed 21 months ago by jrabinow

Cc: jrabinow added
Summary: libgit2 fails to build on arm64libgit2 1.5.1: fails to build on arm64
Version: 2.8.1

Changed 21 months ago by jrabinow

Attachment: libgit2_build_fail.txt added

build log

comment:3 Changed 21 months ago by jrabinow

Description: modified (diff)

comment:4 Changed 21 months ago by ryandesign (Ryan Carsten Schmidt)

Summary: libgit2 1.5.1: fails to build on arm64libgit2 @1.5.1: fails to build on arm64

The error in the log is:

:info:build Undefined symbols for architecture arm64:
:info:build   "_libiconv", referenced from:
:info:build       _git_fs_path_iconv in fs_path.c.o
:info:build       _unicode_iconv_encoding_convert in unicode_iconv.c.o
:info:build   "_libiconv_close", referenced from:
:info:build       _git_fs_path_iconv_clear in fs_path.c.o
:info:build       _ntlm_unicode_shutdown in unicode_iconv.c.o
:info:build   "_libiconv_open", referenced from:
:info:build       _git_fs_path_direach in fs_path.c.o
:info:build       _git_fs_path_iconv_init_precompose in fs_path.c.o
:info:build       _git_fs_path_diriter_init in fs_path.c.o
:info:build       _ntlm_unicode_init in unicode_iconv.c.o
:info:build ld: symbol(s) not found for architecture arm64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)

These symbols should be defined in libiconv but unless I'm mistaken the build doesn't seem to be trying to use libiconv. (I don't see -liconv nor the full path to libiconv.dylib being used.)

We have successful builds of this port on all buildbot systems. In those logs, I do see -liconv being used. (We don't have a buildbot system set up for Ventura for arm64 yet which is why you're having to build from source.)

comment:5 Changed 21 months ago by jrabinow

Libgit2 is now installing successfully on my arm64 machine. It's not being compiled either, was there a buildbot system setup for Ventura arm64?

I think we can close this ticket as resolved

comment:6 Changed 16 months ago by bnoctis (Blair Noctis)

This hit me a few times, configure.ldflags_append -liconv solved it.

comment:7 in reply to:  5 Changed 16 months ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: assignedclosed

Replying to jrabinow:

Libgit2 is now installing successfully on my arm64 machine. It's not being compiled either, was there a buildbot system setup for Ventura arm64?

I think we can close this ticket as resolved

Agreed, the port builds fine on all ARM buildbots.

comment:8 Changed 13 months ago by ryandesign (Ryan Carsten Schmidt)

This problem resurfaced in #68409.

Note: See TracTickets for help on using tickets.