Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.76k stars 12.45k forks source link

ical-buddy won't build with Xcode 10 on 10.13.6 #32194

Closed chdiza closed 6 years ago

chdiza commented 6 years ago

ical-buddy won't build from source on 10.13.6 when using the newly-released Xcode 10/CLT.

Here is the error:

pod2man --section=1 --release="" --center="icalBuddy configuration" --date="2018-09-18" icalBuddyConfig.pod > icalBuddyConfig.1
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [icalBuddy] Error 1
/usr/bin/curl --version
/usr/libexec/java_home --xml --failfast
/usr/local/hb/Library/Homebrew/debrew.rb:11:in `raise'
BuildError: Failed executing: make icalBuddy icalBuddy.1 icalBuddyLocalization.1 icalBuddyConfig.1 COMPILER=clang
1. raise
2. ignore
3. backtrace
4. irb
5. shell

Doctor (I know about the shellvar warning, but the report is about building from source, and I tested it without it set anyway and it makes no difference):

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have HOMEBREW_BUILD_FROM_SOURCE set. This environment variable is
intended for use by Homebrew developers. If you are encountering errors,
please try unsetting this. Please do not file issues if you encounter
errors when using this environment variable.

Config:

HOMEBREW_VERSION: 1.7.5-9-gc1e26f5
ORIGIN: https://github.com/Homebrew/brew
HEAD: c1e26f5677f054940e80471a0c86032c1bef9267
Last commit: 7 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: a180a510ca41071b2826441d49c1bb314503186e
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/hb
HOMEBREW_CACHE: /stuff/brache
HOMEBREW_TEMP: /Users/chdiza/.tmp/tmpdir
HOMEBREW_BUILD_FROM_SOURCE: 1
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_GIT: git
HOMEBREW_LOGS: /Users/chdiza/Library/Homebrew
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_EMOJI: 1
HOMEBREW_NO_GITHUB_API: 1
HOMEBREW_VERBOSE: 1
CPU: quad-core 64-bit ivybridge
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.19.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: N/A
macOS: 10.13.6-x86_64
CLT: 10.0.0.0.1.1535735448
CLT headers: N/A
Xcode: 10.0
XQuartz: N/A

Logs:

01.make 01.make.cc

chdiza commented 6 years ago

It will build outside of Homebrew, though. The only odd thing I see there are tons of warnings like this, which are also appearing all over the place as of Xcode 10/CLT:

ld: warning: text-based stub file /System/Library/Frameworks//Cocoa.framework/Cocoa.tbd and library file /System/Library/Frameworks//Cocoa.framework/Cocoa are out of sync. Falling back to library file for linking.
fxcoudert commented 6 years ago

It won't build on Mojave, for the same reason: the Makefile is passing -mmacosx-version-min=10.5 -arch i386 everywhere, both of which are deprecated with Xcode 10/Mojave.

We can report it upstream, but given this is a project that has been dead since 2014 :(

fxcoudert commented 6 years ago

I've written a pull request for upstream: https://github.com/ali-rantakari/icalBuddy/pull/21 I don't expect them to pick it up, since the project is not active. It could, however, be used as a patch to get icalBuddy building in Homebrew again. @chdiza a pull request would be very welcome!

MikeMcQuaid commented 6 years ago

It won't build on Mojave, for the same reason: the Makefile is passing -mmacosx-version-min=10.5 -arch i386 everywhere, both of which are deprecated with Xcode 10/Mojave.

@fxcoudert I thought https://github.com/Homebrew/brew/pull/4810 should have handled that. Did it not?

fxcoudert commented 6 years ago

So did I… I have to look into it, apparently it's not as effective as I thought. Same issue here, actually: https://github.com/Homebrew/homebrew-core/pull/32196#issuecomment-422741599

chdiza commented 6 years ago

both of which are deprecated with Xcode 10/Mojave

But then why does it build outside of Homebrew? This is weird!

fxcoudert commented 6 years ago

On my Mojave machine, with Xcode 10, it fails to build outside of Homebrew.

chdiza commented 6 years ago

OK, why does it build outside of Homebrew on 10.13.6?

fxcoudert commented 6 years ago

I don't know.

chdiza commented 6 years ago

The fact that it builds outside HB on 10.13.6, but not in HB, suggests that HB is maybe doing something weird.

Also, I'm not sure #4810 is relevant to a high sierra build failure, since (AFAICT) it only has an effect on Mojave.

fxcoudert commented 6 years ago

The clang toolchain in Xcode 10 on High Sierra (the so-called CLT) still supports the old features (32 bit binaries, libgcc_s, etc.) but not the SDK. Which explains why some installs may work or not, depending on how they are set up and what combination of Xcode/CLT you have installed.

chdiza commented 6 years ago

On my machine (High Sierra with Xcode 10 and the Xcode 10 CLT), this issue was fixed by:

commit 481ffcf4e105916a2a24c44d5f28c8dff39bcfd2
Author: FX Coudert <fxcoudert@gmail.com>
Date:   Wed Sep 19 22:39:33 2018 +0200

    super/cc: bump -mmacosx-version-min on High Sierra and later