-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ghostty: fix cross build, use more system libraries
Co-authored-by: tranzystorekk <[email protected]>
- Loading branch information
1 parent
3f232d1
commit 6234908
Showing
3 changed files
with
47 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ghostty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/build.zig b/build.zig | ||
index c3f7302..9fa73e9 100644 | ||
--- a/build.zig | ||
+++ b/build.zig | ||
@@ -1494,7 +1494,7 @@ fn addUnicodeTables( | ||
.root_source_file = b.path("src/unicode/props.zig"), | ||
.target = b.host, | ||
}); | ||
- exe.linkLibC(); | ||
+ // exe.linkLibC(); | ||
if (step_ == null) b.installArtifact(exe); | ||
|
||
const ziglyph_dep = b.dependency("ziglyph", .{ | ||
diff --git a/src/unicode/props.zig b/src/unicode/props.zig | ||
index d77bf4c..994cf36 100644 | ||
--- a/src/unicode/props.zig | ||
+++ b/src/unicode/props.zig | ||
@@ -131,7 +131,7 @@ pub fn get(cp: u21) Properties { | ||
|
||
/// Runnable binary to generate the lookup tables and output to stdout. | ||
pub fn main() !void { | ||
- const alloc = std.heap.c_allocator; | ||
+ const alloc = std.heap.page_allocator; | ||
|
||
const gen: lut.Generator( | ||
Properties, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
# Template file for 'ghostty' | ||
pkgname=ghostty | ||
version=1.0.0 | ||
revision=1 | ||
revision=2 | ||
build_style=zig-build | ||
configure_args="-Doptimize=ReleaseFast -Dpie" | ||
hostmakedepends="pkg-config" | ||
makedepends="gtk4-devel libadwaita-devel" | ||
configure_args=" | ||
-Doptimize=ReleaseFast | ||
-Dpie | ||
-Dversion-string=${version} | ||
-fsys=freetype | ||
-fsys=fontconfig | ||
-fsys=harfbuzz" | ||
hostmakedepends="pkg-config glib-devel pandoc" | ||
makedepends="fontconfig-devel freetype-devel harfbuzz-devel gtk4-devel libadwaita-devel" | ||
depends="ghostty-terminfo-${version}_${revision}" | ||
short_desc="Fast and feature-rich terminal emulator that uses GPU acceleration" | ||
maintainer="Duncaen <[email protected]>" | ||
license="MIT" | ||
|
@@ -15,6 +22,13 @@ checksum=bd12953c8bbe7149e2f94e7e578a88e981932a69aa483f5ce9a2cfba726e0015 | |
|
||
post_install() { | ||
vlicense LICENSE | ||
rm -f "${DESTDIR}/usr/share/man/.placeholder" | ||
tic -o "${DESTDIR}/usr/share/terminfo" -x "${DESTDIR}/usr/share/terminfo/ghostty.terminfo" | ||
tic -sx -o ${DESTDIR}/usr/share/terminfo ${DESTDIR}/usr/share/terminfo/ghostty.terminfo | ||
rm -f ${DESTDIR}/usr/share/man/.placeholder ${DESTDIR}/usr/share/terminfo/ghostty.{terminfo,termcap} | ||
} | ||
|
||
ghostty-terminfo_package() { | ||
short_desc+=" - terminfo data" | ||
pkg_install() { | ||
vmove usr/share/terminfo | ||
} | ||
} |
6234908
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ghostty built with this template does not work with me and the output does not give a clear reason for the crash:
Terminal output
6234908
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a similar output. In my case it works in Wayland but not in X11. It shows pictures with fastfetch, but not with neofetch.
6234908
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use
strace
to try to find out where "FileNotFound" comes from.6234908
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the output of
strace ghostty
but I don't know how to make sense of it: https://termbin.com/1k01nI am also using X11 as the other commenter said.
6234908
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't see anything that stands out, might be in a different thread, use the
-ff
strace flag.6234908
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Output of
strace -ff ghostty
: https://termbin.com/0mxn