This repository has been archived by the owner. It is now read-only.

llvm34 and llvm35 fail to build #340

Closed
StephanDollberg opened this Issue Jan 27, 2014 · 32 comments

Comments

Projects
None yet
Contributor

StephanDollberg commented Jan 27, 2014

Both llvm34 and llvm35 fail to build. Building with --with-asan --with-clang --with-libcxx --rtti

The error is

1 error generated.
rm: /private/tmp/llvm34-qYqt/llvm-3.4/tools/llvm-config/Release+Asserts/llvm-config.d.tmp: No such file or directory
make[1]: *** [/private/tmp/llvm34-qYqt/llvm-3.4/tools/llvm-config/Release+Asserts/llvm-config.o] Error 1
make: *** [all] Error 1

The gist shows the error on 3.4, however it's exactly the same on 3.5.
https://gist.github.com/StephanDollberg/8645430

OS is 10.9.1. Doctor is fine.

Thanks,
Stephan

Contributor

adamv commented Jan 27, 2014

Probably fixed by Mike's recent updates to the llvm brews.

@adamv adamv closed this Jan 27, 2014

Contributor

StephanDollberg commented Jan 27, 2014

Hi @adamv,

unfortunately not. I assume his changes fixed the python related stuff from my other referenced bug report.

@adamv adamv reopened this Jan 27, 2014

EdShaw commented Jan 29, 2014

I'm experiencing this issue too, on llvm34. Up to date Homebrew, nothing worrying in doctor, et al.

Adding --all-targets option seems to bypass the issue.

sevki commented Jan 29, 2014

I'm getting

llvm[4]: Linking Release+Asserts unit test Tooling (without symbols)
clang++   -O3 -Wl,-dead_strip -rdynamic -Wl,-rpath -Wl,@executable_path/../lib -L/private/tmp/llvm35-Gyno/Release+Asserts/lib -L/private/tmp/llvm35-Gyno/Release+Asserts/lib -Wl,-rpath -Wl,/private/tmp/llvm35-Gyno/Release+Asserts/lib   -m64  -o Release+Asserts/ToolingTests  /private/tmp/llvm35-Gyno/tools/clang/unittests/Tooling/Release+Asserts/CommentHandlerTest.o /private/tmp/llvm35-Gyno/tools/clang/unittests/Tooling/Release+Asserts/CompilationDatabaseTest.o /private/tmp/llvm35-Gyno/tools/clang/unittests/Tooling/Release+Asserts/RecursiveASTVisitorTest.o /private/tmp/llvm35-Gyno/tools/clang/unittests/Tooling/Release+Asserts/RefactoringCallbacksTest.o /private/tmp/llvm35-Gyno/tools/clang/unittests/Tooling/Release+Asserts/RefactoringTest.o /private/tmp/llvm35-Gyno/tools/clang/unittests/Tooling/Release+Asserts/ReplacementsYamlTest.o /private/tmp/llvm35-Gyno/tools/clang/unittests/Tooling/Release+Asserts/RewriterTest.o /private/tmp/llvm35-Gyno/tools/clang/unittests/Tooling/Release+Asserts/ToolingTest.o -lclangTooling -lclangFrontend -lclangSerialization -lclangDriver -lclangParse -lclangRewriteCore -lclangRewriteFrontend -lclangSema -lclangAnalysis -lclangEdit -lclangAST -lclangASTMatchers -lclangLex -lclangBasic \
    -lgtest -lgtest_main -lLLVM-3.5svn   -lz -lpthread -lffi -lcurses -lm
llvm[4]: ======= Finished Linking Release+Asserts Unit test Tooling (without symbols)
make: *** [all] Error 1

with brew install --HEAD llvm35 --with-libcxx --with-clang --rtti --all-targets

Contributor

StephanDollberg commented Jan 29, 2014

I can confirm both. llvm34 builds fine with --all-targets but llvm35 doesn't. The error is however different to the one without --all-targets and mine is similar to the one from @sevki .

sevki commented Jan 29, 2014

Ok here is the kicker, there is not much changed in terms of formula, and branch release_34 builds like a dream, but 3.5 does not.
Also included the diff between 3.4 and 3.5 for reference

