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

macOS 10.12 and Xcode 8.0 broken formulae #1957

Closed
DomT4 opened this issue Jun 14, 2016 · 124 comments
Closed

macOS 10.12 and Xcode 8.0 broken formulae #1957

DomT4 opened this issue Jun 14, 2016 · 124 comments
Labels
10.12 Sierra is specifically affected upstream issue An upstream issue report is needed

Comments

@DomT4
Copy link
Member

DomT4 commented Jun 14, 2016

Please don't try to use Xcode 7 on 10.12. Compiling almost anything will fail in fun ways. Install the Xcode 8 beta or the 8.x CLT package & ensure you've pointed sudo xcode-select --switch at either one.

Like Christmas, once a year a new operating system for Macs swings around... and like Christmas a bunch of toys get broken accidentally. This year's broken toys include:

Broken:

Upstream/Homebrew 10.12 support hacks:

Resolved:

Just so people are aware: Comments highlighting issues that turn out not to be actual formulae issues, i.e. user configuration problems, will be chopped after a couple of days to keep this thread from getting drowned.

@DomT4 DomT4 added help wanted Task(s) needing PRs from the community or maintainers in progress Stale bot should stay away upstream issue An upstream issue report is needed 10.12 Sierra is specifically affected labels Jun 14, 2016
@MikeMcQuaid
Copy link
Member

I'd like to suggest we actively disable Qt on 10.12. There will be no way in hell upstream will officially support it and we're in the process of trying to kill it anyway.

@DomT4
Copy link
Member Author

DomT4 commented Jun 14, 2016

Agreed. That does effectively set a hard deadline on migrating across as much stuff to qt5 as we can before GM. It's not a difficult timetable, but will require a fair bit of work.

@jeregrine
Copy link

@DomT4 I have xcode7 installed I also have xcode-beta (xcode8) installed

@DomT4
Copy link
Member Author

DomT4 commented Jun 14, 2016

@jeregrine You probably need to sudo xcode-select --switch over to the beta Xcode & ensure the CLT (If you have them installed) are the 8.0 version. Xcode 7 will break almost everything on 10.12, pretty much.

@zhiayang
Copy link

zhiayang commented Jun 15, 2016

since this appears to be a general issue thread, i'll just add to it:

GHC fails to build, erroring with this:

Last 15 lines from /Users/zhiayang/Library/Logs/Homebrew/ghc/08.make:

rts/posix/GetTime.c:42:44: error:  error: expected expression

rts/posix/GetTime.c:43:44: error:
     error: use of undeclared identifier 'info'; did you mean 'int'?
        timer_scaling_factor_denom = (uint64_t)info.denom;
                                               ^~~~
                                               int

