cannot build julia from source on OS X 10.9.3

194 views
Skip to first unread message

Federico Calboli

unread,
Jun 5, 2014, 7:45:59 AM6/5/14
to juli...@googlegroups.com
Hi All,

I am trying to build julia from source, OS X 10.9.3, 2.3 GHz intel core i7, XCode 5.1.1 with CLT installed, gfortran from homebrew (gcc48 --enable-fortran, I symlinked gfortran to gfortran-4.8 in /usr/local/bin).  I downloaed the source with git today (06/06/2014) and on make I get:

make
getarch_2nd.c:12:35: error: use of undeclared identifier
      'SGEMM_DEFAULT_UNROLL_M'
    printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
                                  ^
getarch_2nd.c:13:35: error: use of undeclared identifier
      'SGEMM_DEFAULT_UNROLL_N'
    printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
                                  ^
getarch_2nd.c:14:35: error: use of undeclared identifier
      'DGEMM_DEFAULT_UNROLL_M'
    printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
                                  ^
getarch_2nd.c:15:35: error: use of undeclared identifier
      'DGEMM_DEFAULT_UNROLL_N'
    printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
                                  ^
getarch_2nd.c:19:35: error: use of undeclared identifier
      'CGEMM_DEFAULT_UNROLL_M'
    printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
                                  ^
getarch_2nd.c:20:35: error: use of undeclared identifier
      'CGEMM_DEFAULT_UNROLL_N'
    printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
                                  ^
getarch_2nd.c:21:35: error: use of undeclared identifier
      'ZGEMM_DEFAULT_UNROLL_M'
    printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
                                  ^
getarch_2nd.c:22:35: error: use of undeclared identifier
      'ZGEMM_DEFAULT_UNROLL_N'
    printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
                                  ^