3c3
< class Llvm34 < Formula
---
> class Llvm35 < Formula
5,35d4
< 
<   stable do
<     url 'http://llvm.org/releases/3.4/llvm-3.4.src.tar.gz'
<     sha1 '10b1fd085b45d8b19adb9a628353ce347bc136b8'
< 
<     resource 'clang' do
<       url 'http://llvm.org/releases/3.4/clang-3.4.src.tar.gz'
<       sha1 'a6a3c815dd045e9c13c7ae37d2cfefe65607860d'
<     end
< 
<     resource 'clang-tools-extra' do
<       url 'http://llvm.org/releases/3.4/clang-tools-extra-3.4.src.tar.gz'
<       sha1 '56afa36c2ddd11a53f1e199152b04dfb9347d93a'
<     end
< 
<     resource 'compiler-rt' do
<       url 'http://llvm.org/releases/3.4/compiler-rt-3.4.src.tar.gz'
<       sha1 'd644b1e4f306f7ad35df0a134d14a1123cd9f082'
<     end
< 
<     resource 'polly' do
<       url 'http://llvm.org/releases/3.4/polly-3.4.src.tar.gz'
<       sha1 '90891113f687018e6d0c0ad484afc3b221b89a8f'
<     end
< 
<     resource 'libcxx' do
<       url 'http://llvm.org/releases/3.4/libcxx-3.4.src.tar.gz'
<       sha1 'c45333dce3e6bdac2583682417c03b6bb149ceb0'
<     end
<   end
< 
37c6
<     url 'http://llvm.org/git/llvm.git', :branch => 'release_34'
---
>     url 'http://llvm.org/git/llvm.git'
40c9
<       url 'http://llvm.org/git/clang.git', :branch => 'release_34'
---
>       url 'http://llvm.org/git/clang.git'
44c13
<       url 'http://llvm.org/git/clang-tools-extra.git', :branch => 'release_34'
---
>       url 'http://llvm.org/git/clang-tools-extra.git'
48c17
<       url 'http://llvm.org/git/compiler-rt.git', :branch => 'release_34'
---
>       url 'http://llvm.org/git/compiler-rt.git'
52c21
<       url 'http://llvm.org/git/polly.git', :branch => 'release_34'
---
>       url 'http://llvm.org/git/polly.git'
56c25
<       url 'http://llvm.org/git/libcxx.git', :branch => 'release_34'
---
>       url 'http://llvm.org/git/libcxx.git'
58d26
<   end
60,62c28,31
<   resource 'libcxxabi' do
<     url 'http://llvm.org/git/libcxxabi.git', :branch => 'release_32'
<   end if MacOS.version <= :snow_leopard
---
>     resource 'libcxxabi' do
>       url 'http://llvm.org/git/libcxxabi.git'
>     end if MacOS.version <= :snow_leopard
>   end
81c50
<   def ver; '3.4'; end # version suffix
---
>   def ver; '3.5'; end # version suffix

sevki commented Feb 7, 2014

is this a wontfix? anyone else having the same issues?

Contributor

StephanDollberg commented Feb 7, 2014

Didn't try it for a time, is there still no fix?

sevki commented Feb 7, 2014

Nope. at least I couldn’t find it
-S

Just chiming in and adding that my build bails at linking – similar to @sevki – with brew install llvm35 --HEAD --with-clang --shared --with-asan --rtti --with-libcxx:

==> make VERBOSE=1
llvm[4]: Linking Release+Asserts unit test Tooling (without symbols)
clang++   -O3 -Wl,-dead_strip -rdynamic -Wl,-rpath -Wl,@executable_path/../lib -L/private/tmp/llvm35-sBUS/Release+Asserts/lib -L/private/tmp/llvm35-sBUS/Release+Asserts/lib -Wl,-rpath -Wl,/private/tmp/llvm35-sBUS/Release+Asserts/lib   -m64  -o Release+Asserts/ToolingTests  /private/tmp/llvm35-sBUS/tools/clang/unittests/Tooling/Release+Asserts/CommentHandlerTest.o /private/tmp/llvm35-sBUS/tools/clang/unittests/Tooling/Release+Asserts/CompilationDatabaseTest.o /private/tmp/llvm35-sBUS/tools/clang/unittests/Tooling/Release+Asserts/RecursiveASTVisitorTest.o /private/tmp/llvm35-sBUS/tools/clang/unittests/Tooling/Release+Asserts/RefactoringCallbacksTest.o /private/tmp/llvm35-sBUS/tools/clang/unittests/Tooling/Release+Asserts/RefactoringTest.o /private/tmp/llvm35-sBUS/tools/clang/unittests/Tooling/Release+Asserts/ReplacementsYamlTest.o /private/tmp/llvm35-sBUS/tools/clang/unittests/Tooling/Release+Asserts/RewriterTest.o /private/tmp/llvm35-sBUS/tools/clang/unittests/Tooling/Release+Asserts/ToolingTest.o -lclangTooling -lclangFrontend -lclangSerialization -lclangDriver -lclangParse -lclangRewriteCore -lclangRewriteFrontend -lclangSema -lclangAnalysis -lclangEdit -lclangAST -lclangASTMatchers -lclangLex -lclangBasic \
    -lgtest -lgtest_main -lLLVM-3.5svn   -lz -lpthread -lffi -ledit -lcurses -lm