rts/posix/GetTime.c:43:44: error:  error: expected expression
6 errors generated.
`clang' failed in phase `C Compiler'. (Exit code: 1)
make[1]: *** [rts/dist/build/posix/GetTime.p_o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2

Just a hunch, but maybe some includes aren't being included properly, and some types aren't defined properly.

Did a gist-logs: https://gist.github.com/anonymous/2e04db4167fd75d8b9104be5a0b0c65e
Not entirely urgent since I'll just install Haskell Platform using the pkg.

@jeregrine
Copy link

@mistydemeo
Copy link
Member

@zhiayang Looks like the actual error came slightly earlier in the output:

rts/posix/GetTime.c:40:5: error:
     error: use of undeclared identifier 'mach_timebase_info_data_t'
        mach_timebase_info_data_t info;
        ^

@mistydemeo
Copy link
Member

I can repro; looking into it.

@DomT4
Copy link
Member Author

DomT4 commented Jun 15, 2016

wxmac is a known issue at least, fixed in head apparently. Will add it my the top comment.

@mistydemeo
Copy link
Member

I see what's wrong with GHC. This is an upstream bug, I'll submit a patch upstream.

Sierra introduces clock_gettime, which wasn't included in previous versions of OS X. It's a POSIX function to retrieve time, either realtime or monotonic. OS X also includes a Mach-specific monotonic time function.

The initializeTimer function in GHC's rts/posix/GetTime.c has some Darwin-specific behaviour using the mach time structs/functions:

#ifdef darwin_HOST_OS
static uint64_t timer_scaling_factor_numer = 0;
static uint64_t timer_scaling_factor_denom = 0;
#endif

void initializeTimer()
{
#ifdef darwin_HOST_OS
    mach_timebase_info_data_t info;
    (void) mach_timebase_info(&info);
    timer_scaling_factor_numer = (uint64_t)info.numer;
    timer_scaling_factor_denom = (uint64_t)info.denom;
#endif
}

However, everywhere else that uses time functions guards against both darwin_HOST_OS and HAVE_CLOCK_GETTIME. This includes Clock.h, which guards its includes like so:

#ifdef HAVE_CLOCK_GETTIME
# ifdef _POSIX_MONOTONIC_CLOCK
#  define CLOCK_ID CLOCK_MONOTONIC
# else
#  define CLOCK_ID CLOCK_REALTIME
# endif
#elif defined(darwin_HOST_OS)
# include <mach/mach.h>
# include <mach/mach_time.h>
#endif

e.g., the mach_time header won't get included if clock_gettime is available. This can be fixed by improving the guard in initializeTimer, so it skips using any of the mach functions if clock_gettime is available.

@zhiayang
Copy link

Ah, thank you @mistydemeo. seems weird apple adds POSIX compliance somewhere, then breaks it elsewhere (read: nm issues over with ghc people)

Also another broken package: homebrew-versions/llvm37
Error here:

Last 15 lines from /Users/zhiayang/Library/Logs/Homebrew/llvm37/04.make:
SYMROOT=/private/tmp/llvm37-20160616-84812-n12rra/llvm-3.7.1.src/projects/libcxx

cd lib && ./buildit
+ for FILE in '../src/*.cpp'
+ /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -g -Os -arch i386 -arch x86_64 -nostdinc++ -std=c++11 -fstrict-aliasing -Wall -Wextra -Wshadow -Wconversion -Wpadded -Wstrict-aliasing=2 -Wstrict-overflow=4 -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I../include ../src/algorithm.cpp
In file included from ../src/algorithm.cpp:11:
In file included from ../include/random:1645:
../include/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)'
basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
                                           ^
../include/string:1326:40: note: previous declaration is here
    _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a)
                                       ^
1 error generated.
make: *** [install] Error 1

Appears something in libcxx broke. Worked in 10.11, obviously. Gist is here:
https://gist.github.com/anonymous/b01ec33f72ed02ee66aaaac068332e4f#file-02-make-cc

Again not that urgent, because it turns out llvm38 installs, so I have something else to use.
Thanks again.

@mistydemeo
Copy link
Member

mistydemeo commented Jun 16, 2016

libgcrypt builds with optimization turned off. Something's clearly different about clang 8.0, wonder if the bug's on the clang side.

EDIT: also builds -O1; it's just broken with -Os and -O2.

@mistydemeo
Copy link
Member

haskell-stack is broken: https://gist.github.com/a2633dccfb4adef13cce3975f3032d2d

@DomT4
Copy link
Member Author

DomT4 commented Jun 16, 2016

Feel free to edit my original post to add/remove to/from the list as desired Misty, and other maintainers.

@mistydemeo
Copy link
Member

mistydemeo commented Jun 16, 2016

After getting through haskell-stack's dependencies by retrying a few times, stack itself fails with an interesting error:

[ 4 of 87] Compiling System.Process.Read ( src/System/Process/Read.hs, dist/dist-sandbox-2c433b3d/build/System/Process/Read.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 8.0.1 for x86_64-apple-darwin):
    Loading temp shared object failed: dlopen(/var/folders/4d/rttdp_9d2s7f36zplgwnqrgr0000gn/T/ghc79664_0/libghc_44.dylib, 5): no suitable image found.  Did find:
    /var/folders/4d/rttdp_9d2s7f36zplgwnqrgr0000gn/T/ghc79664_0/libghc_44.dylib: malformed mach-o: load commands size (40192) > 32768

https://gist.github.com/8e005710eab17139c02267bac3029e33

@mistydemeo
Copy link
Member

@DomT4 wxmac 3.1.0 (the --devel version) builds fine on 10.12. I'm going to guess that this was fixed by wxWidgets/wxWidgets@5ba67c6, which removed Carbon support and in the process excised a lot of places that used Quicktime. That's far too big to backport to 3.0.2, but with any luck there will be a stable wx that includes this by the time Sierra is out.

mistydemeo added a commit that referenced this issue Jun 16, 2016
@mistydemeo
Copy link
Member

