Homebrew / legacy-homebrew

💀 The former home of Homebrew/homebrew (deprecated)
https://brew.sh
26.97k stars 11.35k forks source link

Can't build brew install mysql #11754

Closed killtheliterate closed 12 years ago

killtheliterate commented 12 years ago

I cannot build mysql with homebrew. I've updated xcode, java developer tools, etc...

brew doctor seems to be pretty happy, too. All it outputs is "Error: class "Phpunit" expected but not found in phpunit.rb Double-check the name of the class in that formula. Error: Formula phpunit will not import. Your system is raring to brew."

brew -v install mysql output https://gist.github.com/2421317

adamv commented 12 years ago

CMakeCache.txt was copied to /Users/killtheliterate/Library/Logs/Homebrew can you gist that file too?

killtheliterate commented 12 years ago

Here's the log file https://gist.github.com/2422144

rodgerballard commented 12 years ago

Pretty sure your on the right track adamv. It seems the commit 8392df5c8f060d24e26940c2bde72f8d49f954e1 for cmake 2.8.8 is what is causing the problem. If you roll back to 2.8.7 the build compiles fine again. With 2.8.8 the build blows up.

OS X Lion 10.7.3 Xcode 4.3.2 installed at /Applications/Xcode.app/ Command line tools installed with xcode-select -switch /Applications/Xcode.app/Contents/Developer

adamv commented 12 years ago

Hey @mikemcquaid - possible Cmake weirdness incoming.

MikeMcQuaid commented 12 years ago

Looks like the build system probably has to be patched for CMake 2.8.8.

adamv commented 12 years ago

Note that there is at least a MySQL 5.5.21 out there. We tend to stay one version behind because they don't put the freshest version at a stable URL until it is archived. Which is bogus.

So someone should see if there are already newer MySQL point releases that address this.

adamv commented 12 years ago

I see "Current Generally Available Release: 5.5.23"

killtheliterate commented 12 years ago

Thank you for looking into this

jacknagel commented 12 years ago

Just tried 5.5.23 and I see the same failure.

uxp commented 12 years ago

5.5.21 and 5.5.22 also gave me the same failures

alancwoo commented 12 years ago

Also having same problem:

https://gist.github.com/2424868

Brew 0.9 Mysql 5.5.20 Apple Command Line Tools March 2012 (no xcode) Lion 10.7.3

jdx commented 12 years ago

+1

lucasmedeirosleite commented 12 years ago

Me too

cmfoster commented 12 years ago

Me three

amitkaz commented 12 years ago

+4

MikeMcQuaid commented 12 years ago

Performing Test HAVE_PEERCRED - Failed

That's the problem it seems. Try and patch out this test or force it to succeed.

uxp commented 12 years ago

@mikemcquaid The test fails if one downgrades cmake to 2.8.7, which does result in a valid build:

cd /usr/local
brew uninstall cmake
git checkout 948c2769 Library/Formula/cmake.rb
brew install mysql
2bits commented 12 years ago

Agree with @uxp, there is no reason that struct should be valid nor SO_PEERCRED to be found by switching to an earlier cmake. Here is there CMakeError.log. We can see from /usr/include/sys/socket.h that SO_PEERCRED is not defined, but we can find struct ucred defined in /usr/include/sys/ucred.h. The test should fail with clang and llvm-gcc, but I don't know why CMake-2.8.8 chokes. Does anyone know C++ enough to spot a syntax error there at the bottom of the log?

MikeMcQuaid commented 12 years ago

Fixed in f4009ef. A simple CMake syntax error. Patched and submitted upstream here: http://bugs.mysql.com/bug.php?id=65050

2bits commented 12 years ago

Wow. I'm sort of stunned @mikemcquaid that your fix for the LIST(REMOVE_DUPLICATES made the difference. I spotted that like other people did, but I would have thought CMake would stop right at the bug, not later. Because I didn't know CMake keeps going and that the HAVE_PEERCRED was the last test, I thought it was stopping at the actual error. Ugh.

MikeMcQuaid commented 12 years ago

You need to run CMake more than once to debug such things. I spotted the error on the first run half-way through the output and on the second run only the error was visible. CMake is weird :)