getarch_2nd.c:29:37: error: use of undeclared identifier
      'SGEMM_DEFAULT_UNROLL_M'
    printf("CGEMM3M_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
                                    ^
getarch_2nd.c:35:37: error: use of undeclared identifier
      'SGEMM_DEFAULT_UNROLL_N'
    printf("CGEMM3M_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
                                    ^
getarch_2nd.c:41:37: error: use of undeclared identifier
      'DGEMM_DEFAULT_UNROLL_M'
    printf("ZGEMM3M_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
                                    ^
getarch_2nd.c:47:37: error: use of undeclared identifier
      'DGEMM_DEFAULT_UNROLL_N'
    printf("ZGEMM3M_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
                                    ^
getarch_2nd.c:67:50: error: use of undeclared identifier 'SGEMM_DEFAULT_Q'
    printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * ...
                                                 ^
getarch_2nd.c:67:68: error: use of undeclared identifier
      'SGEMM_DEFAULT_UNROLL_N'
    printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEM...
                                                                   ^
getarch_2nd.c:68:50: error: use of undeclared identifier 'DGEMM_DEFAULT_Q'
    printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * ...
                                                 ^
getarch_2nd.c:68:68: error: use of undeclared identifier
      'DGEMM_DEFAULT_UNROLL_N'
    printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEM...
                                                                   ^
getarch_2nd.c:69:50: error: use of undeclared identifier 'CGEMM_DEFAULT_Q'
    printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * ...
                                                 ^
getarch_2nd.c:69:68: error: use of undeclared identifier
      'CGEMM_DEFAULT_UNROLL_N'
    printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEM...
                                                                   ^
getarch_2nd.c:70:50: error: use of undeclared identifier 'ZGEMM_DEFAULT_Q'
    printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ...
                                                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
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-v0.2.8/libopenblas.dylib] Error 1
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

???

Federico Calboli

unread,
Jun 5, 2014, 9:05:54 AM6/5/14
to juli...@googlegroups.com
A few details on my fortran:

which gfortran
/usr/local/bin/gfortran


gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc48/4.8.3/libexec/gcc/x86_64-apple-darwin13.2.0/4.8.3/lto-wrapper
Target: x86_64-apple-darwin13.2.0
Configured with: ../configure --build=x86_64-apple-darwin13.2.0 --prefix=/usr/local/Cellar/gcc48/4.8.3 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.8 --with-gmp=/usr/local/opt/gmp4 --with-mpfr=/usr/local/opt/mpfr2 --with-mpc=/usr/local/opt/libmpc08 --with-cloog=/usr/local/opt/cloog018 --with-isl=/usr/local/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew gcc48 4.8.3 --enable-fortran' --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 4.8.3 (Homebrew gcc48 4.8.3 --enable-fortran)

I presume the BLAS stuff is the OS provided.

BW

F

Federico Calboli

unread,
Jun 5, 2014, 4:30:49 PM6/5/14
to juli...@googlegroups.com
apparently julia has been here before on a mac


no idea of the solution though



On Thursday, 5 June 2014 12:45:59 UTC+1, Federico Calboli wrote:

Viral Shah

unread,
Jun 6, 2014, 1:21:18 AM6/6/14
to juli...@googlegroups.com
Seems like it is failing on compiling a C file. For now, you can try USE_SYSTEM_BLAS=1, and it should avoid compiling OpenBLAS. I am using the gfortran from brew too (4.8.2), but it was a bottle, IIRC. Do you have Homebrew gcc also installed?

Did you pass any other build options to the julia make?

-viral

Viral Shah

unread,
Jun 6, 2014, 1:39:23 AM6/6/14
to juli...@googlegroups.com
Could you file this as an issue? I wonder if it is specific to core i7.

-viral

Elliot Saba

unread,
Jun 6, 2014, 2:25:15 AM6/6/14
to Julia Dev
This tends to happen when OpenBLAS can't detect your CPU type.  Try setting OPENBLAS_TARGET_ARCH=SANDYBRIDGE or something when building Julia.  This will pass SANDYBRIDGE to the OpenBLAS make system.  You can find a list of architectures you can pass in here.

Federico Calboli

unread,
Jun 6, 2014, 5:15:40 AM6/6/14
to juli...@googlegroups.com
I have gfortran as a part of  homebrew's gcc 4.8:

Using built-in specs.
COLLECT_GCC=/usr/local/bin/gcc-4.8
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc48/4.8.3/libexec/gcc/x86_64-apple-darwin13.2.0/4.8.3/lto-wrapper
Target: x86_64-apple-darwin13.2.0
Configured with: ../configure --build=x86_64-apple-darwin13.2.0 --prefix=/usr/local/Cellar/gcc48/4.8.3 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.8 --with-gmp=/usr/local/opt/gmp4 --with-mpfr=/usr/local/opt/mpfr2 --with-mpc=/usr/local/opt/libmpc08 --with-cloog=/usr/local/opt/cloog018 --with-isl=/usr/local/opt/isl011 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew gcc48 4.8.3 --enable-fortran' --with-bugurl=https://github.com/Homebrew/homebrew-versions/issues --enable-plugin --disable-nls --enable-multilib
Thread model: posix
gcc version 4.8.3 (Homebrew gcc48 4.8.3 --enable-fortran)

i.e. it's gcc 4.8.3 with fortran.  I do not understand what you mean with gfortran being a bottle though!

I did not pass any make arguments at all

Federico Calboli

unread,
Jun 6, 2014, 5:16:00 AM6/6/14
to juli...@googlegroups.com
I can file an issue

Federico Calboli

unread,
Jun 6, 2014, 5:21:39 AM6/6/14
to juli...@googlegroups.com
OK I'll try that but in general I would like to get to the point where I do not need to faff around with Make.inc & Co. I am getting this problem because I have a new machine, three days ago on a different laptop (a 2012 MBP) I could build julia with make and never have to think to any issue -- it just worked!

Viral Shah

unread,
Jun 6, 2014, 5:54:14 AM6/6/14
to juli...@googlegroups.com

We try our best to do so. Given that OpenBLAS is also open source and volunteer driven, it takes them time to catch up with newer architectures.

Could you also provide details about your CPU from system profiler?

-viral

Federico Calboli

unread,
Jun 6, 2014, 5:57:44 AM6/6/14
to juli...@googlegroups.com
I did not mean to sound ungrateful!  

My CPU:

sysctl -a | grep machdep | egrep 'model|family'

machdep.cpu.family: 6
machdep.cpu.model: 70
machdep.cpu.extmodel: 4
machdep.cpu.extfamily: 0

The model is this (http://www.everymac.com/systems/apple/macbook_pro/specs/macbook-pro-core-i7-2.3-15-iris-only-late-2013-retina-display-specs.html) and the bridge is a "Haswell/Crystalwell".  I edited Make.inc to OPENBLAS_TARGET_ARCH=SANDYBRIDGE and make is running now, I will keep you posted.  I am also writing a new issue where I will report whether this fix worked or not.

Best

F

Federico Calboli

unread,
Jun 6, 2014, 6:07:05 AM6/6/14
to juli...@googlegroups.com
Setting OPENBLAS_TARGET_ARCH=SANDYBRIDGE seems to have worked:

julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "help()" to list help topics
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.3.0-prerelease+3526 (2014-06-06 05:57 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 72d0b10* (0 days old master)
|__/                   |  x86_64-apple-darwin13.2.0
Reply all
Reply to author
Forward
0 new messages