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

Build error with Intel Compilers v15 on OSX #9145

Closed
helgee opened this issue Nov 25, 2014 · 27 comments
Closed

Build error with Intel Compilers v15 on OSX #9145

helgee opened this issue Nov 25, 2014 · 27 comments
Labels
building Build system, or building Julia or its dependencies system:mac Affects only macOS

Comments

@helgee
Copy link
Contributor

helgee commented Nov 25, 2014

Compilation fails with the following error message:
/Users/helge/src/julia/Make.inc:310: *** USE_LIBCPP only supported with clang. Try setting USE_LIBCPP=0. Stop.

@helgee helgee changed the title Build error with Intel Compilers on OSX not starting Build error with Intel Compilers on OSX Nov 25, 2014
@ivarne
Copy link
Member

ivarne commented Nov 25, 2014

Have you compiled successfully with Intel compilers with a previous version of julia on the same machine/os version, or is this a possible configuration issue?

What versions of OSX and Julia do you get this error on?

@ivarne ivarne added the building Build system, or building Julia or its dependencies label Nov 25, 2014
@helgee
Copy link
Contributor Author

helgee commented Nov 25, 2014

Julia: Fresh clone from master
OSX 10.10.1
Intel Compilers:
ifort (IFORT) 15.0.0 20140716
icc (ICC) 15.0.1 20141022

Make.user as advised in the README

@andreasnoack
Copy link
Member

Did you set environment variables in the shell with one of the scripts from Intel, e.g. compilervars.sh?

@helgee
Copy link
Contributor Author

helgee commented Nov 25, 2014

Yup, all set.

EDIT: I had the idea that it might be a problem with zsh, but I get the same error with bash.

@helgee
Copy link
Contributor Author

helgee commented Nov 25, 2014

The problem seems to be that the variable USE_LIBCPP is set based on the OSX version only and the value for USE_ICC is not considered (see Make.inc:245-265):

ifeq ($(OS), Darwin)
DARWINVER := $(shell uname -r | cut -b 1-2)
DARWINVER_GTE13 := $(shell expr `uname -r | cut -b 1-2` \>= 13)
OSXVER := $(shell sw_vers -productVersion | cut -b 1-4)
ifeq ($(DARWINVER), 10) # Snow Leopard specific configuration
USEGCC = 1
USECLANG = 0
OPENBLAS_TARGET_ARCH=NEHALEM
OPENBLAS_DYNAMIC_ARCH=0
USE_SYSTEM_LIBUNWIND=1
else
ifeq ($(DARWINVER_GTE13),1)
USE_LIBCPP = 1
STDLIBCPP_FLAG = -stdlib=libstdc++
else 
USE_LIBCPP = 0
endif
USEGCC = 0
USECLANG = 1
endif
endif

@tkelman
Copy link
Contributor

tkelman commented Nov 25, 2014

What is ICC's solution to the C++ standard library issue on OSX? Does it link against gcc libstdc++, or clang libc++, or bring its own?

@tkelman
Copy link
Contributor

tkelman commented Nov 25, 2014

Based on the error message on line 310, it sounds like you might just need to add USE_LIBCPP=0 to your Make.user. Did you try that? If so we can just add another sentence to the "Intel compilers and Math Kernel Libraries" section of README.md mentioning this requirement for OSX.

@ViralBShah ViralBShah added the system:mac Affects only macOS label Nov 26, 2014
@helgee
Copy link
Contributor Author

helgee commented Nov 26, 2014

@tkelman I tried setting USE_LIBCPP=0. Did not work.

@tkelman
Copy link
Contributor

tkelman commented Nov 26, 2014

Did not work.

Can you be more specific?

@helgee
Copy link
Contributor Author

helgee commented Nov 26, 2014

It fails with the same error message.

@tkelman
Copy link
Contributor

tkelman commented Nov 26, 2014

In what way did you set USE_LIBCPP=0? You may need to set it as override USE_LIBCPP=0

@helgee
Copy link
Contributor Author

helgee commented Nov 26, 2014

I did not use override. I was able to circumvent this issue by putting in another if-clause that checks for USE_ICC in the above mentioned code. But then I run into another problem because the command icc -dumpmachine returns nothing and ARCH is not set.
When I override ARCH the build process starts but fails again during the compilation of one of the dependencies.

I am away from my computer right now, but I will give a detailed update later today.

@helgee
Copy link
Contributor Author

