fuse-ext2
fuse-ext2 copied to clipboard
can't build on mac with command line tools
Building on macosx fails if command line tools only are installed. All modules apart from this fuse-ext2 build and install successfully.
The error logged is:
Making all in macosx
( cd ../../tools/macosx/prefpane; \
xcodebuild; \
)
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
make[3]: *** [prefpane] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I don't know how the other modules build using just the command line tools, but downloading and installing the bloatware of Xcode (11GB) is unreasonable just for this final part of the install.
I wonder if using the brew version of autogen, autoconf, m4 etc instead of building them all from source would help here.
I installed autogen, libtool, autoconf, m4, e2fsprogs via brew and ran the following:
export PKG_CONFIG_PATH="/opt/homebrew/opt/e2fsprogs/lib/pkgconfig:$PKG_CONFIG_PATH"
./autogen.sh
CFLAGS="-idirafter/opt/homebrew/opt/e2fsprogs/include -idirafter/usr/local/include/osxfuse/" LDFLAGS="-L/opt/homebrew/Cellar/e2fsprogs/1.46.4/lib" ./configure
make
Again, not sure if this only worked because I had the full xcode, but at least I only had to build fuse-ext2 and not everything else.
@jswitzer Tested out on macOS 12.3 Beta (21E5212f). With no full Xcode installed.
Pretty smooth when running your commands. But had trouble with make
.
The output led me to install full Xcode:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
In my own case, I met this output again. Even with full Xcode installed. Searched for solutions, and found this.
Workaround:
- Download latest version of Xcode (Use beta version from https://developer.apple.com/download if you're using macOS beta).
- Unzip Xcode.xip and move Xcode.app to wherever you'd like to.
- Run
xcode-select -s <Path to Xcode.app>/Contents/Developer
(In my case,xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
) in terminal withsudo
privilege. - Rerun the commands provided.
I'm also not a fan of this enormous Xcode and trying not to use it at all, and until now doing well.
Here, xcode is basically used to generate the Preferences pane. If you can live without it, just deactivate the build of the tools
(only containing the pane) by commenting out SUBDIRS += tools
in Makefile.am
.
Make sure to have a clean directory before re-building by running make distclean
and reconfiguring the project.
PS: I didn't find an easy way to transform and xcodeproj into a Makefile-based project...