Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jetojedno opened this issue Dec 9, 2021 · 3 comments
Open

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

jetojedno opened this issue Dec 9, 2021 · 3 comments

Comments

@jetojedno
Copy link

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
Copy link

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
Copy link

RiverKy commented Feb 21, 2022

@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 with sudo privilege.
  • Rerun the commands provided.

@jmon12
Copy link

jmon12 commented Oct 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants