The goal of efficiency is more slack.

Wednesday, January 07, 2026

Compiling ntfs-3g on macOS 15

Compiling ntfs-3g on macOS 15

This guide shows how to install fuse-t and build ntfs-3g from source on macOS 15.


0️⃣ Install dependencies and clone the repository

# Tap the macOS fuse-t cask repository brew tap macos-fuse-t/homebrew-cask # Install fuse-t and build tools brew install mounty fuse-t git automake autoconf libtool libgcrypt pkg-config gnutls # Clone the ntfs-3g repository git clone https://github.com/macos-fuse-t/ntfs-3g cd ntfs-3g

1️⃣ Prepare the system for fuse-t headers

sudo mkdir -p /usr/local/include sudo ln -s "/Library/Application Support/fuse-t/include/fuse" /usr/local/include/

2️⃣ Set compiler and linker flags

export CFLAGS='-I/usr/local/include/fuse -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -mmacosx-version-min=15.0' export LDFLAGS="-L/usr/local/lib -lfuse-t -Wl,-rpath,/usr/local/lib" export MACOSX_DEPLOYMENT_TARGET=15.0
  • CFLAGS ensures headers are found and proper FUSE version is used.  
  • LDFLAGS tells the linker where to find libfuse-t.dylib and sets the runtime path.
  • Ensure there are no spaces in the paths specified in the -I and -L arguments. That's why we symlinked the directory previously.
  • MACOSX_DEPLOYMENT_TARGET ensures the correct macOS API level. (Not sure if this is needed.)

3️⃣ Prepare the build system

./autogen

4️⃣ Configure build directories

./configure \ --prefix=/usr/local \ --exec-prefix=/usr/local \ --with-fuse=external \ --sbindir=/usr/local/bin \ --bindir=/usr/local/bin
  • -=prefix / --exec-prefix → install libraries and headers under /usr/local
  • --bindir / --sbindir → install binaries under /usr/local/bin (avoid /bin)
  • --with-fuse=external → use the installed fuse-t headers/libraries 

5️⃣ Patch Makefile (macOS-only)

Comment out the Linux-specific library move in libntfs-3g/Makefile:

# if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \ # $(MV) -f "$(DESTDIR)/$(libdir)"/libntfs-3g.so* "$(DESTDIR)/$(rootlibdir)"; \ # fi
  • macOS uses .dylib, not .so → this step is unnecessary and fails due to SIP.


6️⃣ Build and install

make -j$(sysctl -n hw.ncpu) sudo make install
  • Binaries → /usr/local/bin (ntfs-3g, lowntfs-3g)
  • Headers → /usr/local/include/ntfs-3g
  • Libraries → /usr/local/lib/libntfs-3g.dylib

7️⃣ Verify installation

/usr/local/bin/ntfs-3g --version
  • If you get a missing library error for libfuse-t.dylib, temporarily set:

export DYLD_LIBRARY_PATH=/usr/local/lib

ntfs-3g is now compiled and installed with fuse-t on macOS 15.


Alternate instructions: Mounty App

Tuesday, June 01, 2021

Fixing sound on RetroPie after updating and installing Desktop Environment

I started out by imaging retropie-buster-4.7.1-rpi2_3.img.gz onto an SD card for a Raspberry Pi 3 B. Then I updated the software using the menus in EmulationStation. Then I installed the desktop environment, again with the ES menus. What resulted was audio no longer working in EmulationStation and the console emulators. I did a whole bunch of things to troubleshoot, so I'm not sure what actually made it work.

/boot/config:

hdmi_drive=2
hdmi_force_hotplug=1
hdmi_force_edid_audio=1

Install:

sudo apt install pavucontrol pulseaudio-utils
sudo apt-get install lxplug-volumepulse

In the desktop environment, add Volume Control panel to the menu bar.

In EmulationStation, Audio Card: hw, Audio Device: HDMI.

Troubleshooting

Play audio with Alsa:

sudo aplay /usr/share/sounds/alsa/Front_Center.wav

Speaker test:

speaker-test -D sysdefault -t wav

Wednesday, July 08, 2020

ffmpeg write mp3 metadata

To create an mp3 file with some ID3 metadata. This example is to create files corresponding to chapters of an audiobook. Shell script:

#!/bin/sh

# Convert to mp3 with metadata. Use some defaults, pass some parameters.
# Parameters: 1: input file name, 2: chapter/track, 3: start time

