Skip to content

Issue with libunwind on OSX 10.8.4 #4000

Closed
@c0g

Description

@c0g

I am trying to build julia on OSX 10.8.4, revision afb71a5.

There seems to be something broken in the latest version of Julia on OSX. I believe the bug is in libunwind, due to it referencing ucontext.h:

make cleanall
make
...snip...
/bin/sh ../libtool   --mode=install /usr/local/bin/ginstall -c dnsimp '/Users/tom/Source/julia/usr/bin'
libtool: install: /usr/local/bin/ginstall -c .libs/dnsimp /Users/tom/Source/julia/usr/bin/dnsimp
CC src/jltypes.o
In file included from jltypes.c:13:
In file included from ./julia.h:1228:
In file included from /Users/tom/Source/julia/usr/include/libunwind.h:23:
In file included from /Users/tom/Source/julia/usr/include/libunwind-x86_64.h:36:
/usr/include/ucontext.h:43:2: error: The deprecated ucontext routines require _XOPEN_SOURCE to be defined
#error The deprecated ucontext routines require _XOPEN_SOURCE to be defined
^
1 error generated.
make[2]: *** [jltypes.o] Error 1
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

Modifying usr/include/libunwind-x86-64 to define _XOPEN_SOURCE and point to sys/ucontext.h (vague suggestion from googling) changes the error. I tested with all three combinations of these (both on, _XOPEN on, sys/ on) and got the same error:

make cleanall
make
...snip...
CC src/codegen.o
CC src/interpreter.o
CC src/alloc.o
CC src/dlload.o
CC src/sys.o
CC src/init.o
CC src/task.o
CC src/array.o
CC src/dump.o
CC src/toplevel.o
CC src/jl_uv.o
CC src/jlapi.o
CC src/profile.o
CC src/gc.o
LINK usr/lib/libjulia-release.dylib
Undefined symbols for architecture x86_64:
"__ULx86_64_get_reg", referenced from:
_rec_backtrace in task.o
_rec_backtrace_ctx in task.o
_jl_backtrace_from_here in task.o
_gdbbacktrace in task.o
_jl_throw in task.o
"__ULx86_64_init_local", referenced from:
_rec_backtrace in task.o
_rec_backtrace_ctx in task.o
_jl_backtrace_from_here in task.o
_gdbbacktrace in task.o
_jl_throw in task.o
"__ULx86_64_step", referenced from:
_rec_backtrace in task.o
_rec_backtrace_ctx in task.o
_jl_backtrace_from_here in task.o
_gdbbacktrace in task.o
_jl_throw in task.o
"__Ux86_64_getcontext", referenced from:
_rec_backtrace in task.o
_jl_backtrace_from_here in task.o
_gdbbacktrace in task.o
_jl_throw in task.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [/Users/tom/Source/julia/usr/lib/libjulia-release.dylib] Error 1
make[1]: *** [julia-release] Error 2
make: *** [release] Error 2

This might be a problem in Julia, or it might be in unwind, or on my machine. Or it might be something else entirely!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions