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

Mac 10.9 Compilation Issue: llvm won't compile? #5803

Closed
gibiansky opened this issue Feb 13, 2014 · 9 comments
Closed

Mac 10.9 Compilation Issue: llvm won't compile? #5803

gibiansky opened this issue Feb 13, 2014 · 9 comments
Labels
building Build system, or building Julia or its dependencies system:mac Affects only macOS

Comments

@gibiansky
Copy link

I run make after having downloaded Julia from HEAD and get the following error (after some lengthy compilation):

/usr/local/bin/cp: cannot stat ‘/Users/silver/dev/julia-src/deps/llvm-3.3/build_Release/lib/Target/X86/Release/X86GenRegisterInfo.inc.tmp’: No such file or directory
make[6]: *** [X86GenRegisterInfo.inc] Error 1
make[5]: *** [X86/.makeall] Error 2
make[4]: *** [Target/.makeall] Error 2
make[3]: *** [all] Error 1
make[2]: *** [llvm-3.3/build_Release/Release/lib/libLLVMJIT.a] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2
@gibiansky
Copy link
Author

If I then cd deps and then make (in that dir), it seems to work (at least it doesn't give this error). It then gives an error about OpenBlas... (which doesn't let me make TARGET=HASWELL)

@staticfloat
Copy link
Member

  1. Run make distclean to reset Julia to pristine checkout state

  2. Please remove your llvm-config script from `/usr/local/bin/

  3. Run make -C deps install-llvm to ensure that LLVM itself can be installed

If that works,

  1. Run make OPENBLAS_TARGET_ARCH=HASWELL. Note however that OpenBLAS in this case is version 0.2.8, it's not HEAD like you were installing via brew. To get the latest version of OpenBLAS, you need to go into deps/Versions.make and change the v0.2.8 to master develop. That will hopefully dodge the haswell bug on OpenBLAS.

@gibiansky
Copy link
Author

Did everything, but make TARGET=HASWELL still doesn't work, even on HEAD of OpenBLAS... :(

@staticfloat
Copy link
Member

So you ran make OPENBLAS_TARGET_ARCH=HASWELL in the Julia directory, after editing deps/Versions.make? Sorry to ask the same question again, your last comment is a little unclear to me. Also, is LLVM still failing, or is it working?

@gibiansky
Copy link
Author

Ah, sorry I wasn't clear. LLVM works now. So, I guess it's the fact that I had brews llvm linked. So I guess we can close this issue.

However, though LLVM worked, I replaced the openblas line in Versions.make with OPENBLAS_VER = master, ran with make OPENBLAS_TARGET_ARCH=HASWELL, and OpenBlas still claims

20 errors generated.
make[3]: *** [getarch_2nd] Error 1
Makefile:129: *** OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail..  Stop.
*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0 if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***
make[2]: *** [openblas-master/libopenblas.dylib] Error 1
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

@staticfloat
Copy link
Member

Oh. I am such a fool. You need to set OPENBLAS_VER = develop, not master.

@gibiansky
Copy link
Author

Oh! Sorry, I have never dealt with Versions.make :) It is actually doing something now instead of failing immediately. Will report once compiles or fails.

@gibiansky
Copy link
Author

Everything seems to work now with the normal Julia compilation. So I guess I had to:

  • brew unlink llvm
  • Change OPENBLAS_VER to OPENBLAS_VER = develop in Versions.make

After which everything worked; Julia compiles from source and runs.

@staticfloat
Copy link
Member

Great. Now let's go back to the other issue, and see if we can apply this to that problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies system:mac Affects only macOS
Projects
None yet
Development

No branches or pull requests

3 participants