Link failed release-0.11.0 - FreeBSD x64
Sumit Raja
sumitraja at gmail.com
Wed Jul 10 15:02:49 PDT 2013
On Wednesday, 10 July 2013 at 05:27:40 UTC, Kai Nacke wrote:
>
> Yeah, shared libs do not work yet.
>
> Kai
Made more progress with the build and install but now I am seeing
issues with linking libphobos.
import std.stdio;
void main() {
writeln("hello");
}
Fails to link on FreeBSD with
/usr/local/lib/libphobos-ldc.a(runtime.o): In function
`_D4core7runtime19defaultTraceHandlerFPvZC6object9Throwable9TraceInfo':
/usr/home/mediabag/ldc/runtime/druntime/src/core/runtime.d:(.text+0x2d0):
undefined reference to
`_D4core3sys7freebsd8execinfo17backtrace_symbolsFPxPviZPPa'
/usr/local/lib/libphobos-ldc.a(runtime.o): In function
`_D4core7runtime18runModuleUnitTestsUZb19unittestSegvHandlerUiPS4core3sys5posix6signal9siginfo_tPvZv':
/usr/home/mediabag/ldc/runtime/druntime/src/core/runtime.d:(.text+0x314):
undefined reference to
`_D4core3sys7freebsd8execinfo9backtraceFPPviZi'
/usr/home/mediabag/ldc/runtime/druntime/src/core/runtime.d:(.text+0x323):
undefined reference to
`_D4core3sys7freebsd8execinfo20backtrace_symbols_fdFPxPviiZv'
/usr/local/lib/libphobos-ldc.a(runtime.o): In function
`_D4core7runtime19defaultTraceHandlerFPvZC6object9Throwable9TraceInfo16DefaultTraceInfo6__ctorMFZC4core7runtime19defaultTraceHandlerFPvZC6object9Throwable9TraceInfo16DefaultTraceInfo':
/usr/home/mediabag/ldc/runtime/druntime/src/core/runtime.d:(.text+0x6fd):
undefined reference to
`_D4core3sys7freebsd8execinfo17backtrace_symbolsFPxPviZPPa'
/usr/local/lib/libphobos-ldc.a(runtime.o):(.data+0xb8): undefined
reference to `_D4core3sys7freebsd8execinfo8__ModuleZ'
Error: /usr/bin/gcc failed with status: 1
nm /usr/local/lib/libphobos-ldc.a | grep "backtrace_symbols"
U _D4core3sys7freebsd8execinfo17backtrace_symbolsFPxPviZPPa
U _D4core3sys7freebsd8execinfo20backtrace_symbols_fdFPxPviiZv
I see it here:
execinfo.d:42:extern (D) char** backtrace_symbols(const(void*)*
buffer, int size)
Has druntime linked correctly in the phobos build? Would really
like some guidance on how to debug this further.
Thanks
Sumit
More information about the digitalmars-d-ldc
mailing list