Skip to content

Commit b48d495

Browse files
authored
add LDFLAGS: -ltinfo to go-libedit (#42)
Necessary for building on Gentoo for whatever reason; otherwise: ``` # github.com/cockroachdb/cockroach/pkg/cmd/cockroach-oss /home/iliana/sdk/go1.22.11/pkg/tool/linux_amd64/link: running g++ failed: exit status 1 /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: /tmp/go-link-2930997610/000077.o: undefined reference to symbol 'tgetstr' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/libtinfo.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status ```
1 parent 367bca4 commit b48d495

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

patches/go-libedit.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- a/vendor/github.com/knz/go-libedit/unix/editline_unix.go
2+
+++ b/vendor/github.com/knz/go-libedit/unix/editline_unix.go
3+
@@ -27,7 +27,7 @@ import (
4+
5+
// #cgo openbsd netbsd illumos freebsd dragonfly darwin LDFLAGS: -ledit
6+
// #cgo openbsd netbsd illumos freebsd dragonfly darwin CPPFLAGS: -Ishim
7+
-// #cgo linux LDFLAGS: -lncurses
8+
+// #cgo linux LDFLAGS: -lncurses -ltinfo
9+
// #cgo linux CFLAGS: -Wno-unused-result -Wno-pointer-sign
10+
// #cgo linux CPPFLAGS: -Isrc -Isrc/c-libedit -Isrc/c-libedit/editline -Isrc/c-libedit/linux-build -D_GNU_SOURCE
11+
//

0 commit comments

Comments
 (0)