JuliaLang/julia

Binary of Julia Beta v0.2-prerelease does not work on Mac OS X 10.6

alemi opened this issue · 14 comments

After installing the binary of Julia Beta v0.2-prerelease on my MacBook (Mac OS X 10.6.8), I run julia and I get the following:

exec bash -c "PATH='/Applications/Julia-0.2.0-pre-c0e861a1c1.app/Contents/Resources/julia/bin:/usr/bin:/bin:/usr/sbin:/sbin' FONTCONFIG_PATH='/Applications/Julia-0.2.0-pre-c0e861a1c1.app/Contents/Resources/julia/etc/fonts' GIT_EXEC_PATH='/Applications/Julia-0.2.0-pre-c0e861a1c1.app/Contents/Resources/julia/libexec/git-core' GIT_TEMPLATE_DIR='/Applications/Julia-0.2.0-pre-c0e861a1c1.app/Contents/Resources/julia/share/git-core' TK_LIBRARY='/System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts' exec '/Applications/Julia-0.2.0-pre-c0e861a1c1.app/Contents/Resources/julia/bin/julia'"

dyld: lazy symbol binding failed: Symbol not found: __dyld_find_unwind_sections
Referenced from: /Applications/Julia-0.2.0-pre-c0e861a1c1.app/Contents/Resources/julia/bin/../lib/julia/libjulia.dylib
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: __dyld_find_unwind_sections
Referenced from: /Applications/Julia-0.2.0-pre-c0e861a1c1.app/Contents/Resources/julia/bin/../lib/julia/libjulia.dylib
Expected in: /usr/lib/libSystem.B.dylib

[Process completed]

Any suggestions how to fix this?
Please note that the binary of Julia Release v0.1.2 works fine on my system.

My bet is we're not distributing our patched libubwind for osx properly. I will update this issue when I have a fix.

Keno commented

This might have been something that was introduced after 10.6. We might have to fall back to system libunwind on 10.6.

@alemi can you download the latest .dmg file and try it out? I have made a modification that might fix this issue.

The same error:

exec bash -c "PATH='/Applications/Julia-0.2.0-pre-ee92383fb8.app/Contents/Resources/julia/bin:/usr/bin:/bin:/usr/sbin:/sbin' FONTCONFIG_PATH='/Applications/Julia-0.2.0-pre-ee92383fb8.app/Contents/Resources/julia/etc/fonts' GIT_EXEC_PATH='/Applications/Julia-0.2.0-pre-ee92383fb8.app/Contents/Resources/julia/libexec/git-core' GIT_TEMPLATE_DIR='/Applications/Julia-0.2.0-pre-ee92383fb8.app/Contents/Resources/julia/share/git-core' TK_LIBRARY='/System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts' exec '/Applications/Julia-0.2.0-pre-ee92383fb8.app/Contents/Resources/julia/bin/julia'"
dyld: lazy symbol binding failed: Symbol not found: __dyld_find_unwind_sections
Referenced from: /Applications/Julia-0.2.0-pr-ee92383fb8.app/Contents/Resources/julia/bin/../lib/julia/libjulia.dylib
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: __dyld_find_unwind_sections
Referenced from: /Applications/Julia-0.2.0-pre-ee92383fb8.app/Contents/Resources/julia/bin/../lib/julia/libjulia.dylib
Expected in: /usr/lib/libSystem.B.dylib


[Process completed]

@alemi; can you gist the output of otool -L /usr/lib/libSystem.B.dylib, as well as nm /usr/lib/system/libunwind.dylib for us? I don't have a 10.6 machine to test on, but it looks like fixing this won't be quite as easy as I thuoght. Thanks!

otool -L /usr/lib/libSystem.B.dylib

/usr/lib/libSystem.B.dylib:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
/usr/lib/system/libmathCommon.A.dylib (compatibility version 1.0.0, current version 315.0.0)

nm /usr/lib/system/libunwind.dylib

nm: can't open file: /usr/lib/system/libunwind.dylib (No such file or directory)

Guess something is wrong: there is no such file "libunwind.dylib".

That is a problem. @loladiro looks like 10.6 is significantly different than 10.7/10.8. Thoughts about what we can do?

Keno commented

We can just use OS X's unwind on 10.6. Profiling might now work but at least it would build again.

I think this is related to my comment:

#4159 (comment)

Just from the uninformed observer, couldn't you build separate versions for 10.6 and 10.7/10.8? This isn't unheard of.

Yes, definitely. I'm just not entirely sure what the necessary build incantation should be. @loladiro, is there a USE_SYSTEM_LIBUNWIND flag that I need to set or something? Also, do we need to detect 10.6 and print out a warning that the Profiler doesn't work?

This fixes building a separate binary on 10.6.