helgee commented Nov 27, 2014

I did some research and it turns out that the current version of the Intel C++ compiler on OSX uses libcpp by default.

In any case the build fails during the compilation of libosxunwind.

make[3]: Circular src/libuwind.cxx <- src/libuwind.cxx.o dependency dropped.
icc: command line warning #10159: invalid argument for option '-march'
icc: command line warning #10006: ignoring unknown option '-integrated-as'
icc: command line warning #10006: ignoring unknown option '-ggdb3'
src/unw_getcontext.s:25:2: error: instruction requires: Not 64-bit mode
        push    %eax
        ^
src/unw_getcontext.s:47:2: error: instruction requires: Not 64-bit mode
        popl    %eax
        ^
src/unw_getcontext.s:88:14: error: unexpected token in argument list
; extern int unw_getcontext(unw_context_t* thread_state)
             ^
src/unw_getcontext.s:90:11: error: unexpected token in argument list
; On entry: 
          ^
src/unw_getcontext.s:91:24: error: unexpected token in argument list
;       thread_state pointer is in r3
                             ^
src/unw_getcontext.s:93:14: error: unexpected token in memory operand
        stw             r0,  8(r3)       
                               ^
src/unw_getcontext.s:94:2: error: invalid instruction mnemonic 'mflr'
        mflr    r0
        ^~~~
src/unw_getcontext.s:95:14: error: unexpected token in memory operand
        stw             r0,  0(r3)      ; store lr as ssr0
                               ^
src/unw_getcontext.s:95:29: error: unexpected token in argument list
        stw             r0,  0(r3)      ; store lr as ssr0
                                                   ^
src/unw_getcontext.s:96:14: error: unexpected token in memory operand
        stw             r1, 12(r3)      
                               ^
src/unw_getcontext.s:97:14: error: unexpected token in memory operand
        stw             r2, 16(r3)      
                               ^
src/unw_getcontext.s:98:14: error: unexpected token in memory operand
        stw             r3, 20(r3)      
                               ^
src/unw_getcontext.s:99:14: error: unexpected token in memory operand
        stw             r4, 24(r3)      
                               ^
src/unw_getcontext.s:100:14: error: unexpected token in memory operand
        stw             r5, 28(r3)      
                               ^
src/unw_getcontext.s:101:14: error: unexpected token in memory operand
        stw             r6, 32(r3)      
                               ^
src/unw_getcontext.s:102:14: error: unexpected token in memory operand
        stw             r7, 36(r3)      
                               ^
src/unw_getcontext.s:103:14: error: unexpected token in memory operand
        stw             r8, 40(r3)      
                               ^
src/unw_getcontext.s:104:14: error: unexpected token in memory operand
        stw             r9, 44(r3)      
                               ^
src/unw_getcontext.s:105:17: error: unexpected token in memory operand
        stw        r10, 48(r3)  
                           ^
src/unw_getcontext.s:106:17: error: unexpected token in memory operand
        stw        r11, 52(r3)  
                           ^
src/unw_getcontext.s:107:17: error: unexpected token in memory operand
        stw        r12, 56(r3)  
                           ^
src/unw_getcontext.s:108:17: error: unexpected token in memory operand
        stw        r13, 60(r3)  
                           ^
src/unw_getcontext.s:109:17: error: unexpected token in memory operand
        stw        r14, 64(r3)  
                           ^
src/unw_getcontext.s:110:17: error: unexpected token in memory operand
        stw        r15, 68(r3)  
                           ^
src/unw_getcontext.s:111:17: error: unexpected token in memory operand
        stw        r16, 72(r3)  
                           ^
src/unw_getcontext.s:112:17: error: unexpected token in memory operand
        stw        r17, 76(r3)  
                           ^
src/unw_getcontext.s:113:17: error: unexpected token in memory operand
        stw        r18, 80(r3)  
                           ^
src/unw_getcontext.s:114:17: error: unexpected token in memory operand
        stw        r19, 84(r3)  
                           ^
src/unw_getcontext.s:115:17: error: unexpected token in memory operand
        stw        r20, 88(r3)  
                           ^
src/unw_getcontext.s:116:17: error: unexpected token in memory operand
        stw        r21, 92(r3)  
                           ^
src/unw_getcontext.s:117:17: error: unexpected token in memory operand
        stw        r22, 96(r3)  
                           ^