mistydemeo commented Jun 16, 2016

GTK+3 fails trying to find CUPS: https://gist.github.com/fa1be8e62572fcfa2c4ea1b6ecc8ff29

checking for cups-config... /usr/bin/cups-config
configure: error: CUPS >= 1.2 not found

I'm guessing it may be a regex bug, since CUPS on El Cap is 1.6 whereas CUPS on Sierra is 2.2.

@mistydemeo
Copy link
Member

The CUPS issue is known, Macports carries a patch: https://trac.macports.org/browser/trunk/dports/gnome/gtk3/files/cups.patch Doesn't look like it was reported upstream though.

mistydemeo added a commit that referenced this issue Jun 16, 2016
@DomT4
Copy link
Member Author

DomT4 commented Jun 17, 2016

@mistydemeo You are magical; thank you for hunting a bunch of these down.

@mistydemeo
Copy link
Member

perl is broken: https://gist.github.com/mistydemeo/37cb3474a09c51b7356683a31b41352b

"../../miniperl" "-I../../lib" "-I../../lib" "../../lib/ExtUtils/xsubpp"  -typemap "../../lib/ExtUtils/typemap" -typemap "typemap"  HiRes.xs > HiRes.xsc && mv HiRes.xsc HiRes.c
cc -c   -fno-common -DPERL_DARWIN -mmacosx-version-min=10.12 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings -Wthread-safety -O3   -DVERSION=\"1.9733\" -DXS_VERSION=\"1.9733\"  "-I../.."  -DTIME_HIRES_NANOSLEEP -DTIME_HIRES_CLOCK_GETTIME -DTIME_HIRES_CLOCK_GETRES -DTIME_HIRES_CLOCK_NANOSLEEP -DTIME_HIRES_CLOCK -DTIME_HIRES_STAT=1 -DATLEASTFIVEOHOHFIVE HiRes.c
HiRes.xs:945:15: error: use of undeclared identifier 'darwin_time_mutex'
  MUTEX_INIT(&darwin_time_mutex);
              ^
1 error generated.
make[1]: *** [HiRes.o] Error 1
cc -c   -fno-common -DPERL_DARWIN -mmacosx-version-min=10.12 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings -Wthread-safety -O3   -DVERSION=\"1.9733\" -DXS_VERSION=\"1.9733\"  "-I../.."  -DTIME_HIRES_NANOSLEEP -DTIME_HIRES_CLOCK_GETTIME -DTIME_HIRES_CLOCK_GETRES -DTIME_HIRES_CLOCK_NANOSLEEP -DTIME_HIRES_CLOCK -DTIME_HIRES_STAT=1 -DATLEASTFIVEOHOHFIVE HiRes.c
HiRes.xs:945:15: error: use of undeclared identifier 'darwin_time_mutex'
  MUTEX_INIT(&darwin_time_mutex);
              ^

Looks like a clock_gettime bug again.

@mistydemeo
Copy link
Member

Yup:

#if defined(PERL_DARWIN)
#  ifdef USE_ITHREADS
  MUTEX_INIT(&darwin_time_mutex);
#  endif
#endif

As with GHC, the code that defines the struct is guarded by an #ifdef that checks for whether realtime clock functions are available, but code that uses the struct is used unconditionally on Darwin.

@chdiza
Copy link
Contributor

chdiza commented Sep 16, 2016

screenresolution problem reported upstream. Not holding my breath: no commits since May 2014.

@ilovezfs
Copy link
Contributor

same GHC panic attempting to build git-annex 🙈

stack itself is off the hook.

@zmwangx
Copy link
Contributor

zmwangx commented Sep 16, 2016

Looks like we'll have to do the unavoidable: rebuild GHC, possibly a dozen times.

@ilovezfs
Copy link
Contributor

upstream GHC is looking into it as well since Stack has been ruled out as the cause.

so splendid: https://gist.github.com/ilovezfs/67795d2df41f74fc25f448d48600671d

@zmwangx
Copy link
Contributor

zmwangx commented Sep 16, 2016

GHC just won the annual best fatal error message award:

ghc: panic! (the 'impossible' happened)

@zmwangx
Copy link
Contributor

zmwangx commented Sep 16, 2016

Not sure if there's any more value in spamming this issue, but jack is broken:

