Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

brew install postgresql fails during link step in Mac OS (10.7.4) with XCode 4.3.3 #13044

Closed
mscottford opened this issue Jun 26, 2012 · 15 comments

Comments

@mscottford
Copy link
Contributor

I've posted the verbose output of running brew install postgresql to a gist. https://gist.github.com/2998598

brew is suggesting that #11759 might be helpful, but none of the solutions there have helped. I've already tried the following.

  • running brew install --use-gcc postgresql
  • running brew install --use-clang postgresql
  • running brew install --use-llvm postgresql
  • running CC=/usr/bin/gcc-4.2 brew install postgresql
  • running export CC=/usr/bin/gcc-4.2 && brew install postgresql
  • running brew install postgresql --32-bit
  • running brew install postgresql --without-ossp-uuid
  • running brew install postgresql --no-python
  • running PYTHON=/usr/local/bin/python brew install postgresql

I've noticed that postgreqsl 9.0.4 is already installed on the system, but many of the commands that I'd expect to be there are missing, such as initdb and pg_ctl, so I don't want to use that version.

I suspect that the issue I'm encountering is caused by libraries from the system version of postgresql are being linked against, but I'm not sure how to test this.

Running brew doctor results in Your system is raring to brew..

@nielsen
Copy link

nielsen commented Jun 26, 2012

+1 Real headache.

@simen
Copy link

simen commented Jun 26, 2012

Me too. Also with 4.3.2

@samueljohn
Copy link
Contributor

Does #13037 help you?
So, cd /usr/local
git checkout -b test
brew pull 13037
?
Revert by git checkout master.

@simen
Copy link

simen commented Jun 26, 2012

Thanks! It worked like a charm

@samueljohn
Copy link
Contributor

Ok just don't forget to revert once that fix is in homebrew. Otherwise brew update might show git conflicts.

@alecnmk
Copy link

alecnmk commented Jun 27, 2012

thanks man! worked for me! my env is below

CPU: quad-core 64-bit sandybridge
OS X: 10.7.4-x86_64
Xcode: 4.3.3

@matthewlehner
Copy link

+1 for #13037
Postgres installed like a dream.

@nielsen
Copy link

nielsen commented Jun 27, 2012

+1

Thanks!

On Tuesday, June 26, 2012 at 7:58 PM, Matthew Lehner wrote:

+1 for #13037
Postgres installed like a dream.


Reply to this email directly or view it on GitHub:
#13044 (comment)

@mscottford
Copy link
Contributor Author

@samueljohn That fixed the problem. Thanks a bunch.

@fj
Copy link

fj commented Jun 27, 2012

Thanks, @samueljohn -- this unblocked two of our new developers, each of whom lost a day to workstation setup that should have taken a couple of hours instead. If you're ever in Charlottesville, VA, let me know so I can buy you lunch!

@samueljohn
Copy link
Contributor

@fj ... will you punch me in the face when I tell you that is was (partly) my fault the issue occurred in the first place?

I committed a change which added the OS X SDK-root from Xcode to the "-L" flags in order to support Xcode-only setups because Apple does not ship their OS with the SDK anymore. The assumption that the SDK in the Xcode and in the "Command Line Tools" are identical seems not to hold but 99% of the formulae are fine with this. However, due to unknown reasons postgresql and valgrind (and poppler and zookeeper) fail to build. I feel so sorry that your devs lost two days and felt like homebrew is broken. The opposite was my intention - make Homebrew work out of the box. I think a buildbot (and automated tests) could have prevented this - but we have no.

@fj
Copy link

fj commented Jun 27, 2012

@samueljohn Automated tests and a buildbot would be nice. Homebrew is definitely beyond the minimal complexity needed to make CI worthwhile, especially with the (I'm sure) vast array of potential configurations it might have to support.

This is probably something that's worth talking about with the other major contributors, but you guys could pretty easily raise some funds to support a hosted OSX instance and run per-commit continuous integration, especially with all the time and money that Homebrew saves teams.

@chalkers
Copy link

Thanks it works! Love you! Works :)

@afriapps
Copy link

Hi! I tried that and get the following errors:

afriappsmini:local afriapps$ brew pull 13037
######################################################################## 100,0%
==> Applying patch
Applying: Fix #13012 properly and don't set the SDK if CLT
error: patch failed: Library/Homebrew/cmd/doctor.rb:210
error: Library/Homebrew/cmd/doctor.rb: patch does not apply
error: patch failed: Library/Homebrew/extend/ENV.rb:231
error: Library/Homebrew/extend/ENV.rb: patch does not apply
error: patch failed: Library/Homebrew/utils.rb:298
error: Library/Homebrew/utils.rb: patch does not apply
Patch failed at 0001 Fix #13012 properly and don't set the SDK if CLT
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Error: Failure while executing: git am --signoff --whitespace=fix /Library/Caches/Homebrew/13037.patch

Any ideas?

@samueljohn
Copy link
Contributor

@afriapps The #13037 has long been pulled and is alrady in homebrew, therefore applying it now again fails.
Type the suggested git am --abort (to abort this patching) in your brew --prefix directory.

You should brew update. If that is now failing due to git mess up, do git reset --hard HEAD (considering this will remove all changes you did to homebrew source.)

If you have an issue with postgres, then check the FAQ for what we need to know when you open a new issue.

Thanks!

@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants