Just finished FreeBSD support for Ghostty https://github.com/ghostty-org/ghostty/pull/7606. Now getting my port blueprint ready to go.
info: ghostty version=1.1.4-fbsd+8b8b4cb6
info: ghostty build optimize=Debug
info: runtime=apprt.Runtime.gtk
info: font_backend=font.main.Backend.fontconfig_freetype
info: dependency harfbuzz=11.0.0
info: dependency fontconfig=21402
info: renderer=renderer.OpenGL
info: libxev default backend=kqueue
dusan@Dell-Latitude-5400 /V/P/ghostty> zig build -Doptimize=ReleaseFast run main
run
└─ run ghostty
└─ zig build-exe ghostty ReleaseFast native 2 errors
error: ld.lld:
error: ld.lld: undefined symbol: bindtextdomain
note: referenced by ghostty
note: /Volumes/Projects/ghostty/.zig-cache/o/e2e8d04b7729d61175fad5eda9047ec7/ghostty.o:(global.GlobalState.init)
error: the following command failed with 2 compilation errors:
Recently I had dealt with 2 ports that use locale.bindtextdomain, changing it from locale to gettext worked for me. Other one was locale.textdomain I guess. You may try editing source code of the program.Is there a special way to build Ghostty for FreeBSD? I'm hitting an issue regarding some intl stuff in the linking phase.
Bash:dusan@Dell-Latitude-5400 /V/P/ghostty> zig build -Doptimize=ReleaseFast run main run └─ run ghostty └─ zig build-exe ghostty ReleaseFast native 2 errors error: ld.lld: error: ld.lld: undefined symbol: bindtextdomain note: referenced by ghostty note: /Volumes/Projects/ghostty/.zig-cache/o/e2e8d04b7729d61175fad5eda9047ec7/ghostty.o:(global.GlobalState.init) error: the following command failed with 2 compilation errors:
Fix for runtime attribute errors of python, locale doesn't
have these things but the gettext has.
--- src/pigment.in.orig 2025-06-25 15:58:07 UTC
+++ src/pigment.in
@@ -31,8 +31,8 @@ signal.signal(signal.SIGINT, signal.SIG_DFL)
sys.path.insert(1, pkgdatadir)
signal.signal(signal.SIGINT, signal.SIG_DFL)
-locale.bindtextdomain('pigment', localedir)
-locale.textdomain('pigment')
+gettext.bindtextdomain('pigment', localedir)
+gettext.textdomain('pigment')
gettext.install('pigment', localedir)
if __name__ == '__main__':
you need to specify gui backend as well, and install pandoc + gettext stuffIs there a special way to build Ghostty for FreeBSD? I'm hitting an issue regarding some intl stuff in the linking phase.
Bash:dusan@Dell-Latitude-5400 /V/P/ghostty> zig build -Doptimize=ReleaseFast run main run └─ run ghostty └─ zig build-exe ghostty ReleaseFast native 2 errors error: ld.lld: error: ld.lld: undefined symbol: bindtextdomain note: referenced by ghostty note: /Volumes/Projects/ghostty/.zig-cache/o/e2e8d04b7729d61175fad5eda9047ec7/ghostty.o:(global.GlobalState.init) error: the following command failed with 2 compilation errors:
pkg install gettext-tools hs-pandoc
zig build -Dapp-runtime=gtk run
-Dapp-runtime=gtk
was missing. Thanks for the good work!Thanks for your efforts!Just finished FreeBSD support for Ghostty https://github.com/ghostty-org/ghostty/pull/7606. Now getting my port blueprint ready to go.
===> Performing out-of-source build
/bin/mkdir -p /wrkdirs/usr/ports/lang/zig/work/.build
-- The C compiler identification is Clang 19.1.7
-- The CXX compiler identification is Clang 19.1.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/libexec/ccache/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/local/libexec/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring zig version 0.14.0
CMake Error at cmake/Findllvm.cmake:30 (message):
LLVM (according to /usr/local/bin/llvm-config19) is missing target AArch64.
Zig requires LLVM to be built with all default targets enabled.
Call Stack (most recent call first):
CMakeLists.txt:135 (find_package)
-- Configuring incomplete, errors occurred!
*** Error code 1
Stop.
make: stopped in /usr/ports/lang/zig
=>> Cleaning up wrkdir
===> Cleaning for zig-0.14.0
build of lang/zig | zig-0.14.0 ended at Thu Jun 26 18:45:40 +03 2025
build time: 00:00:13
!!! build failure encountered !!!
pkg install zig gettext-tools hs-pandoc blueprint-compiler
git clone https://github.com/ghostty-org/ghostty
cd ghostty
zig build -p $HOME/.local -Dapp-runtime=gtk -Doptimize=ReleaseFast
[15:08][fmc000@tu45b-freebsd ~] $ ls -l .local/share/terminfo
lrwxr-xr-x 1 fmc000 fmc000 13 28 giu 15:02 .local/share/terminfo -> site-terminfo
[15:09][fmc000@tu45b-freebsd ~] $
[15:23][fmc000@tu45b-freebsd ~/.local/share/applications] $ cat ghostty.desktop
[Desktop Entry]
Name=Ghostty
Exec=ghostty
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=ghostty
Keywords=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross;
Terminal=false
Type=Application
Categories=System;TerminalEmulator;Utility;GTK;GNOME;
StartupNotify=true
DBusActivatable=true
X-GNOME-UsesNotifications=true
Actions=new-window;new-tab;
# Translators: Do NOT translate or transliterate this text (these are enum types)!
X-Purism-FormFactor=Workstation;Mobile;
[15:23][fmc000@tu45b-freebsd ~/.local/share/applications] $
Makes sense, its a source build. Port is in the works.Working good, nice terminal. This is what I did to make it work:
The integration with FreeBSD is not perfect. First I had to manually set the variable:Code:pkg install zig gettext-tools hs-pandoc blueprint-compiler git clone https://github.com/ghostty-org/ghostty cd ghostty zig build -p $HOME/.local -Dapp-runtime=gtk -Doptimize=ReleaseFast
GHOSTTY_RESOURCES_DIR=~/.local/share/ghostty
then I had to create a symbolic link:
so that the correct terminal type could be set. Not only that, I had to copy inside that dir the ghostty.termcap and ghostty.terminfo from the distribution.Code:[15:08][fmc000@tu45b-freebsd ~] $ ls -l .local/share/terminfo lrwxr-xr-x 1 fmc000 fmc000 13 28 giu 15:02 .local/share/terminfo -> site-terminfo [15:09][fmc000@tu45b-freebsd ~] $
Finally, I had to copy the icon icon_256.png from the distribution to ~/.icons/ghostty.png and then create the desktop file:
Code:[15:23][fmc000@tu45b-freebsd ~/.local/share/applications] $ cat ghostty.desktop [Desktop Entry] Name=Ghostty Exec=ghostty # Translators: Do NOT translate or transliterate this text (this is an icon file name)! Icon=ghostty Keywords=command;prompt;cmd;commandline;run;shell;terminal;kgx;kings cross; Terminal=false Type=Application Categories=System;TerminalEmulator;Utility;GTK;GNOME; StartupNotify=true DBusActivatable=true X-GNOME-UsesNotifications=true Actions=new-window;new-tab; # Translators: Do NOT translate or transliterate this text (these are enum types)! X-Purism-FormFactor=Workstation;Mobile; [15:23][fmc000@tu45b-freebsd ~/.local/share/applications] $
Yes, that's why I chose the "dot_local" build, so when the port is ready I can just delete everything and install it.Makes sense, its a source build. Ports is in the works.
WM_NAME
of the port is shown as "broken" and is empty as seen in xprop
output, i don't know how to solve it and why that happens.