Invalid CPU name x86-64 error when building with MARCH=x86-64

Hi all,
I’m trying to build julia from source (up to date master branch commit cb7a569…) on a small cluster. This works fine with default options. However, the cluster nodes have different CPU types and I need a system image that works across the whole cluster. In the past (last tried with julia 0.6.4) I’ve handled this by just putting MARCH=x86-64 in Make.user. However, building the current master from a fresh clone with MARCH=x86-64 and nothing else in Make.user crashes with the following error (with a bit of extra output from make for context):

CC src/llvm-alloc-opt.o
CC src/cgmemmgr.o
CC src/llvm-api.o

LINK usr/lib/
CC ui/repl.o
LINK usr/bin/julia
JULIA usr/lib/julia/corecompiler.ji
ERROR: Invalid CPU name x86-64 . recipe for target '/disk1/common/juliaLang/julia-master/usr/lib/julia/corecompiler.ji' failed

I’m building on a machine running Ubuntu 16.04.5. Running

gcc -march=native -Q --help=target | grep -- '-march=' | cut -f3

returns ivybridge as the CPU type if that’s helpful. It’s the oldest CPU on the cluster I’m building for.

I’m wondering if this is a bug in julia or the julia build system or if I’m doing something wrong. Do I need to add anything else to Make.user or to have this work? I wanted to check that I’m not missing something before filing an issue about this.

Thanks, Patrick

You probably need x86_64 rather than x86-64. Edit: no; it turns out I don’t know what’s going on here :-/

Did LLVm change it? llc -mcpu=help for LLVM 5.0 and 7.0 both say x86-64 is the valid name, which is also the name I normalized into. Both x86-64 and x86_64 should be supported as JULIA_CPU_TARGET.

Thanks very much for the replies. Rather unexpectedly, I got everything to build with


in Make.user. Setting MARCH=x86_64 gave the following error

/disk1/common/juliaLang/julia-master-compile-test/deps/SuiteSparse_wrapper.c:1:0: error: bad value (x86_64) for -march= switch
 #include <string.h>

I’ll file an issue about this. Running julia -C help shows x86-64 as an available CPU type but not x86_64. It also shows ivybridge as an available cpu type but building with MARCH=ivybridge gave the same error shown in my original post.

Issue opened: