summarylogtreecommitdiffstats
path: root/0001-cli-internal-ffi-Fix-missing-library.patch
blob: 54762614680a26889782d438542242da9794cafc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From eab3c14348adf1d3618a0d9b45987d93ad3a272e Mon Sep 17 00:00:00 2001
From: Shohei Maruyama <cheat.sc.linux@outlook.com>
Date: Fri, 24 Mar 2023 03:00:41 +0900
Subject: [PATCH] cli: internal: ffi: Fix missing library

go-turbo requires libgit2 at linkage as follows:

  /usr/bin/ld: /home/shohei/pkgbuilds/turbo/src/turbo-1.8.5/cli/internal/ffi/libturborepo_ffi_linux_amd64.a(git2-c77affaa1e7e43cb.git2.dccd2a89-cgu.13.rcgu.o): in function `git2::remote_callbacks::credentials_cb::{closure#0}::{closure#2}':
  /home/shohei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git2-0.16.1/src/remote_callbacks.rs:293: undefined reference to `git_error_set_str'
  ...snip...

Signed-off-by: Shohei Maruyama <cheat.sc.linux@outlook.com>
---
 cli/internal/ffi/ffi.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cli/internal/ffi/ffi.go b/cli/internal/ffi/ffi.go
index 09e1d5fea..0de0f4f6e 100644
--- a/cli/internal/ffi/ffi.go
+++ b/cli/internal/ffi/ffi.go
@@ -11,8 +11,8 @@ package ffi
 // #cgo darwin,amd64 LDFLAGS:  -L${SRCDIR} -lturborepo_ffi_darwin_amd64  -lz -liconv -framework Security -framework CoreFoundation
 // #cgo linux,arm64,staticbinary LDFLAGS:   -L${SRCDIR} -lturborepo_ffi_linux_arm64 -lunwind -lm
 // #cgo linux,amd64,staticbinary LDFLAGS:   -L${SRCDIR} -lturborepo_ffi_linux_amd64 -lunwind -lm
-// #cgo linux,arm64,!staticbinary LDFLAGS:   -L${SRCDIR} -lturborepo_ffi_linux_arm64 -lz -lm
-// #cgo linux,amd64,!staticbinary LDFLAGS:   -L${SRCDIR} -lturborepo_ffi_linux_amd64 -lz -lm
+// #cgo linux,arm64,!staticbinary LDFLAGS:   -L${SRCDIR} -lturborepo_ffi_linux_arm64 -lz -lgit2 -lm
+// #cgo linux,amd64,!staticbinary LDFLAGS:   -L${SRCDIR} -lturborepo_ffi_linux_amd64 -lz -lgit2 -lm
 // #cgo windows,amd64 LDFLAGS: -L${SRCDIR} -lturborepo_ffi_windows_amd64 -lole32 -lbcrypt -lws2_32 -luserenv -lntdll
 import "C"
 
-- 
2.41.0