https://bot.brew.sh/view/Testing/job/Homebrew%20Sierra%20Testing/782/version=sierra_2/testReport/junit/brew-test-bot/sierra/install_jack/

TIMER_ABSTIME is undefined for clock_nanosleep. I thought OS X conforms to POSIX 2001?

@zmwangx
Copy link
Contributor

zmwangx commented Sep 17, 2016

open-scene-graph broken: https://bot.brew.sh/view/Testing/job/Homebrew%20Sierra%20Testing/790/version=sierra_2/testReport/junit/brew-test-bot/sierra/install_open_scene_graph/

Rather interesting:

CMake Error at CMakeLists.txt:183 (LIST):
  list index: 2 out of range (-2, 1)

@zmwangx
Copy link
Contributor

zmwangx commented Sep 17, 2016

irrlicht is broken: https://bot.brew.sh/view/Testing/job/Homebrew%20Sierra%20Testing/796/version=sierra_2/testReport/junit/brew-test-bot/sierra/install_irrlicht/

/tmp/irrlicht-20160917-64459-123oi19/irrlicht-1.8.3/source/Irrlicht/zlib/inflate.c:1491:61: warning: shifting a negative signed value is undefined [-Wshift-negative-value]
    if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
                                                        ~~~ ^

@zmwangx
Copy link
Contributor

zmwangx commented Sep 17, 2016

alergo broken in Xcode 8 due to including QuickTime/QuickTime.h: https://bot.brew.sh/view/Testing/job/Homebrew%20Sierra%20Testing/797/version=sierra_2/testReport/junit/brew-test-bot/sierra/install_allegro/

@zmwangx
Copy link
Contributor

zmwangx commented Sep 18, 2016

dshb is in Swift 2.2 so it clearly won't build against Xcode 8. Reported upstream beltex/dshb#36. Will boneyard if there's no response for a while.

@lightsing
Copy link

Is this is a problem of Xcode?

System: OS X EI Captian 10.11.6
Xcode: Version 7.3.1 (7D1014)

`brew install wine --devel
==> Installing dependencies for wine: pkg-config
==> Installing wine dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.1_2.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pkg-config-0.29.1_2.el_capitan.bottle.tar.gz
🍺 /usr/local/Cellar/pkg-config/0.29.1_2: 10 files, 627.3K
==> Installing wine
==> Using the sandbox
==> Downloading https://dl.winehq.org/wine/source/1.9/wine-1.9.19.tar.bz2
Already downloaded: /Users/Tsing/Library/Caches/Homebrew/wine-1.9.19.tar.bz2
==> Downloading https://bugs.winehq.org/attachment.cgi?id=52384
Already downloaded: /Users/Tsing/Library/Caches/Homebrew/wine--patch-30766403f5064a115f61de8cacba1defddffe2dd898b59557956400470adc699.cgi
==> Patching
==> Applying attachment.cgi
patching file dlls/wined3d/surface.c
Hunk #1 succeeded at 1465 (offset -816 lines).
Hunk #2 succeeded at 1811 (offset -816 lines).
==> ./configure --prefix=/usr/local/Cellar/wine/1.9.19 --without-mpg123
==> make install
Last 15 lines from /Users/Tsing/Library/Logs/Homebrew/wine/02.make:
bison -p parser_ -o parser.tab.c parser.y
clang -m32 -c -o parser.yy.o parser.yy.c -I. -I../../include -D__WINESRC__ -Wall -pipe -fno-strict-aliasing
-Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wstrict-prototypes -Wtype-limits
-Wvla -Wwrite-strings -Wpointer-arith -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
clang -m32 -c -o parser.tab.o parser.tab.c -I. -I../../include -D__WINESRC__ -Wall -pipe -fno-strict-aliasing
-Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wstrict-prototypes -Wtype-limits
-Wvla -Wwrite-strings -Wpointer-arith -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
clang -m32 -c -o parser.tab.o parser.tab.c -I. -I../../include -D__WINESRC__ -Wall -pipe -fno-strict-aliasing
-Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wstrict-prototypes -Wtype-limits
-Wvla -Wwrite-strings -Wpointer-arith -gdwarf-2 -gstrict-dwarf -fno-omit-frame-pointer -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
clang -m32 -o wrc dumpres.o genres.o newstruc.o po.o readres.o translation.o utils.o wrc.o writeres.o
parser.tab.o parser.yy.o ../../libs/port/libwine_port.a ../../libs/wpp/libwpp.a
clang -m32 -o widl client.o expr.o hash.o header.o proxy.o register.o server.o typegen.o typelib.o
typetree.o utils.o widl.o write_msft.o parser.tab.o parser.yy.o ../../libs/port/libwine_port.a
../../libs/wpp/libwpp.a

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
https://github.com/Homebrew/homebrew-core/issues`