ffmpeg -ss $3 -i "$1" -metadata artist="Some artist" -metadata album="An album name" -metadata genre="Books & Spoken" -metadata title=$2 -metadata track=$2 "Chapter $2.mp3"

Note that the first parameter is expected to be passed in in quotes if it has spaces.

Thursday, July 02, 2020

Sunday, June 28, 2020

Friday, June 26, 2020

FileZilla Server on Windows 8 and Xfinity

Purpose: To install FileZilla Server, an FTP server, on Windows 8 on an Xfinity network with an ARRIS TG1682G Gateway.

Note: It's very cumbersome to safely open ports with Xfinity. Next time, I'll just set up a cygwin SSH server so I only have to open one port.

Configure server

Install FileZilla Server

Once installed, to change startup behavior, run services.msc and edit settings for FileZilla Server FTP server.

Add user

Edit > Users > Users > Add
General > Check "Enable account".
Enter Password.
Shared folders > Add, browse to a directory.
Select permissions, e.g.  check all the boxes for full access.
OK

General Settings

Miscellaneous > Check "Start minimized"
Passive mode settings > Check "Use custom port range", input an arbitrary range above 1023, e.g.: 56960-56965
FTP over TLS settings > Check "Enable FTP over TLS support (FTPS)".
Check "Disable plain unencrypted FTP".
Click "Generate new certificate.."
2-Digit country code e.g.: US
Click Browse... and browse for a place to save the certificate.
Click "Generate certificate".
OK

Windows Firewall

Control Panel > Windows Firewall > Allow an app or feature through Windows Firewall
Change settings
Allow another app...
Browse... > Browse to installed location of FileZilla server, e.g. C:\Program Files (x86)\FileZilla Server\FileZilla Server.exe
Check Private, uncheck Public.

Get IP of server

https://duckduckgo.com/ip
Note the IP listed after "Your IP Address is".

Configure Xfinity port forwarding

Xfinity Internet/xFi > Network > Network Devices > Gateway > Advanced Settings or https://internet.xfinity.com/network/gateway.
Near bottom: More > Advanced Settings
Port Forwarding
Add port forwarding
Select the device running the FTP server.
Add TCP/UDP for 21, 990, and the custom port range for Passive mode set above, e.g. 56960-56965.

Configure client

Install FileZilla client.
Site Manager... > New site
Protocol: FTP
Host: input the IP of the server noted above.
Encryption: Use explicit FTP over TLS if available.
Input User and Password configured in server above.
OK (to save)
Site Manager... > Double click the newly added host to try to connect. It will fail to connect because of Xfinity's threat detection.

Allow exceptions on Xfinity

Xfinity's threat detection will block incoming requests on every port you've just opened, so you must allow them here.

Xfinity Internet/xFi > Network > Advanced Security or https://internet.xfinity.com/network/security.
Under the device running the FTP server, you will see 1 or more "threats" detected.
Click "Can't Access This Device?" > Threat History.
For each line with Source IP that matches the client's source IP and time of attempted connection, click Allow Access.
On the client computer, disconnect and reconnect to the server as many times as needed to get all the passive ports listed as a "threat" so you can then click Allow on them.

Note that these access exceptions only last 30 days, so you'll have to repeat them then or when the client's IP changes.

Sunday, October 13, 2019

Installing GStreamer Development for Visual Studio 2019

Install and create template.
  1. Browse to https://gstreamer.freedesktop.org/ > Downloads.
  2. Download and install both MinGW 64-bit runtime installer and development installer.
  3. In Visual Studio 2019, open \gstreamer\1.0\x86_64\share\vs\2010\gst-template\gst-template.vcxproj
  4. Project > Export Template.
 Run example.
  1. Download https://gitlab.freedesktop.org/gstreamer/gst-docs/
  2. Expand tutorials folder.
  3. Open tutorials.sln.
  4. Set solution platform to x64.
  5. Solution Explorer > Solution ''tutorials' > basic-tutorial-1 > Properties
    1. Debugging > Working Directory: $(GSTREAMER_1_0_ROOT_X86_64)\bin
      Note: To get the variable name, in cmd.exe, enter: set gstreamer
    2. Linker > Input > Ignore All Default Libraries > No (or delete setting)
    3. For Debug configuration, Ignore Specific Default Libraries: msvcrtd.lib
      Note: The gstreamer libraries were apparently built with /MD and not /MDd.

Popular Posts

Recent Posts

Unordered List

Text Widget

Pages

Powered by Blogger.
Scroll To Top