August 14, 2013 std.regex not linking on FreeBSD | ||||
---|---|---|---|---|
| ||||
Attachments: | Ok this is kinda weird. On FreeBSD 9.1, DMD 2.063.2, this hello world works fine: ---------------------------- # cat hello.d import std.stdio; void main() { writeln("Hello"); } # rdmd --force hello.d Hello ---------------------------- But this trivial std.regex usage results in a giant stream of linker errors: ---------------------------- # cat testRegex.d import std.regex; void main() { auto r = regex("aaa"); } # rdmd --force testRegex.d /tmp/.rdmd-0/rdmd-testRegex.d-5897227E7D8898088FFE24128F75C9A3/objs/testRegex.o: In function `_D3std5regex15__T6ParserTAyaZ6Parser10parseRegexMFNeZv': testRegex.d:(.text._D3std5regex15__T6ParserTAyaZ6Parser10parseRegexMFNeZv+0x110): undefined reference to `_D3std5regex8Bytecode6__ctorMFNcNfE3std5regex2IRkZS3std5regex8Bytecode' testRegex.d:(.text._D3std5regex15__T6ParserTAyaZ6Parser10parseRegexMFNeZv+0x2b9): undefined reference to `_D3std5regex8Bytecode6__ctorMFNcNfE3std5regex2IRkZS3std5regex8Bytecode' testRegex.d:(.text._D3std5regex15__T6ParserTAyaZ6Parser10parseRegexMFNeZv+0x3af): undefined reference to `_D3std5regex8Bytecode6__ctorMFNcNfE3std5regex2IRkZS3std5regex8Bytecode' testRegex.d:(.text._D3std5regex15__T6ParserTAyaZ6Parser10parseRegexMFNeZv+0x4ab): undefined reference to `_D3std5regex8Bytecode6__ctorMFNcNfE3std5regex2IRkZS3std5regex8Bytecode' testRegex.d:(.text._D3std5regex15__T6ParserTAyaZ6Parser10parseRegexMFNeZv+0x60c): undefined reference to `_D3std5regex8Bytecode6__ctorMFNcNfE3std5regex2IRkZS3std5regex8Bytecode' /tmp/.rdmd-0/rdmd-testRegex.d-5897227E7D8898088FFE24128F75C9A3/objs/testRegex.o:testRegex.d:(.text._D3std5regex15__T6ParserTAyaZ6Parser10parseRegexMFNeZv+0x78b): more undefined references to `_D3std5regex8Bytecode6__ctorMFNcNfE3std5regex2IRkZS3std5regex8Bytecode' follow /tmp/.rdmd-0/rdmd-testRegex.d-5897227E7D8898088FFE24128F75C9A3/objs/testRegex.o: In function `_D3std5regex15__T6ParserTAyaZ6Parser9parseAtomMFNfZv': testRegex.d:(.text._D3std5regex15__T6ParserTAyaZ6Parser9parseAtomMFNfZv+0x22a): undefined reference to `_D3std5regex8Bytecode6__ctorMFNcNfE3std5regex2IRkkZS3std5regex8Bytecode' testRegex.d:(.text._D3std5regex15__T6ParserTAyaZ6Parser9parseAtomMFNfZv+0x257): undefined reference to `_D3std5regex8Bytecode6__ctorMFNcNfE3std5regex2IRkZS3std5regex8Bytecode' [...snip (full output is attached)...] ---------------------------- My dmd.conf looks like this, and yes I'm aware that's not the most kosher place to install it (That DFLAGS stuff is really all on one line): ---------------------------- [Environment] DFLAGS=-I/root/dmd2/src/phobos -I/root/dmd2/src/druntime/import -L-L/root/dmd2/freebsd/lib32 -L-L/root/dmd2/freebsd/lib64 -L--no-warn-search-mismatch -L--export-dynamic ---------------------------- I know that's the only dmd.conf on the system because this is a fresh FreeBSD VM as of today. I also tried removing "-L--no-warn-search-mismatch -L--export-dynamic", but that made no difference. |
August 14, 2013 Re: std.regex not linking on FreeBSD | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Sabalausky | On Tue, 13 Aug 2013 22:34:11 -0400 Nick Sabalausky <SeeWebsiteToContactMe@semitwist.com> wrote: > > But this trivial std.regex usage results in a giant stream of linker errors: > > ---------------------------- > # cat testRegex.d > import std.regex; > void main() > { > auto r = regex("aaa"); > } > I think this might be a regression in 2.063. It seems to work fine with 2.062. Can anyone confirm? |
Copyright © 1999-2021 by the D Language Foundation