src/unw_getcontext.s:118:17: error: unexpected token in memory operand
        stw        r23,100(r3)  
                           ^
src/unw_getcontext.s:119:17: error: unexpected token in memory operand
        stw        r24,104(r3)  
                           ^
src/unw_getcontext.s:120:17: error: unexpected token in memory operand
        stw        r25,108(r3)  
                           ^
src/unw_getcontext.s:121:17: error: unexpected token in memory operand
        stw        r26,112(r3)  
                           ^
src/unw_getcontext.s:122:17: error: unexpected token in memory operand
        stw        r27,116(r3)  
                           ^
src/unw_getcontext.s:123:17: error: unexpected token in memory operand
        stw        r28,120(r3)  
                           ^
src/unw_getcontext.s:124:17: error: unexpected token in memory operand
        stw        r29,124(r3)  
                           ^
src/unw_getcontext.s:125:17: error: unexpected token in memory operand
        stw        r30,128(r3)  
                           ^
src/unw_getcontext.s:126:17: error: unexpected token in memory operand
        stw        r31,132(r3)  
                           ^
src/unw_getcontext.s:128:16: error: unexpected token in argument list
        ; save VRSave register
                      ^
src/unw_getcontext.s:129:2: error: invalid instruction mnemonic 'mfspr'
        mfspr   r0,256
        ^~~~~
src/unw_getcontext.s:130:14: error: unexpected token in memory operand
        stw             r0,156(r3)      
                               ^
src/unw_getcontext.s:131:12: error: unexpected token in argument list
        ; save CR registers
                  ^
src/unw_getcontext.s:132:2: error: invalid instruction mnemonic 'mfcr'
        mfcr    r0
        ^~~~
src/unw_getcontext.s:133:14: error: unexpected token in memory operand
        stw             r0,136(r3)      
                               ^
src/unw_getcontext.s:134:13: error: unexpected token in argument list
        ; save CTR register
                   ^
src/unw_getcontext.s:135:2: error: invalid instruction mnemonic 'mfctr'
        mfctr   r0
        ^~~~~
src/unw_getcontext.s:136:14: error: unexpected token in memory operand
        stw             r0,148(r3)      
                               ^
src/unw_getcontext.s:138:15: error: unexpected token in argument list
        ; save float registers
                     ^
src/unw_getcontext.s:139:16: error: unexpected token in memory operand
        stfd            f0, 160(r3)
                                ^
src/unw_getcontext.s:140:16: error: unexpected token in memory operand
        stfd            f1, 168(r3)
                                ^
src/unw_getcontext.s:141:16: error: unexpected token in memory operand
        stfd            f2, 176(r3)
                                ^
src/unw_getcontext.s:142:16: error: unexpected token in memory operand
        stfd            f3, 184(r3)
                                ^
src/unw_getcontext.s:143:16: error: unexpected token in memory operand
        stfd            f4, 192(r3)
                                ^
src/unw_getcontext.s:144:16: error: unexpected token in memory operand
        stfd            f5, 200(r3)
                                ^
src/unw_getcontext.s:145:16: error: unexpected token in memory operand
        stfd            f6, 208(r3)
                                ^
src/unw_getcontext.s:146:16: error: unexpected token in memory operand
        stfd            f7, 216(r3)
                                ^
src/unw_getcontext.s:147:16: error: unexpected token in memory operand
        stfd            f8, 224(r3)
                                ^
src/unw_getcontext.s:148:16: error: unexpected token in memory operand
        stfd            f9, 232(r3)
                                ^
src/unw_getcontext.s:149:16: error: unexpected token in memory operand
        stfd            f10,240(r3)
                                ^
src/unw_getcontext.s:150:16: error: unexpected token in memory operand
        stfd            f11,248(r3)
                                ^
src/unw_getcontext.s:151:16: error: unexpected token in memory operand
        stfd            f12,256(r3)
                                ^
src/unw_getcontext.s:152:16: error: unexpected token in memory operand
        stfd            f13,264(r3)
                                ^
src/unw_getcontext.s:153:16: error: unexpected token in memory operand
        stfd            f14,272(r3)
                                ^
src/unw_getcontext.s:154:16: error: unexpected token in memory operand
        stfd            f15,280(r3)
                                ^
src/unw_getcontext.s:155:16: error: unexpected token in memory operand
        stfd            f16,288(r3)
                                ^