@zmwangx
Copy link
Contributor

zmwangx commented Sep 19, 2016

@lightsing Please follow https://git.io/brew-troubleshooting and post your gist-logs.

@jonct
Copy link

jonct commented Sep 19, 2016

so why does it fail for @mateusdelbianco and me?

Indeed. I've been trying to get up to speed on the python/sqlite3 problem for days, off and on. This issue came up in my search and seemed to be my most promising lead toward finding a solution or workaround.

I'm running GM everything. I'd eventually resorted to nuking /usr/local and reinstalling Homebrew. Even then: my python 2 wouldn't import sqlite3. I believe I was facing the same results as @extink.

As it turns out, @zmwangx provided a vital clue above but I'd missed it so I'll be explicit for drive-by readers like me: the CLI tools are no longer considered optional or equivalent to the Xcode app.

Once I used xcode-select --install I was finally able to install and use Python with sqlite3 support.

@daenney
Copy link
Contributor

daenney commented Sep 19, 2016

Ah, that might also explain why it works for me. I have no need for the full Xcode so I generally only xcode-select --install. However that should be equivalent to installing Xcode and then in the preferences checking the box/thing that makes it install the CLT, which afaik always needed to happen to get the CLT in previous Xcode versions too.

@mateusdelbianco
Copy link

Actually python and python3 were both working on one of my machines and failing on another. Now that people mentioned, one difference between my machines was exactly the CLT. The one that was working had CLT installed, while the failing had only Xcode. Shame on me for not noticing this huge difference earlier...

@JCount
Copy link
Contributor

JCount commented Sep 20, 2016

It might be worth noting that 10.12 has effectively removed QTKit.framework as well. It still technically exists, but everything besides the QTMovieModernizer class was removed, and what is left is only there to covert "legacy" media resources into a format that AVFoundation.framework can handle. Therefore, any formula that explicitly or implicitly built against QTKit will probably be "broken" to some extent.

EDIT:
Reference: https://developer.apple.com/reference/qtkit

@kode54
Copy link

kode54 commented Sep 21, 2016

Off topic, but this bodes well for my analog video capture device, which is based on an Empia 28xx chipset, and is only supported by a QuickTime extension that was relicensed from echofx.com by Geniatech and company. I suppose maybe one of them will get off their dead butt and make an AVFoundation driver, if they ever realize that 10.9 is no longer new.

@zmwangx
Copy link
Contributor

zmwangx commented Sep 21, 2016

shadowsocks-libev failed on 10.11 with Xcode 8, not 10.12.

@chdiza
Copy link
Contributor

chdiza commented Sep 23, 2016

Turns out that screenresolution's failure is an Xcode 8 problem, not specifically a Sierra one. It bombs out identically on ElCap with Xcode 8.

I have reported this nugget upstream also.

@mantrasuser
Copy link

I am having Qt problem while I am trying to install gnuplot

brew install gnuplot --with-qt5 and brew install gnuplot --with-qt fails I guess it is related to this issue. Do you have any idea?

@zmwangx
Copy link
Contributor

zmwangx commented Sep 25, 2016

I think this issue is too long right now and approaching worthlessness because the top post hasn't been updated (not OP's fault). @DomT4 What about we lock this and let people open individual reports going forward?

@DomT4
Copy link
Member Author

DomT4 commented Sep 27, 2016

Aye. This served its purpose well, and I appreciate everyone's contributions and journey with us through 10.12/Xcode 8 being prerelease but let's shuffle things off into individual issues at this point as we have in previous years.

@DomT4 DomT4 closed this as completed Sep 27, 2016
@Homebrew Homebrew locked and limited conversation to collaborators Sep 27, 2016
@fxcoudert fxcoudert removed help wanted Task(s) needing PRs from the community or maintainers in progress Stale bot should stay away labels Sep 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
10.12 Sierra is specifically affected upstream issue An upstream issue report is needed
Projects
None yet
Development

No branches or pull requests