# Cannot build Julia -- openblas issues

**URL:** <https://discourse.julialang.org/t/cannot-build-julia-openblas-issues/3142>\
**Category:** Internals & Design\
**Created:** [April 10, 2017, 1:30pm UTC](https://discourse.julialang.org/t/cannot-build-julia-openblas-issues/3142 "2017-04-10T13:30:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Federico\_Calboli](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@Federico\_Calboli](https://discourse.julialang.org/u/Federico_Calboli)\
**Post date:** [April 10, 2017, 1:30pm UTC](https://discourse.julialang.org/t/cannot-build-julia-openblas-issues/3142/1 "2017-04-10T13:30:40Z")

</div>

Hi, I am trying to build Julia stable on OS X 10.12.4 (Intel core I7), with

GNU Fortran (Homebrew GCC 5.4.0\_1) 5.4.0  
Copyright (C) 2015 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.  
You may redistribute copies of GNU Fortran  
under the terms of the GNU General Public License.  
For more information about these matters, see the file named COPYING

I am failing to build because:

../kernel/x86\_64/dgemm\_kernel\_4x8\_sandy.S:1849:1: error: unexpected token at start of statement

#### Writing Back

^  
make[3]: \*\*\* [dtrmm\_kernel\_LN\_SANDYBRIDGE.o] Error 1  
make[2]: \*\*\* [libs] Error 1  
\*\*\* 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[1]: \*\*\* [build/openblas-12ab1804b6ebcd38b26960d65d254314d8bc33d6/libopenblas64\_.dylib] Error 1  
make: \*\*\* [julia-deps] Error 2

I tried the make -C deps clean-openblas and make OPENBLAS\_TARGET\_ARCH=NEHALEM and make OPENBLAS\_USE\_THREAD=0 but neither works (I get the same exact error).

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [April 10, 2017, 4:01pm UTC](https://discourse.julialang.org/t/cannot-build-julia-openblas-issues/3142/2 "2017-04-10T16:01:54Z")

</div>

This is due to [https://github.com/xianyi/OpenBLAS/issues/942](https://github.com/xianyi/OpenBLAS/issues/942) and is fixed on master after [https://github.com/JuliaLang/julia/pull/20842](https://github.com/JuliaLang/julia/pull/20842). I don’t think that fix has been backported, but you can apply that patch locally to fix your build.

---

<div class="post-metadata">

**Author:** ![Federico\_Calboli](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@Federico\_Calboli](https://discourse.julialang.org/u/Federico_Calboli)\
**Post date:** [April 10, 2017, 7:27pm UTC](https://discourse.julialang.org/t/cannot-build-julia-openblas-issues/3142/3 "2017-04-10T19:27:55Z")

</div>

How did it come up all at once today? I noticed it because Pkg.update() was throwing some issues, so I tried make cleanall && make with the error cropping up. Should I move to 0.6?

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [April 11, 2017, 5:48am UTC](https://discourse.julialang.org/t/cannot-build-julia-openblas-issues/3142/4 "2017-04-11T05:48:04Z")

</div>

> [@Federico\_Calboli](#):
>
> How did it come up all at once today?

You probably updated your system compiler? It only happens with clang 3.9.

> [@Federico\_Calboli](#):
>
> Should I move to 0.6?

That’s entirely up to you (depending on package compatibility, whether you’re still dealing with 0.5 depwarns, etc). If you want to stick with 0.5, you can also use eg. gcc to compile Julia with. Or use the binaries from [Download Julia](https://julialang.org/downloads/)

---

<div class="post-metadata">

**Author:** ![Federico\_Calboli](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@Federico\_Calboli](https://discourse.julialang.org/u/Federico_Calboli)\
**Post date:** [April 11, 2017, 8:33am UTC](https://discourse.julialang.org/t/cannot-build-julia-openblas-issues/3142/5 "2017-04-11T08:33:42Z")

</div>

> [@maleadt](#):
>
> That’s entirely up to you (depending on package compatibility, whether you’re still dealing with 0.5 depwarns, etc). If you want to stick with 0.5, you can also use eg. gcc to compile Julia with. Or use the binaries from [Download Julia](https://julialang.org/downloads/)

I’m happy to pass to 0.6 given it is going to get stable at the end of the month, though there is no git checkout release-0.6 (please note, I am interested in julia, not git) – would I be able to pin my installation with

git fetch origin release-0.6 && git merge FETCH\_HEAD

after installing ‘as is’ today and then pinning once 0.6 becomes the new stable release?

---

<div class="post-metadata">

**Author:** ![vchuravy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vchuravy/32/8_2.png) [@vchuravy](https://discourse.julialang.org/u/vchuravy)\
**Post date:** [April 11, 2017, 8:50am UTC](https://discourse.julialang.org/t/cannot-build-julia-openblas-issues/3142/6 "2017-04-11T08:50:21Z")

</div>

You can say

```bash
git fetch origin
git checkout v0.6.0-pre.beta

```

To switch to the current beta release and the use:

```bash
git fetch origin
git checkout v0.6.0

```

To switch to the stable version. Right now development for 0.7 has not branched of master yet so the current equivalent of `release-0.6` is `master`. In general it is recommend to stay on tags and not the `release-*` branches, since the tags are better tested.

---

<div class="post-metadata">

**Author:** ![Federico\_Calboli](https://avatars.discourse-cdn.com/v4/letter/f/c0e974/32.png) [@Federico\_Calboli](https://discourse.julialang.org/u/Federico_Calboli)\
**Post date:** [April 11, 2017, 9:16am UTC](https://discourse.julialang.org/t/cannot-build-julia-openblas-issues/3142/7 "2017-04-11T09:16:14Z")

</div>

> [@vchuravy](#):
>
> You can say
> 
> ```bash
> git fetch origin
> git checkout v0.6.0-pre.beta
> 
> ```
> 
> To switch to the current beta release and the use:
> 
> ```bash
> git fetch origin
> git checkout v0.6.0
> 
> ```
> 
> To switch to the stable version. Right now development for 0.7 has not branched of master yet so the current equivalent of `release-0.6` is `master`. In general it is recommend to stay on tags and not the `release-*` branches, since the tags are better tested.

Many thanks! I feel I am learning more about git that I ever wanted to ;)! incidentally, pinning release-\* is suggested by the julia source download github page.

---

<div class="post-metadata">

**Author:** ![vchuravy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vchuravy/32/8_2.png) [@vchuravy](https://discourse.julialang.org/u/vchuravy)\
**Post date:** [April 11, 2017, 10:20am UTC](https://discourse.julialang.org/t/cannot-build-julia-openblas-issues/3142/8 "2017-04-11T10:20:28Z")

</div>

Learning git is quite rewarding 🙂 Staying on a `releas-X` branch is not wrong per se, but in my opinion it is safer use the official tags and only update when necessary.