src/unw_getcontext.s:156:16: error: unexpected token in memory operand
        stfd            f17,296(r3)
                                ^
src/unw_getcontext.s:157:16: error: unexpected token in memory operand
        stfd            f18,304(r3)
                                ^
src/unw_getcontext.s:158:16: error: unexpected token in memory operand
        stfd            f19,312(r3)
                                ^
src/unw_getcontext.s:159:16: error: unexpected token in memory operand
        stfd            f20,320(r3)
                                ^
src/unw_getcontext.s:160:16: error: unexpected token in memory operand
        stfd            f21,328(r3)
                                ^
src/unw_getcontext.s:161:16: error: unexpected token in memory operand
        stfd            f22,336(r3)
                                ^
src/unw_getcontext.s:162:16: error: unexpected token in memory operand
        stfd            f23,344(r3)
                                ^
src/unw_getcontext.s:163:16: error: unexpected token in memory operand
        stfd            f24,352(r3)
                                ^
src/unw_getcontext.s:164:16: error: unexpected token in memory operand
        stfd            f25,360(r3)
                                ^
src/unw_getcontext.s:165:16: error: unexpected token in memory operand
        stfd            f26,368(r3)
                                ^
src/unw_getcontext.s:166:16: error: unexpected token in memory operand
        stfd            f27,376(r3)
                                ^
src/unw_getcontext.s:167:16: error: unexpected token in memory operand
        stfd            f28,384(r3)
                                ^
src/unw_getcontext.s:168:16: error: unexpected token in memory operand
        stfd            f29,392(r3)
                                ^
src/unw_getcontext.s:169:16: error: unexpected token in memory operand
        stfd            f30,400(r3)
                                ^
src/unw_getcontext.s:170:16: error: unexpected token in memory operand
        stfd            f31,408(r3)
                                ^
src/unw_getcontext.s:173:16: error: unexpected token in argument list
        ; save vector registers
                      ^
src/unw_getcontext.s:175:2: error: invalid instruction mnemonic 'subi'
        subi    r4,r1,16
        ^~~~
src/unw_getcontext.s:176:2: error: invalid instruction mnemonic 'rlwinm'
        rlwinm  r4,r4,0,0,27    ; mask low 4-bits
        ^~~~~~
src/unw_getcontext.s:176:33: error: unexpected token in argument list
        rlwinm  r4,r4,0,0,27    ; mask low 4-bits
                                           ^
src/unw_getcontext.s:177:10: error: unexpected token in argument list
        ; r4 is now a 16-byte aligned pointer into the red zone
                ^
src/unw_getcontext.s:180:20: error: unexpected symbol modifier following '@'
        stvx    _vec,0,r4                       @\
                                                 ^
src/unw_getcontext.s:181:13: error: unexpected token in memory operand
        lwz             r5, 0(r4)                       @\
                              ^
src/unw_getcontext.s:182:19: error: unexpected token in memory operand
        stw             r5, _offset(r3)         @\
                                    ^
src/unw_getcontext.s:183:13: error: unexpected token in memory operand
        lwz             r5, 4(r4)                       @\
                              ^
src/unw_getcontext.s:184:21: error: unexpected token in memory operand
        stw             r5, _offset+4(r3)       @\
                                      ^
src/unw_getcontext.s:185:13: error: unexpected token in memory operand
        lwz             r5, 8(r4)                       @\
                              ^
src/unw_getcontext.s:186:21: error: unexpected token in memory operand
        stw             r5, _offset+8(r3)       @\
                                      ^
src/unw_getcontext.s:187:14: error: unexpected token in memory operand
        lwz             r5, 12(r4)                      @\
                               ^
src/unw_getcontext.s:188:22: error: unexpected token in memory operand
        stw             r5, _offset+12(r3)
                                       ^
src/unw_getcontext.s:190:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED( v0, 424+0x000)
                                 ^
src/unw_getcontext.s:191:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED( v1, 424+0x010)
                                 ^
src/unw_getcontext.s:192:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED( v2, 424+0x020)
                                 ^
src/unw_getcontext.s:193:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED( v3, 424+0x030)
                                 ^
src/unw_getcontext.s:194:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED( v4, 424+0x040)
                                 ^
src/unw_getcontext.s:195:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED( v5, 424+0x050)
                                 ^
src/unw_getcontext.s:196:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED( v6, 424+0x060)
                                 ^
