alperakcan / fuse-ext2

Fuse-ext2 is a multi OS FUSE module to mount ext2, ext3 and ext4 file system devices and/or images with read write support.
GNU General Public License v2.0
798 stars 127 forks source link

can't build on mac with command line tools #124

Open jetojedno opened 2 years ago

jetojedno commented 2 years ago

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.

jswitzer commented 2 years ago

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.

RiverKy commented 2 years ago

@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:

jmon12 commented 11 months ago

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...