llvm[4]: ======= Finished Linking Release+Asserts Unit test Tooling (without symbols)
make: *** [all] Error 1

loquens commented Feb 18, 2014

I successfully built llvm34 with this command line:

brew install --HEAD llvm34 --with-asan --with-clang --with-libcxx --rtti --all-targets

To build llvm35 i've had to install HEAD isl first:

brew install isl --HEAD
brew install --HEAD llvm35 --with-asan --with-clang --with-libcxx --rtti --all-targets

sevki commented Feb 18, 2014

@loquens why isl?

sevki commented Feb 18, 2014

@loquens that did the trick

loquens commented Feb 19, 2014

@sevki
I made this conclusion due to this build error:

ScheduleOptimizer.cpp:399:13: error: use of undeclared identifier
'isl_band_member_is_coincident'
        if (isl_band_member_is_coincident(Band, j))

sevki commented Feb 19, 2014

Nailed it. you should probably update the formula-S

On Wed, Feb 19, 2014 at 7:26 AM, loquens notifications@github.com wrote:

@sevki
I made this conclusion due to build error logs:

ScheduleOptimizer.cpp:399:13: error: use of undeclared identifier
'isl_band_member_is_coincident'
        if (isl_band_member_is_coincident(Band, j))

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

loquens commented Feb 20, 2014

Don't know how to do it :(

Contributor

StephanDollberg commented Feb 20, 2014

Hmm, llvm35 obviously already depends on isl, maybe not on the HEAD version. Did you try without HEAD?

https://github.com/Homebrew/homebrew-versions/blob/master/llvm35.rb#L44

sevki commented Feb 20, 2014

@StephanDollberg yes. thats already installed when you try to install the formula.

sevki commented Feb 20, 2014

paging @adamv. looked at the formula cookbook no luck there, how does one go about making a formula depend on head of another formula?

loquens commented Feb 20, 2014

@StephanDollberg I posted build log message earlier, which clearly indicates function name existing only in HEAD version of isl.

loquens commented Feb 20, 2014

And, of course, at first I tried without installing isl directly. Version, installed by dependencies, didn't succeeded

Building against isl HEAD works for me – see above #340 (comment). Lets update the formula.

Contributor

StephanDollberg commented Mar 4, 2014

I saw there were some changes to the formulas. Anybody tried whether this bug is fixed? I will try tomorrow.

llvm35 built against isl HEAD works fine for me, but I can't get llvm34 to build successfully even with --all-targets on 10.9.2 — I get the same issue jbergstroem pasted earlier.
Have any fixes been identified?

Contributor

petere commented May 28, 2014

Not sure if it's the same, but llvm34 fails to build for me, like this:

  COMPILE:   clang_darwin_embedded/soft_static/armv6m: /private/tmp/llvm34-xCGH/llvm-3.4/projects/compiler-rt/lib/int_util.c
/private/tmp/llvm34-xCGH/llvm-3.4/Release+Asserts/bin/clang -fPIC -arch armv6m -Wall -Werror -Oz -fomit-frame-pointer -ffreestanding -static -mfloat-abi=soft -c -o /private/tmp/llvm34-xCGH/llvm-3.4/tools/clang/runtime/compiler-rt/clang_darwin_embedded/soft_static/armv6m/SubDir.lib/int_util.o /private/tmp/llvm34-xCGH/llvm-3.4/projects/compiler-rt/lib/int_util.c
error: unable to create target: 'No available targets are compatible with this triple, see -version for the available targets.'
1 error generated.
make[5]: *** [/private/tmp/llvm34-xCGH/llvm-3.4/tools/clang/runtime/compiler-rt/clang_darwin_embedded/soft_static/armv6m/SubDir.lib/int_util.o] Error 1

