std.regex not linking on FreeBSD

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Tue Aug 13 19:34:11 PDT 2013


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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: out.txt
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20130813/d4c5fa6c/attachment-0001.txt>


More information about the Digitalmars-d-learn mailing list