src/unw_getcontext.s:197:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED( v7, 424+0x070)
                                 ^
src/unw_getcontext.s:198:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED( v8, 424+0x080)
                                 ^
src/unw_getcontext.s:199:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED( v9, 424+0x090)
                                 ^
src/unw_getcontext.s:200:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v10, 424+0x0A0)
                                 ^
src/unw_getcontext.s:201:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v11, 424+0x0B0)
                                 ^
src/unw_getcontext.s:202:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v12, 424+0x0C0)
                                 ^
src/unw_getcontext.s:203:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v13, 424+0x0D0)
                                 ^
src/unw_getcontext.s:204:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v14, 424+0x0E0)
                                 ^
src/unw_getcontext.s:205:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v15, 424+0x0F0)
                                 ^
src/unw_getcontext.s:206:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v16, 424+0x100)
                                 ^
src/unw_getcontext.s:207:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v17, 424+0x110)
                                 ^
src/unw_getcontext.s:208:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v18, 424+0x120)
                                 ^
src/unw_getcontext.s:209:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v19, 424+0x130)
                                 ^
src/unw_getcontext.s:210:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v20, 424+0x140)
                                 ^
src/unw_getcontext.s:211:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v21, 424+0x150)
                                 ^
src/unw_getcontext.s:212:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v22, 424+0x160)
                                 ^
src/unw_getcontext.s:213:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v23, 424+0x170)
                                 ^
src/unw_getcontext.s:214:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v24, 424+0x180)
                                 ^
src/unw_getcontext.s:215:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v25, 424+0x190)
                                 ^
src/unw_getcontext.s:216:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v26, 424+0x1A0)
                                 ^
src/unw_getcontext.s:217:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v27, 424+0x1B0)
                                 ^
src/unw_getcontext.s:218:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v28, 424+0x1C0)
                                 ^
src/unw_getcontext.s:219:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v29, 424+0x1D0)
                                 ^
src/unw_getcontext.s:220:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v30, 424+0x1E0)
                                 ^
src/unw_getcontext.s:221:27: error: expected ')' in parentheses expression
        SAVE_VECTOR_UNALIGNED(v31, 424+0x1F0)
                                 ^
src/unw_getcontext.s:223:2: error: invalid instruction mnemonic 'li'
        li      r3, 0           ; return UNW_ESUCCESS
        ^~
src/unw_getcontext.s:223:14: error: invalid instruction mnemonic 'return'
        li      r3, 0           ; return UNW_ESUCCESS
                                  ^~~~~~
src/unw_getcontext.s:224:2: error: invalid instruction mnemonic 'blr'
        blr
        ^~~
make[3]: *** [src/unw_getcontext.s.o] Error 1
make[2]: *** [libosxunwind-0.0.1/libosxunwind.dylib] Error 2
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

@tkelman
Copy link
Contributor

tkelman commented Nov 27, 2014

That is quite strange that icc is barfing on the assembly in libosxunwind. I suspect you might be using a newer version of ICC than anyone has yet tried with Julia on OSX.

@helgee helgee changed the title Build error with Intel Compilers on OSX Build error with Intel Compilers v15 on OSX Nov 27, 2014
@tkelman
Copy link
Contributor

tkelman commented Mar 20, 2015

@Keno any idea on this one?

@Keno
Copy link
Member

Keno commented Mar 20, 2015

different assembly syntax?

@tkelman
Copy link
Contributor

tkelman commented Mar 20, 2015

Ah, probably. Haven't other people gotten further with ICC on OSX though? Different compiler versions, or different flag settings in Make.user?

Can the OSX ICC be made to understand AT&T assembly syntax with some flag? GCC/Clang should be able to understand Intel assembly with the right directive, but manual translation is pretty tedious.

@amanoel
Copy link

amanoel commented Aug 27, 2015

Apparently, at this point it is impossible to compile Julia using ICC on OSX 10.10 (Yosemite). Versions 15 and 16 of ICC lead to the issues above, and version 14 seems to be incompatible with Yosemite libraries.

I'd imagine that, ideally, we should be able to make the code compatible with OSX ICC v16. Any ideas on how to do this?

@amanoel
Copy link

amanoel commented Aug 31, 2015