Command line was

HOMEBREW_MAKE_JOBS=1 brew install -v llvm34 --with-asan --with-clang

If I add --all-targets, it succeeds.

Having the similar issue, I dig into it. Here is what I did to install llvm35 on 10.9:

  • using HEAD of isl was not enough
  • using -vd options I've seen an error stating that isl 0.10 was not found (no idea why it need this version...)
  • using brew version isl to find sha of isl 0.10, and tried to installed with method 3a)
  • but the download from both main url and mirror failed. You need to brew edit isl to change the url to http://isl.gforge.inria.fr/isl-0.10.tar.bz2.
  • installing llvm35 still failed, guess what: you need isl HEAD...
  • installing isl HEAD (don't forget to unlink isl and restore the formula.rb first), and manually linking isl 0.10 (cd /usr/local/lib && ln -s ../Cellar/isl/0.10/lib/libisl.10.dylib libisl.10.dylib)
  • installing llvm35 succeeded then with brew install -vd llvm35 --HEAD --rtti --with-asan --with-clang --with-libcxx.

Maybe symlinking libisl.10.dylib to the HEAD version works. I didn't tried.

Hope it can help a few of you!

vovkasm commented Jun 13, 2014

Errors like «ld: file not found: /usr/local/lib/libisl.10.dylib for architecture x86_64» when isl builds with HEAD generated because also cloog depends on isl, in this command exists argument «-lcloog-isl».
Output from otool show problem:

[~]$ otool -L /usr/local/lib/libcloog-isl.dylib
/usr/local/lib/libcloog-isl.dylib:
        /usr/local/lib/libcloog-isl.4.dylib (compatibility version 5.0.0, current version 5.0.0)
        /usr/local/lib/libisl.10.dylib (compatibility version 13.0.0, current version 13.1.0)
        /usr/local/lib/libgmp.10.dylib (compatibility version 12.0.0, current version 12.3.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

But actually we have:

[~]$ ls /usr/local/lib/ | grep isl
cloog-isl
isl
libcloog-isl.4.dylib
libcloog-isl.a
libcloog-isl.dylib
libisl.13.dylib
libisl.a
libisl.dylib

Also cloog not builds correctly with HEAD isl. Will try with more recent version of cloog...

vovkasm commented Jun 13, 2014

So now I can build llvm35 with applied this patch Homebrew/homebrew#30115 and commands:

brew uninstall isl
brew install --HEAD isl
brew uninstall cloog
brew install --HEAD cloog
brew install --rtti --with-clang --with-libcxx --HEAD llvm35
Contributor

denji commented Jun 19, 2014

Not found, the compiler polly pollycc, but he is in the Formula, trying to collect manually using the script polly.sh

alias pollycc="clang -Xclang -load -Xclang /usr/local/Cellar/llvm35/HEAD/lib/llvm-3.5/lib/LLVMPolly.dylib"

lu-zero commented Aug 25, 2014

Disabling polly makes at least llvm35 build today.

wrotte added a commit to wrotte/homebrew-versions that referenced this issue Aug 26, 2014

Polly (from LLVM) requires very specific versions of ISL and CLOOG.
Per the [project documentation](http://repo.or.cz/w/polly-mirror.git/blob/HEAD:/utils/checkout_cloog.sh), Polly is only tested against very specific versions of Cloog and ISL.  These versions can be found in a [script they use to checkout cloog](http://repo.or.cz/w/polly-mirror.git/blob/HEAD:/utils/checkout_cloog.sh).

This should fix Homebrew/homebrew-versions#340.
Contributor

jacknagel commented Sep 5, 2014

Closed by #517

@jacknagel jacknagel closed this Sep 5, 2014

@krisr krisr referenced this issue in Homebrew/legacy-homebrew Sep 15, 2014

Closed

llvm35 HEAD failed to build on 10.9.4 #32318

minrk pushed a commit to minrk/homebrew-versions that referenced this issue Oct 30, 2014

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.