Homebrew / legacy-homebrew

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

Cannot compile MLDonkey 3.1.0 on Lion 10.7.3 #10788

Closed x1a0 closed 12 years ago

x1a0 commented 12 years ago

This is my install output: https://gist.github.com/1999222

brew doctor shows: Warning: /Library/Frameworks/Mono.framework detected This can be picked up by CMake's build system and likely cause the build to fail. You may need to move this file out of the way to compile CMake.

It was compiled successfully in my 10.7.3. Yesterday I reinstall OSX and install Xcode 4.3. Then I got this... need help. thanks!

jacknagel commented 12 years ago

The problem is that ocamlc is invoking just gcc rather than the CC set in the environment, and the CFLAGS which are set for clang are not compatible with gcc.

I didn't see an obvious way to force it to use the right compiler; will look harder later.

adamv commented 12 years ago

https://trac.macports.org/changeset/89059

Sharpie commented 12 years ago

Perhaps re-bottling ocaml would cause it to default to another compiler? Although that may hose Lion users who have Xcode < 4.3...

jacknagel commented 12 years ago

This lets me build it:

ENV.libpng
ENV['OCAMLC'] = "#{HOMEBREW_PREFIX}/bin/ocamlc.opt -cc #{ENV.cc}"
inreplace 'Makefile', '-O6', '' if ENV.compiler == :clang
x1a0 commented 12 years ago

COOL! Adding codes above works for me! Thanks!

adamv commented 12 years ago

Reopening since we still have to pull this or do something.

adamv commented 12 years ago

Added this fix in bde9f3db878579f7c48b0f16cd5d5d8f7cd7f09b