I wrote on this issue in Intel forum (https://software.intel.com/en-us/forums/topic/590285), and they've noted that the chunk of code where the issue comes from is inside a #elif ppc, so it shouldn't even be considered in the first place.
Thus, there might be some incorrect info in the build configuration leading to this...

@nolta
Copy link
Member

nolta commented Sep 1, 2015

@helgee's seeing errors in both the #if __i386__ and #elif __ppc__ blocks, so my guess is the C preprocessor isn't being run. AFAICT, the intel compilers only run the C preprocessor on non-C/C++ files if the extension is capitalized. So renaming unw_getcontext.s to unw_getcontext.S might fix this.

@tkelman
Copy link
Contributor

tkelman commented Sep 4, 2015

That sounds like a really simple potential fix and worth trying.

@amanoel
Copy link

amanoel commented Sep 4, 2015

Okay, I've tried @nolta's solution and it seems to fix libosxunwind compilation :-)

I've cloned https://github.com/JuliaLang/libosxunwind and compiled it with make CC="icc", the same errors showed up.
Then I capitalized the .s in both unw_getcontext.s and Registers.s, changed the Makefile accordingly and it compiled just fine.

Let me try compiling Julia again now.

@amanoel
Copy link

amanoel commented Sep 8, 2015

Okay, I think I'm giving up for now... After fixing the issue with libosxunwind, I had trouble with many other deps, but then I realized that beside setting the ARCH flag I also had to set BUILD_MACHINE (both depend on icc -dumpmachine, which on OSX returns an empty string). So basically most of my problems were solved by adding the following to the ifeq($(OS), Darwin) block inside Make.inc:

ifeq($(USEICC), 1)
    USE_LIBCPP = 0
    USECLANG = 0
    override BUILD_MACHINE := $(shell clang -dumpmachine)
    override ARCH := $(shell clang -dumpmachine | sed "s/\([^-]*\).*$$/\1/"
endif

I'm now having issues in compiling LLVM; the following error message appears

0  0x108114a44  __assert_rtn + 144
1  0x10813c5d5  mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3175
2  0x10811ff81  mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 375
3  0x108150102  archive::File<x86_64>::makeObjectFileForMember(archive::File<x86_64>::Entry const*) const + 758
4  0x10814fc56  archive::File<x86_64>::justInTimeforEachAtom(char const*, ld::File::AtomHandler&) const + 122
5  0x108165437  ld::tool::InputFiles::searchLibraries(char const*, bool, bool, bool, ld::File::AtomHandler&) const + 215
6  0x10816e270  ld::tool::Resolver::resolveUndefines() + 160
7  0x108170515  ld::tool::Resolver::resolve() + 79
8  0x1081155df  main + 710
A linker snapshot was created at:
        /tmp/llvm-tblgen-2015-08-07-223007.ld-snapshot
ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /SourceCache/ld64/ld64-242.2/src/ld/parsers/macho_relocatable_file.cpp, line 1748.

and after a bit of research I still have no idea on how to handle it... I can proceed by using USE_SYSTEM_LLVM=1, but then other errors related to LLVM show up eventually (perhaps because I have LLVM 3.6 installed and Julia uses LLVM 3.3).

@jdtuck
Copy link

jdtuck commented Jan 25, 2016

I recently tried the above on tag v0.4.3, fixing the libosxunwind issue and

ifeq ($(USEICC), 1)
    USE_LIBCPP = 0
    USECLANG = 0
    override BUILD_MACHINE := $(shell clang -dumpmachine)
    override ARCH := $(shell clang -dumpmachine | sed "s/\([^-]*\).*$$/\1/") 
endif

and I get past the llvm issue, but run into a problem with SuiteSparse

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file:  libspqr.a(spqr_parallel.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file:  libspqr.a(spqr_debug.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file:  libspqr.a(spqr_parallel.o) has no symbols
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file:  libspqr.a(spqr_debug.o) has no symbols
 make: *** [julia-deps] Error 2

Any ideas? I am using Intel Compilers 16 on 10.10

@jiahao
Copy link
Member

jiahao commented Sep 26, 2016

Now that 0.5.0 is released, I tried again recently with clang-800.0.38 (Xcode 8.0, macOS Sierra) and ifort 17.0. I can reproduce a failing build. The offending error is actually with ARPACK:

Updating goal targets....
Considering target file `all-am'.
 File `all-am' does not exist.
  Pruning file `Makefile'.
  Considering target file `libarpack.la'.
   File `libarpack.la' does not exist.
    Considering target file `SRC/libarpacksrc.la'.
     Looking for an implicit rule for `SRC/libarpacksrc.la'.
     Trying pattern rule with stem `libarpacksrc.la'.
     Trying implicit prerequisite `SRC/libarpacksrc.la.f'.
     Trying pattern rule with stem `libarpacksrc.la'.
     Trying implicit prerequisite `SRC/libarpacksrc.la.o'.
     Trying pattern rule with stem `libarpacksrc.la'.
     Trying implicit prerequisite `SRC/libarpacksrc.la,v'.
     Trying pattern rule with stem `libarpacksrc.la'.
     Trying implicit prerequisite `SRC/RCS/libarpacksrc.la,v'.
     Trying pattern rule with stem `libarpacksrc.la'.
     Trying implicit prerequisite `SRC/RCS/libarpacksrc.la'.
     Trying pattern rule with stem `libarpacksrc.la'.
     Trying implicit prerequisite `SRC/s.libarpacksrc.la'.
     Trying pattern rule with stem `libarpacksrc.la'.
     Trying implicit prerequisite `SRC/SCCS/s.libarpacksrc.la'.
     Trying pattern rule with stem `libarpacksrc.la'.
     Trying implicit prerequisite `SRC/libarpacksrc.la.f'.
     Looking for a rule with intermediate file `SRC/libarpacksrc.la.f'.
      <snip>
   Finished prerequisites of target file `libarpack.la'.
  Must remake target `libarpack.la'.
Putting child 0x7fdac0f03570 (libarpack.la) PID 29302 on the chain.
Live child 0x7fdac0f03570 (libarpack.la) PID 29302
libtool: link: rm -fr  .libs/libarpack.lax
libtool: link: (cd .libs/libarpack.lax/libarpacksrc.a && ar x "/Users/jiahao/local/src/julia-0.5/deps/build/arpack-ng-3.3.0/./SRC/.libs/libarpacksrc.a")
libtool: link: (cd .libs/libarpack.lax/libarpackutil.a && ar x "/Users/jiahao/local/src/julia-0.5/deps/build/arpack-ng-3.3.0/./UTIL/.libs/libarpackutil.a")
libtool: link: ifort -mmacosx-version-min=10.7 -m64 -dynamiclib  -o .libs/libarpack.2.dylib   .libs/libarpack.lax/libarpacksrc.a/cgetv0.o .libs/libarpack.lax/libarpacksrc.a/cnaitr.o .libs/libarpack.lax/libarpacksrc.a/cnapps.o .libs/libarpack.lax/libarpacksrc.a/cnaup2.o .libs/libarpack.lax/libarpacksrc.a/cnaupd.o .libs/libarpack.lax/libarpacksrc.a/cneigh.o .libs/libarpack.lax/libarpacksrc.a/cneupd.o .libs/libarpack.lax/libarpacksrc.a/cngets.o .libs/libarpack.lax/libarpacksrc.a/csortc.o .libs/libarpack.lax/libarpacksrc.a/cstatn.o .libs/libarpack.lax/libarpacksrc.a/dgetv0.o .libs/libarpack.lax/libarpacksrc.a/dnaitr.o .libs/libarpack.lax/libarpacksrc.a/dnapps.o .libs/libarpack.lax/libarpacksrc.a/dnaup2.o .libs/libarpack.lax/libarpacksrc.a/dnaupd.o .libs/libarpack.lax/libarpacksrc.a/dnconv.o .libs/libarpack.lax/libarpacksrc.a/dneigh.o .libs/libarpack.lax/libarpacksrc.a/dneupd.o .libs/libarpack.lax/libarpacksrc.a/dngets.o .libs/libarpack.lax/libarpacksrc.a/dsaitr.o .libs/libarpack.lax/libarpacksrc.a/dsapps.o .libs/libarpack.lax/libarpacksrc.a/dsaup2.o .libs/libarpack.lax/libarpacksrc.a/dsaupd.o .libs/libarpack.lax/libarpacksrc.a/dsconv.o .libs/libarpack.lax/libarpacksrc.a/dseigt.o .libs/libarpack.lax/libarpacksrc.a/dsesrt.o .libs/libarpack.lax/libarpacksrc.a/dseupd.o .libs/libarpack.lax/libarpacksrc.a/dsgets.o .libs/libarpack.lax/libarpacksrc.a/dsortc.o .libs/libarpack.lax/libarpacksrc.a/dsortr.o .libs/libarpack.lax/libarpacksrc.a/dstatn.o .libs/libarpack.lax/libarpacksrc.a/dstats.o .libs/libarpack.lax/libarpacksrc.a/dstqrb.o .libs/libarpack.lax/libarpacksrc.a/sgetv0.o .libs/libarpack.lax/libarpacksrc.a/snaitr.o .libs/libarpack.lax/libarpacksrc.a/snapps.o .libs/libarpack.lax/libarpacksrc.a/snaup2.o .libs/libarpack.lax/libarpacksrc.a/snaupd.o .libs/libarpack.lax/libarpacksrc.a/snconv.o .libs/libarpack.lax/libarpacksrc.a/sneigh.o .libs/libarpack.lax/libarpacksrc.a/sneupd.o .libs/libarpack.lax/libarpacksrc.a/sngets.o .libs/libarpack.lax/libarpacksrc.a/ssaitr.o .libs/libarpack.lax/libarpacksrc.a/ssapps.o .libs/libarpack.lax/libarpacksrc.a/ssaup2.o .libs/libarpack.lax/libarpacksrc.a/ssaupd.o .libs/libarpack.lax/libarpacksrc.a/ssconv.o .libs/libarpack.lax/libarpacksrc.a/sseigt.o .libs/libarpack.lax/libarpacksrc.a/ssesrt.o .libs/libarpack.lax/libarpacksrc.a/sseupd.o .libs/libarpack.lax/libarpacksrc.a/ssgets.o .libs/libarpack.lax/libarpacksrc.a/ssortc.o .libs/libarpack.lax/libarpacksrc.a/ssortr.o .libs/libarpack.lax/libarpacksrc.a/sstatn.o .libs/libarpack.lax/libarpacksrc.a/sstats.o .libs/libarpack.lax/libarpacksrc.a/sstqrb.o .libs/libarpack.lax/libarpacksrc.a/zgetv0.o .libs/libarpack.lax/libarpacksrc.a/znaitr.o .libs/libarpack.lax/libarpacksrc.a/znapps.o .libs/libarpack.lax/libarpacksrc.a/znaup2.o .libs/libarpack.lax/libarpacksrc.a/znaupd.o .libs/libarpack.lax/libarpacksrc.a/zneigh.o .libs/libarpack.lax/libarpacksrc.a/zneupd.o .libs/libarpack.lax/libarpacksrc.a/zngets.o .libs/libarpack.lax/libarpacksrc.a/zsortc.o .libs/libarpack.lax/libarpacksrc.a/zstatn.o  .libs/libarpack.lax/libarpackutil.a/cmout.o .libs/libarpack.lax/libarpackutil.a/cvout.o .libs/libarpack.lax/libarpackutil.a/dmout.o .libs/libarpack.lax/libarpackutil.a/dvout.o .libs/libarpack.lax/libarpackutil.a/icnteq.o .libs/libarpack.lax/libarpackutil.a/icopy.o .libs/libarpack.lax/libarpackutil.a/iset.o .libs/libarpack.lax/libarpackutil.a/iswap.o .libs/libarpack.lax/libarpackutil.a/ivout.o .libs/libarpack.lax/libarpackutil.a/second_NONE.o .libs/libarpack.lax/libarpackutil.a/smout.o .libs/libarpack.lax/libarpackutil.a/svout.o .libs/libarpack.lax/libarpackutil.a/zmout.o .libs/libarpack.lax/libarpackutil.a/zvout.o   -L/opt/intel//compilers_and_libraries_2017.0.102/mac/mkl/lib/intel64 -lmkl_rt  -mmacosx-version-min=10.7 -m64 -O2 -rpath @loader_path/   -install_name  /Users/jiahao/local/src/julia-0.5/usr/lib/libarpack.2.dylib -compatibility_version 3 -current_version 3.0 -single_module
ifort: error #10005: unable to open argument file 'loader_path/'

It looks like ifort doesn't understand the -rpath @loader_path/ flag?

@jiahao
Copy link
Member

jiahao commented Sep 26, 2016

Others have reported the same rpath issue with ifort, see Sandia-OpenSHMEM/SOS#111

Removing -rpath @loader_path/ from LDFLAGS in deps/build/arpack-ng-3.3.0 appears to have gotten past this one obstacle.

@ViralBShah
Copy link
Member

We no longer support Intel compilers.

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

10 participants